summaryplot: Summary of models

Description Usage Arguments Details Author(s) See Also Examples

View source: R/summaryplot.R

Description

This function provides a plot summarizing the results of different models fitted by hlme, lcmm, multlcmm or Jointlcmm.

Usage

1
2
3
4
5
6
7
summaryplot(
  m1,
  ...,
  which = c("BIC", "entropy", "ICL"),
  mfrow = c(1, length(which)),
  xaxis = "G"
)

Arguments

m1

an object of class hlme, lcmm, multlcmm, Jointlcmm or mpjlcmm

...

further arguments, in particular other objects of class hlme, lcmm, multlcmm, Jointlcmm or mpjlcmm, and graphical parameters.

which

character vector indicating which results should be plotted. Possible values are "loglik", "conv", "npm", "AIC", "BIC", "SABIC", "entropy", "ICL".

mfrow

for multiple plots, number of rows and columns to split the graphical device. Default to one line and length(which) columns.

xaxis

the abscissa of the plot. Default to "G", the number of latent classes.

Details

Can be reported the usual criteria used to assess the fit and the clustering of the data: - maximum log-likelihood L (the higher the better) - number of parameters P, number of classes G, convergence criterion (1 = converged) - AIC (the lower the better) computed as -2L+2P - BIC (the lower the better) computed as -2L+ P log(N) where N is the number of subjects - SABIC (the lower the better) computed as -2L+ P log((N+2)/24) - Entropy (the closer to one the better) computed as 1-sum[pi_ig*log(pi_ig)]/(N*log(G)) where pi_ig is the posterior probability that subject i belongs to class g - ICL (the lower the better) computed as BIC -2*sum[c_ig*log(pi_ig)] where c_ig is the posterior class membership -

Author(s)

Sasha Cuau, Viviane Philipps, Cecile Proust-Lima

See Also

summary, summarytable

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
library(NormPsy)
paquid$normMMSE <- normMMSE(paquid$MMSE)
paquid$age65 <- (paquid$age - 65)/10
m1 <- hlme(normMMSE~age65+I(age65^2)+CEP, random=~age65+I(age65^2), subject='ID', data=paquid)
m2 <- hlme(normMMSE~age65+I(age65^2)+CEP, random=~age65+I(age65^2), subject='ID', data=paquid,
ng = 2, mixture=~age65+I(age65^2), B=m1)
m3g <- gridsearch(hlme(normMMSE~age65+I(age65^2)+CEP, random=~age65+I(age65^2), subject='ID',
data=paquid, ng=3, mixture=~age65+I(age65^2)), rep=100, maxiter=30, minit=m1)
summaryplot(m1, m2, m3g, which=c("BIC","entropy","ICL"),bty="l",pch=20,col=2)

## End(Not run)

lcmm documentation built on Jan. 31, 2022, 9:06 a.m.