Skip to content

Commit

Permalink
0.1.3.6: Fix a bug in printing additional fit measures
Browse files Browse the repository at this point in the history
Tests passed.
  • Loading branch information
sfcheung committed Apr 7, 2024
1 parent 791ccea commit 5329016
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: modelbpp
Title: Model BIC Posterior Probability
Version: 0.1.3.5
Version: 0.1.3.6
Authors@R:
c(person(given = "Shu Fai",
family = "Cheung",
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# modelbpp 0.1.3.5
# modelbpp 0.1.3.6

## New Features

Expand Down Expand Up @@ -34,6 +34,10 @@
Short names should now be properly
constructed. (0.1.3.3)

- Fixed a bug in `print.model_set()`
about the printing of additional fit
measures. (0.1.3.6)

# modelbpp 0.1.3

## New Features
Expand Down
19 changes: 9 additions & 10 deletions R/print.model_set.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,15 @@ print.model_set <- function(x,
out_table$Prior <- prior_tmp
out_table$BIC <- bic_tmp
out_table$BPP <- postprob_tmp

if (!is.null(more_fit_measures)) {
# TODO: Handle nonconvergence
fit_fm <- sapply(x$fit,
lavaan::fitMeasures,
fit.measures = more_fit_measures,
output = "vector")
fit_fm <- t(fit_fm)
out_table <- cbind(out_table, fit_fm)
}
if (sort_models && models_fitted && all_converged) {
i <- order(out_table$BPP,
decreasing = TRUE)
Expand All @@ -168,15 +176,6 @@ print.model_set <- function(x,
format = "f")
out_table["Cumulative"] <- tmp
}
if (!is.null(more_fit_measures)) {
# TODO: Handle nonconvergence
fit_fm <- sapply(x$fit,
lavaan::fitMeasures,
fit.measures = more_fit_measures,
output = "vector")
fit_fm <- t(fit_fm)
out_table <- cbind(out_table, fit_fm)
}
out_table_print <- out_table
out_table_print$Prior <- round(out_table_print$Prior,
digits = bpp_digits)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# modelbpp: Model BIC Posterior Probability <img src="man/figures/logo.png" align="right" />

(Version 0.1.3.5 updated on 2024-04-07, [release history](https://sfcheung.github.io/modelbpp/news/index.html))
(Version 0.1.3.6 updated on 2024-04-07, [release history](https://sfcheung.github.io/modelbpp/news/index.html))

This package is for assessing model uncertainty in structural
equation modeling (SEM) by the BIC posterior
Expand Down

0 comments on commit 5329016

Please sign in to comment.