poLCA.table: Frequency tables of predicted cell counts from latent class...

Description Usage Arguments Details Value See Also Examples

Description

Calculates predicted cell frequencies based on an estimated latent class model.

Usage

1

Arguments

formula

A formula expression of the form variable ~ 1 for a one-way frequency distribution, or row ~ column for two way-tables.

condition

A list containing the values of the manifest variables to hold fixed when creating the table specified by the formula argument. Setting this to an empty list, condition=list(), conditions on none of the other manifest variables, producing the marginal frequencies.

lc

A model object previously estimated using the poLCA function.

Details

This function outputs predicted cell counts for user-specified combinations of the manifest variables, based on a latent class model estimated by the poLCA function. The predcell table outputted automatically by poLCA also contains predicted cell frequencies, but only for cells containing at least one observation. In contrast, poLCA.table will calculate predicted cell counts for all cells, including those with zero observations.

Value

A vector or table containing the specified frequency distribution.

See Also

poLCA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(gss82)
f <- cbind(PURPOSE,ACCURACY,UNDERSTA,COOPERAT)~1
gss.lc2 <- poLCA(f,gss82,nclass=2)
gss.lc2$predcell

poLCA.table(formula=COOPERAT~1,condition=list(PURPOSE=3,ACCURACY=1,UNDERSTA=2),lc=gss.lc2)

poLCA.table(formula=COOPERAT~UNDERSTA,condition=list(PURPOSE=3,ACCURACY=1),lc=gss.lc2)

poLCA.table(formula=COOPERAT~UNDERSTA,condition=list(),lc=gss.lc2)


Search within the poLCA package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.