summary2 {lavaSearch2}R Documentation

Latent Variable Model Summary After Small Sample Correction

Description

Summarize a fitted latent variable model. Similar to stats::summary with small sample correction.

Usage

summary2(object, robust, cluster, digit, ...)

## S3 method for class 'lvmfit'
summary2(
  object,
  robust = FALSE,
  cluster = NULL,
  digit = max(5, getOption("digit")),
  ssc = lava.options()$ssc,
  df = lava.options()$df,
  ...
)

## S3 method for class 'lvmfit2'
summary2(
  object,
  robust = FALSE,
  cluster = NULL,
  digit = max(5, getOption("digit")),
  ...
)

## S3 method for class 'lvmfit2'
summary(
  object,
  robust = FALSE,
  cluster = NULL,
  digit = max(5, getOption("digit")),
  ...
)

Arguments

object

a lvmfit or lvmfit2 object (i.e. output of lava::estimate or lavaSearch2::estimate2).

robust

[logical] should robust standard errors be used instead of the model based standard errors? Should be TRUE if argument cluster is not NULL.

cluster

[integer vector] the grouping variable relative to which the observations are iid.

digit

[integer > 0] the number of decimal places to use when displaying the summary.

...

[logical] arguments passed to lower level methods.

ssc

[character] method used to correct the small sample bias of the variance coefficients: no correction ("none"/FALSE/NA), correct the first order bias in the residual variance ("residual"), or correct the first order bias in the estimated coefficients "cox"). Only relevant when using a lvmfit object.

df

[character] method used to estimate the degree of freedoms of the Wald statistic: Satterthwaite "satterthwaite". Otherwise ("none"/FALSE/NA) the degree of freedoms are set to Inf. Only relevant when using a lvmfit object.

Details

summary2 is the same as summary except that it first computes the small sample correction (but does not store it). So if summary2 is to be called several times, it is more efficient to pre-compute the quantities for the small sample correction using sCorrect and then call summary2.

summary2 returns an object with an element table2 containing the estimates, standard errors, degrees of freedom, upper and lower limits of the confidence intervals, test statistics, and p-values.

See Also

estimate2 to obtain lvmfit2 objects.

Examples

#### simulate data ####
m <- lvm(Y~X1+X2)
set.seed(10)
d <- lava::sim(m, 2e1)

#### latent variable models ####
e.lvm <- estimate(m, data = d)
summary(e.lvm)$coef

summary2(e.lvm)
summary2(e.lvm, ssc = "none")


[Package lavaSearch2 version 2.0.3 Index]