gscaLCR {gscaLCA}R Documentation

The 2nd and 3rd step of gscaLCA, which are the partitioning and fitting regression

Description

The 2nd and 3rd step of gscaLCA, which are the partitioning and fitting regression in the latent class regression.

Usage

gscaLCR(results.obj, covnames, multinomial.ref = "MAX")

Arguments

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 MAX, MIX, FIRST, and LAST are available for setting a reference group. The default is MAX.

Value

Results of the gscaLCR, fitting regression after partioning in addtion to gscaLCA results.

Examples

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


[Package gscaLCA version 0.0.5 Index]