LCTMtoolkit: A toolkit which computes a selection of model adequacy tests...

View source: R/LCTMtoolkit.R

LCTMtoolkitR Documentation

A toolkit which computes a selection of model adequacy tests LCTMtoolkit

Description

The function LCTMtoolkit computes a selection of model adequacy tests, including the APPA (average posterior probability of assignment), the OCC (odds of correct classification), entropy E, Relative entropy (E_k), odds of correct classification is the ratio of the odds of classification based on the maximum posterior probablity classification rule and the estimated class membership proportions (pi_k)

Usage

LCTMtoolkit(model)

Arguments

model

the models to be compared which is the output from hlme() R model or model is the output of SASmodelbuilder(oe, os, op, of) passed through it

Value

A selection of model adequacy tests, including the APPA (average posterior probability of assignment), the OCC (odds of correct classification), entropy $E$, Relative entropy ($E_k$),

References

https://bmjopen.bmj.com/content/8/7/e020683

Examples

data(bmi_long, package='LCTMtools')
require(lcmm)
model2class <- lcmm::hlme(fixed = bmi ~ age,
mixture= ~ age,
random= ~ age,
nwg=TRUE, ng=2, subject="id",
data=data.frame(bmi_long[1:500, ]))
postprob(model2class)
LCTMtoolkit(model2class)

hlennon/LCTMtools documentation built on Dec. 6, 2022, 3:04 a.m.