Percentage of variance explained by the (latent class) linear mixed model regression

Description

The function provides the percentage of variance explained by the (latent class) linear mixed regression in a model estimated with hlme, lcmm, multlcmm or Jointlcmm.

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'hlme'
VarExpl(x,values)
## S3 method for class 'lcmm'
VarExpl(x,values)
## S3 method for class 'Jointlcmm'
VarExpl(x,values)
## S3 method for class 'multlcmm'
VarExpl(x,values)

Arguments

x

an object of class hlme, lcmm, multlcmm or Jointlcmm

values

a data frame with a unique row that contains the values of the variables in random and the time variable in the correlation process from which the percentage of variance should be calculated.

Value

For hlme, lcmm, and Jointlcmm objects, the function returns a matrix with 1 row and ng (ie the number of latent classes) columns containing (the class specific) percentages of variance explained by the linear mixed regression.

For multlcmm objects, the function returns a matrix containing (the class specific) percentages of variance explained by the linear mixed regression for each outcome. The resulting matrix is composed of as many rows as outcomes and as many columns as latent classes.

Author(s)

Cecile Proust-Lima, Viviane Philipps

See Also

hlme, lcmm, multlcmm, Jointlcmm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
m1 <- multlcmm(Ydep1+Ydep2~1+Time*X2+contrast(X2),random=~1+Time,
subject="ID",randomY=TRUE,link=c("4-manual-splines","3-manual-splines"),
intnodes=c(8,12,25),data=data_lcmm, 
B=c(-1.071, -0.192,  0.106, -0.005, -0.193,  1.012,  0.870,  0.881,
  0.000,  0.000, -7.520,  1.401,  1.607 , 1.908,  1.431,  1.082,
 -7.528,  1.135 , 1.454 , 2.328, 1.052))

# variation percentages explained by linear mixed regression
VarExpl(m1,data.frame(Time=0))

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.