Learn R Programming

randomLCA (version 1.1-4)

calcCondProb: Calculate Conditional Outcome Probabilities

Description

Calculates the conditional outcome probabilities for random effects models or for standard latent class returns the outcome probabilities. For random effects, the outcome probabilities may be calculated for various percentiles of the random effect.

Usage

calcCondProb(object, conditionalp = 0.5)

Value

Returns a data frame containing class, block, outcome, outcomep (outcome probability) and perc (percentiles of the random effect) if conditionalp is specified. For example a conditionalp of 0.5 is the 50th percentile or the median corresponding to a random effect of zero. 0.025 and 0.975 correspond to the 2.5th and 97.5th percential, so the region between them if 95% of the variation in the data.

Arguments

object

RandomLCA object

conditionalp

the percentiles for the random effect

Author

Ken Beath ken.beath@mq.edu.au

Examples

Run this code
# \donttest{
dentistry.lcarandom <- randomLCA(dentistry[, 1:5], freq = dentistry$freq, 
	random = TRUE, probit = TRUE, cores = 1)
print(calcCondProb(dentistry.lcarandom))
# }

Run the code above in your browser using DataLab