regress {slca} | R Documentation |
Regress Exogenous Variables on Latent Variables
Description
Performs regression analysis to examine the influence of exogenous (external) variables on latent class variables in an estimated slca
model. The function uses logistic regression with a three-step approach to account for measurement error.
Usage
regress(object, ...)
## S3 method for class 'slcafit'
regress(
object, formula, data = parent.frame(),
imputation = c("modal", "prob"),
method = c("naive", "BCH", "ML"), ...
)
## S3 method for class 'slcafit'
regress(
object,
formula,
data = parent.frame(),
imputation = c("modal", "prob"),
method = c("naive", "BCH", "ML"),
...
)
Arguments
object |
an object of class |
... |
additional arguments. |
formula |
a formula specifying the regression model, including both latent class variables (from the estimated model) and exogenous variables. |
data |
an optional |
imputation |
a character string specifying the imputation method for latent class assignment. Options include:
|
method |
a character string specifying the method to adjust for bias in the three-step approach. Options include:
|
Value
A list
of class reg.slca
with the following components:
coefficients |
A matrix of regression coefficients representing the odds ratios for each latent class against the baseline class (the last class). |
std.err |
A matrix of standard errors corresponding to the regression coefficients. |
vcov |
The variance-covariance matrix of the regression coefficients. |
dim |
The dimensions of the coefficients matrix. |
ll |
The log-likelihood of the regression model. |
The summary
function can be used to display the regression coefficients, standard errors, Wald statistics, and p-values.
References
Vermunt, J. K. (2010). Latent Class Modeling with Covariates: Two Improved Three-Step Approaches. Political Analysis, 18(4), 450–469. http://www.jstor.org/stable/25792024
Examples
library(magrittr)
names(nlsy97)
nlsy_jlcpa %>% regress(SMK_98 ~ SEX, nlsy97)
nlsy_jlcpa %>% regress(PROF ~ SEX, nlsy97)