You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hm, there were actually quite some bugs in package functions which were not captured by the CI tests? @mattansb Here's an example that seems to have worked in the past (at least, we had a test for it), but now no longer works:
library(bayestestR)
library(blavaan)
#> Loading required package: Rcpp#> This is blavaan 0.5-1#> On multicore systems, we suggest use of future::plan("multicore") or#> future::plan("multisession") for faster post-MCMC computations.
data("PoliticalDemocracy", package="lavaan")
model<-" # latent variable definitions dem60 =~ y1 + a*y2 dem65 =~ y5 + a*y6 # regressions dem65 ~ dem60 # residual correlations y1 ~~ y5"model2<-" # latent variable definitions dem60 =~ y1 + a*y2 dem65 =~ y5 + a*y6 # regressions dem65 ~ 0*dem60 # residual correlations y1 ~~ 0*y5"
suppressWarnings(capture.output({
bfit<-blavaan::bsem(model,
data=PoliticalDemocracy,
n.chains=1, burnin=50, sample=100
)
bfit2<-blavaan::bsem(model2,
data=PoliticalDemocracy,
n.chains=1, burnin=50, sample=100
)
}))
bayesfactor_models(bfit, bfit2)
#> Warning: Bayes factors might not be precise.#> For precise Bayes factors, sampling at least 40,000 posterior samples is#> recommended.#> Error in apply(diffs, 2, sum): dim(X) must have a positive length
Created on 2023-10-02 with reprex v2.0.2
Originally posted by @strengejacke in #625 (comment)
The text was updated successfully, but these errors were encountered: