Class For Representing A (Fitted) Bayesian Latent Variable Model
blavaan-class.Rd
The blavaan
class contains the lavaan
class, representing a (fitted) Bayesian latent variable
model. It contains a description of the model as specified by the user,
a summary of the data, an internal matrix representation, and if the model
was fitted, the fitting results.
Slots
version
:The lavaan package version used to create this objects
call
:The function call as returned by
match.call()
.timing
:The elapsed time (user+system) for various parts of the program as a list, including the total time.
Options
:Named list of options that were provided by the user, or filled-in automatically.
ParTable
:Named list describing the model parameters. Can be coerced to a data.frame. In the documentation, this is called the `parameter table'.
pta
:Named list containing parameter table attributes.
Data
:Object of internal class
"Data"
: information about the data.SampleStats
:Object of internal class
"SampleStats"
: sample statisticsModel
:Object of internal class
"Model"
: the internal (matrix) representation of the modelCache
:List using objects that we try to compute only once, and reuse many times.
Fit
:Object of internal class
"Fit"
: the results of fitting the model. No longer used.boot
:List. Unused for Bayesian models.
optim
:List. Information about the optimization.
loglik
:List. Information about the loglikelihood of the model (if maximum likelihood was used).
implied
:List. Model implied statistics.
vcov
:List. Information about the variance matrix (vcov) of the model parameters.
test
:List. Different test statistics.
h1
:List. Information about the unrestricted h1 model (if available).
baseline
:List. Information about a baseline model (often the independence model) (if available).
external
:List. Includes Stan or JAGS objects used for MCMC.
Methods
- coef
signature(object = "blavaan", type = "free")
: Returns the estimates of the parameters in the model as a named numeric vector. Iftype="free"
, only the free parameters are returned. Iftype="user"
, all parameters listed in the parameter table are returned, including constrained and fixed parameters.- vcov
signature(object = "lavaan")
: returns the covariance matrix of the estimated parameters.- show
signature(object = "blavaan")
: Print a short summary of the model fit
% \item{plot}{\code{signature(object = "blavaan")}: S4 method for
% creating plots. Also see \code{?plot.blavaan}.}
- summary
signature(object = "blavaan", header = TRUE, fit.measures = FALSE, estimates = TRUE, ci = TRUE, standardized = FALSE, rsquare = FALSE, std.nox = FALSE, psrf = TRUE, neff = FALSE, postmedian = FALSE, postmode = FALSE, priors = TRUE, bf = FALSE, nd = 3L)
: Print a nice summary of the model estimates. Ifheader = TRUE
, the header section (including fit measures) is printed. Iffit.measures = TRUE
, additional fit measures are added to the header section. Ifestimates = TRUE
, print the parameter estimates section. Ifci = TRUE
, add confidence intervals to the parameter estimates section. Ifstandardized = TRUE
, the standardized solution is also printed. Note that SEs and tests are still based on unstandardized estimates. UsestandardizedSolution
to obtain SEs and test statistics for standardized estimates. Ifrsquare=TRUE
, the R-Square values for the dependent variables in the model are printed. Ifstd.nox = TRUE
, thestd.all
column contains the thestd.nox
column from the parameterEstimates() output. Ifpsrf = TRUE
, potential scale reduction factors (Rhats) are printed. Ifneff = TRUE
, effective sample sizes are printed. Ifpostmedian
orpostmode
are TRUE, posterior medians or modes are printed instead of posterior means. Ifpriors = TRUE
, parameter prior distributions are printed. Ifbf = TRUE
, Savage-Dickey approximations of the Bayes factor are printed for certain parameters. Nothing is returned (uselavInspect
or another extractor function to extract information from a fitted model).
References
Edgar C. Merkle, Ellen Fitzsimmons, James Uanhoro, & Ben Goodrich (2021). Efficient Bayesian Structural Equation Modeling in Stan. Journal of Statistical Software, 100(6), 1-22. URL http://www.jstatsoft.org/v100/i06/.
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/.
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/.