gscaLCR {gscaLCA} | R Documentation |
The 2nd and 3rd step of gscaLCA, which are the partitioning and fitting regression in the latent class regression.
gscaLCR(results.obj, covnames, multinomial.ref = "MAX")
results.obj |
the results of gscaLCA. |
covnames |
A character vector of covariates. The covariates are used when latent class regression (LCR) is fitted. |
multinomial.ref |
A character element. Options of |
Results of the gscaLCR, fitting regression after partioning in addtion to gscaLCA results.
R2 = gscaLCA (dat = AddHealth[1:500, ], # Data has to include the possible covarite to run gscaLCR
varnames = names(AddHealth)[2:6],
ID.var = "AID",
num.class = 3,
num.factor = "EACH",
Boot.num = 0,
multiple.Core = F)
R2.gender = gscaLCR (R2, covnames = "Gender")
summary(R2.gender, "multinomial.hard") # hard partitioning with multinomial regression
summary(R2.gender, "multinomial.soft") # soft partitioning with multinomial regression
summary(R2.gender, "binomial.hard") # hard partitioning with binomial regression
summary(R2.gender, "binomial.soft") # soft partitioning with binomial regression