Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

blavInspect

Inspect or Extract Information from a fitted blavaan object


Description

The blavInspect() and blavTech() functions can be used to inspect/extract information that is stored inside (or can be computed from) a fitted blavaan object. This is similar to lavaan's lavInspect() function.

Usage

blavInspect(blavobject, what, ...)

blavTech(blavobject, what, ...)

Arguments

blavobject

An object of class blavaan.

what

Character. What needs to be inspected/extracted? See Details for Bayes-specific options, and see lavaan's lavInspect() for additional options. Note: the what argument is not case-sensitive (everything is converted to lower case.)

...

Default lavaan arguments supplied to lavInspect(); see lavaan.

Details

Below is a list of Bayesian-specific values for the what argument; additional values can be found in the lavInspect() documentation.

"start":

A list of starting values for each chain, unless inits="jags" is used during model estimation. Aliases: "starting.values", "inits".

"psrf":

Each parameter's Gelman-Rubin PSRF (potential scale reduction factor) for convergence assessment.

"ac.10":

Each parameter's estimated lag-10 autocorrelation.

"neff":

Each parameters effective sample size, taking into account autocorrelation.

"mcmc":

An object of class mcmc containing the individual parameter draws from the MCMC run. Aliases: "draws", "samples".

"mcobj":

The underlying run.jags or stan object that resulted from the MCMC run.

"n.chains":

The number of chains sampled.

"cp":

The approach used for estimating covariance parameters ("srs" or "fa").

"dp":

Default prior distributions used for each type of model parameter.

"postmode":

Estimated posterior mode of each free parameter.

"postmean":

Estimated posterior mean of each free parameter.

"postmedian":

Estimated posterior median of each free parameter.

"lvs":

An object of class mcmc containing latent variable (factor score) draws.

"lvmeans":

A matrix of mean factor scores (rows are observations, columns are variables).

"hpd":

HPD interval of each free parameter. In this case, an additional argument level can be supplied to specify a number in (0,1) reflecting the percentage of the interval.

See Also

Examples

## Not run: 
# The Holzinger and Swineford (1939) example
HS.model <- ' visual  =~ x1 + x2 + x3
              textual =~ x4 + x5 + x6
              speed   =~ x7 + x8 + x9 '

fit <- bcfa(HS.model, data=HolzingerSwineford1939,
            jagcontrol=list(method="rjparallel"))

# extract information
blavInspect(fit, "psrf")
blavInspect(fit, "hpd", level=.9)

## End(Not run)

blavaan

Bayesian Latent Variable Analysis

v0.3-15
GPL (>= 3)
Authors
Edgar Merkle [aut, cre] (<https://orcid.org/0000-0001-7158-0653>), Yves Rosseel [aut], Ben Goodrich [aut], Mauricio Garnier-Villarreal [ctb] (<https://orcid.org/0000-0002-2951-6647>, R/blav_compare.R, R/ctr_bayes_fit.R), Terrence D. Jorgensen [ctb] (<https://orcid.org/0000-0001-5111-6773>, R/ctr_bayes_fit.R, R/ctr_ppmc.R), Huub Hoofs [ctb] (R/ctr_bayes_fit.R), Rens van de Schoot [ctb] (R/ctr_bayes_fit.R)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.