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`

.

1 2 3 4 5 6 7 8 |

`x` |
an object of class |

`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. |

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.

Cecile Proust-Lima, Viviane Philipps

`hlme`

, `lcmm`

, `multlcmm`

, `Jointlcmm`

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)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.