Description Usage Arguments Author(s) See Also Examples
This function plots the predicted trajectories
obtained with predMMSE
function.
1 2 |
x |
a predMMSE object |
legend.loc |
keyword for the position of the legend from the list "bottomright", "bottom", "bottomleft", "left", "topleft","top", "topright", "right" and "center". By default, the legend is located in the top right of the plot. |
legend |
character or expression to appear in the legend. If no legend should be added, legend should be NULL. |
add |
optional logical indicating if the curves should be added to an existing plot (add=TRUE) or if a new plot should be created (add=FALSE). By default, add is FALSE. |
... |
other parameters to be passed through to plotting functions or to legend |
Cecile Proust-Lima, Viviane Philipps
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #import data paquid from lcmm package
library(lcmm)
data(paquid)
#normalization of MMSE scores
paquid$MMSEnorm <- normMMSE(paquid$MMSE)
#estimation of a linear mixed model on the normalized data
m <- hlme(MMSEnorm~I(age-65)*CEP, random=~I(age-65), subject="ID", data=paquid)
#prediction of MMSE scores in the 0-30 scale
pred <- predictMMSE(m,VarTime="age",Timelim=c(65,85),nTime=30,
Xprofile=c(CEP=1),methInteg='MC',nsim=200,draws=FALSE)
#plot of the predictions
plot(pred)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.