Usage
bsem(..., ov.cp = "srs", lv.cp = "srs", dp = dpriors(), n.chains = 3, burnin, sample, adapt, jagfile = FALSE, jagextra = list(), inits = "prior", convergence = "manual", jagcontrol = list())
Arguments
...
Default lavaan arguments. See lavaan. ov.cp
Handling of prior distributions on covariance parameters
associated with observed variables: possible values are "srs" or
"fa". Option "srs" is more flexible and better from a
theoretical standpoint, but it is also slower.
lv.cp
Handling of prior distributions on covariance parameters
associated with latent variables; see the ov.cp argument.
dp
Default prior distributions on different types of
parameters, typically the result of a call to dpriors().
See the dpriors() help file for more information.
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.
jagfile
If TRUE, the JAGS model will be written to file
(in the lavExport directory). Can also supply a character
string, which serves as the name of the directory to which files will be written.
jagextra
A list with potential names syntax and
monitor. The syntax object is a text string containing extra
code to insert in the JAGS model syntax, and the monitor object
is a character vector containing extra JAGS parameters to sample.
inits
If it is a character string, the options are currently
"simple", "Mplus", "prior" (default), and
"jags". In the first two
cases, parameter values are set as though they will be estimated via
ML (see lavaan). The starting parameter value for
each chain is then perturbed from the original values through the
addition of uniform noise. If "prior" is used, the starting
parameter values are obtained based on the prior distributions
(while also trying to ensure that the starting values will not crash
the model estimation). If "jags", no starting values are
specified and JAGS will choose values on its own.
If start is a fitted
object of class lavaan, the estimated values of
the corresponding parameters will be extracted, then perturbed in
the manner described above. If it is a model list,
for example the output of the paramaterEstimates() function,
the values of the est or start or ustart column
(whichever is found first) will be extracted. convergence
If "auto", parameters will be
sampled until convergence is achieved (via autorun.jags). In
this case, the arguments burnin and sample are passed to
autorun.jags as startburnin and startsample,
respectively. Otherwise, parameters
are sampled as specified by the user (or by the run.jags defaults).
jagcontrol
A list containing additional parameters passed to
run.jags (or autorun.jags). See the manpage of those functions for an
overview of the additional parameters that can be set. No other
model estimation functions are currently available.