blavInspect: Inspect or Extract Information from a fitted blavaan object

Description Usage Arguments Details See Also Examples

View source: R/blav_object_inspect.R

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

1
2
3
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

lavInspect, bcfa, bsem, bgrowth

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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)

ecmerkle/blavaan documentation built on Jan. 26, 2020, 11:05 a.m.