gscaLCR: The 2nd and 3rd step of gscaLCA, which are the partitioning...

Description Usage Arguments Value Examples

View source: R/gscaLCR.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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

gscaLCA documentation built on July 1, 2020, 11:09 p.m.

Related to gscaLCR in gscaLCA...