Fit a Bayesian Latent Variable Model
Fit a Bayesian latent variable model.
blavaan(..., cp = "srs", dp = NULL, n.chains = 3, burnin, sample, adapt, mcmcfile = FALSE, mcmcextra = list(), inits = "prior", convergence = "manual", target = "stan", save.lvs = FALSE, wiggle = NULL, wiggle.sd = 0.1, prisamp = FALSE, jags.ic = FALSE, seed = NULL, bcontrol = list())
... |
Default lavaan arguments. See |
cp |
Handling of prior distributions on covariance parameters:
possible values are |
dp |
Default prior distributions on different types of
parameters, typically the result of a call to |
n.chains |
Number of desired MCMC chains. |
burnin |
Number of burnin iterations, NOT including the adaptive iterations. |
sample |
The total number of samples to take after burnin. |
adapt |
The number of adaptive iterations to use at the start of the simulation. |
mcmcfile |
If |
mcmcextra |
A list with potential names |
inits |
If it is a character string, the options are currently
|
convergence |
Useful only for |
target |
Desired MCMC sampling, with |
save.lvs |
Should sampled latent variables (factor scores) be saved? Logical; defaults to FALSE |
wiggle |
Labels of equality-constrained parameters that should be "approximately" equal. Can also be "intercepts", "loadings", "regressions", "means". |
wiggle.sd |
The prior sd (of normal distribution) to be used in approximate equality constraints. Can be one value, or (for target="stan") a numeric vector of values that is the same length as wiggle. |
prisamp |
Should samples be drawn from the prior, instead of the
posterior ( |
jags.ic |
Should DIC be computed the JAGS way, in addition to the BUGS way? Logical; defaults to FALSE |
seed |
A vector of length |
bcontrol |
A list containing additional parameters passed to
|
An object that inherits from class lavaan
, for which several methods
are available, including a summary
method.
Yves Rosseel (2012). lavaan: An R Package for Structural Equation Modeling. Journal of Statistical Software, 48(2), 1-36. URL http://www.jstatsoft.org/v48/i02/.
Edgar C. Merkle & Yves Rosseel (2018). blavaan: Bayesian Structural Equation Models via Parameter Expansion. Journal of Statistical Software, 85(4), 1-30. URL http://www.jstatsoft.org/v85/i04/.
## Not run: # The Holzinger and Swineford (1939) example HS.model <- ' visual =~ x1 + x2 + x3 textual =~ x4 + x5 + x6 speed =~ x7 + x8 + x9 ' fit <- blavaan(HS.model, data=HolzingerSwineford1939, auto.var=TRUE, auto.fix.first=TRUE, auto.cov.lv.x=TRUE) summary(fit) coef(fit) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.