regress {slca} | R Documentation |
This function performs regression analysis to explore the influence of exogenous (external) variables on the latent class variables within an estimated slca
model. It utilizes logistic regression and employs a three-step approach.
regress(object, ...)
## S3 method for class 'slca'
regress(
object, formula, data = parent.frame(),
imputation = c("modal", "prob"),
method = c("naive", "BCH", "ML"), ...
)
object |
an object of class |
... |
additional arguments. |
formula |
a formula defining the regression model, including both latent class variables from the estimated model and any exogenous (external) variables. |
data |
an optional data frame containing the exogenous variables of interest. |
imputation |
the imputation method for imputing (assigning) latent class variables. Possible values are:
|
method |
the method used to adjust bias in the three-step approach, with options including "naive", "BCH", and "ML". |
A list
with following components:
coefficients |
a matrix of regression coefficients representing the odds ratios of each class against the baseline class (the last class). |
std.err |
a matrix of standard errors corresponding to the regression coefficients. |
vcov |
the calculated variance-covariance matrix for the regression coefficients. |
dim |
the dimensions of the coefficients matrix. |
ll |
the log likelihood of the regression model. |
Using the summary
function, you can print coefficients, standard errors, corresponding Wald statistics, and p-values for these statistics.
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
library(magrittr)
names(nlsy97)
nlsy_jlcpa %>% regress(SMK_98 ~ SEX, nlsy97)
nlsy_jlcpa %>% regress(SUB_98 ~ SEX, nlsy97)
nlsy_jlcpa %>% regress(PROF ~ SEX, nlsy97)