Last data update: 2014.03.03

R: Extract outcome probabilities for randomLCA object
outcomeProbsR Documentation

Extract outcome probabilities for randomLCA object

Description

Extract outcome probabilities and confidence intervals for a randomLCA object.

Usage

## S3 method for class 'randomLCA'
outcomeProbs(object,level = 0.95, boot=FALSE, type="norm",
    R=ifelse(type=="norm",199,999),...)

Arguments

object

randomLCA object

level

confidence interval

boot

use parametric bootstrap to obtain confidence interval

type

type of bootstrap confidence intervals to use, with "perc" or "norm" valid, see boot.ci for description. It seems reasonable to use the normal approximation.

R

replications for parametric bootstrap

...

additional argument; currently none is used.

Details

Confidence intervals are calculated based on asymptotic normality of the estimates transformed by either the inverse of the probit or logistic, or using parametric bootstrap. The asymptotic confidence intervals are currently only available for models without random effects. For the confidence intervals obtained from the parametric bootstrap, the bootstrap is performed on the data that has been transformed to the logit or probit scale, as appropriate. The samples are close to normal allowing for the use of confidence intervals based on the normal approximation. About 199 replications gives similar accuracy to percentile with 999.

Value

Data frame consisting of outcome probabilities and confidence intervals. One for each class.

Author(s)

Ken Beath

Examples

# standard latent class with 2 classes
dentistry.lca2 <- randomLCA(dentistry[,1:5],freq=dentistry$freq,nclass=2)
print(outcomeProbs(dentistry.lca2))

Results