semTools (version 0.5-2)

twostage-class: Class for the Results of 2-Stage Maximum Likelihood (TSML) Estimation for Missing Data

Description

This class contains the results of 2-Stage Maximum Likelihood (TSML) estimation for missing data. The summary, anova, vcov methods return corrected SEs and test statistics. Other methods are simply wrappers around the corresponding '>lavaan methods.

Usage

# S4 method for twostage
show(object)

# S4 method for twostage summary(object, ...)

# S4 method for twostage anova(object, h1 = NULL, baseline = FALSE)

# S4 method for twostage nobs(object, type = c("ntotal", "ngroups", "n.per.group", "norig", "patterns", "coverage"))

# S4 method for twostage coef(object, type = c("free", "user"))

# S4 method for twostage vcov(object, baseline = FALSE)

# S4 method for twostage fitted.values(object, model = c("target", "saturated", "baseline"), type = "moments", labels = TRUE)

# S4 method for twostage fitted(object, model = c("target", "saturated", "baseline"), type = "moments", labels = TRUE)

# S4 method for twostage residuals(object, type = c("raw", "cor", "normalized", "standardized"))

# S4 method for twostage resid(object, type = c("raw", "cor", "normalized", "standardized"))

Arguments

object

An object of class twostage.

...

arguments passed to parameterEstimates.

h1

An object of class twostage in which object is nested, so that their difference in fit can be tested using anova (see Value section for details).

baseline

logical indicating whether to return results for the baseline model, rather than the default target (hypothesized) model.

type

The meaning of this argument varies depending on which method it it used for. Find detailed descriptions in the Value section under coef, nobs, and residuals.

model

character naming the slot for which to return the model-implied sample moments (see fitted.values description.)

labels

logical indicating whether the model-implied sample moments should have (row/column) labels.

Value

show

signature(object = "twostage"): The show function is used to display the results of the anova method, as well as the header of the (uncorrected) target model results.

summary

signature(object = "twostage", ...): The summary function prints the same information from the show method, but also provides (and returns) the output of parameterEstimates(object@target, ...) with corrected SEs, test statistics, and confidence intervals. Additional arguments can be passed to parameterEstimates, including fmi = TRUE to provide an estimate of the fraction of missing information.

anova

signature(object = "twostage", h1 = NULL, baseline = FALSE): The anova function returns the residual-based \(\chi^2\) test statistic result, as well as the scaled \(\chi^2\) test statistic result, for the model in the target slot, or for the model in the baseline slot if baseline = TRUE. The user can also provide a single additional twostage object to the h1 argument, in which case anova returns residual-based and scaled (\(\Delta\))\(\chi^2\) test results, under the assumption that the models are nested. The models will be automatically sorted according their degrees of freedom.

nobs

signature(object = "twostage", type = c("ntotal", "ngroups", "n.per.group", "norig", "patterns", "coverage")): The nobs function will return the total sample sized used in the analysis by default. Also available are the number of groups or the sample size per group, the original sample size (if any rows were deleted because all variables were missing), the missing data patterns, and the matrix of coverage (diagonal is the proportion of sample observed on each variable, and off-diagonal is the proportion observed for both of each pair of variables).

coef

signature(object = "twostage", type = c("free", "user")): This is simply a wrapper around the corresponding '>lavaan method, providing point estimates from the target slot.

vcov

signature(object = "twostage", baseline = FALSE): Returns the asymptotic covariance matrix of the estimated parameters (corrected for additional uncertainty due to missing data) for the model in the target slot, or for the model in the baseline slot if baseline = TRUE.

fitted.values, fitted

signature(object = "twostage", model = c("target", "saturated", "baseline")): This is simply a wrapper around the corresponding '>lavaan method, providing model-implied sample moments from the slot specified in the model argument.

residuals, resid

signature(object = "twostage", type = c("raw", "cor", "normalized", "standardized")): This is simply a wrapper around the corresponding '>lavaan method, providing residuals of the specified type from the target slot.

Slots

saturated

A fitted '>lavaan object containing the saturated model results

target

A fitted '>lavaan object containing the target/hypothesized model results

baseline

A fitted '>lavaan object containing the baseline/null model results

auxNames

A character string (potentially of length == 0) of any auxiliary variable names, if used

Objects from the Class

Objects can be created via the twostage function.

See Also

twostage

Examples

Run this code
# NOT RUN {
# See the example from the twostage function

# }

Run the code above in your browser using DataCamp Workspace