plot.predMMSE: Plot of predicted scores in the natural scale of the...

Description Usage Arguments Author(s) See Also Examples

Description

This function plots the predicted trajectories obtained with predMMSE function.

Usage

1
2
## S3 method for class 'predMMSE'
plot(x, legend.loc = "topright", legend, add = FALSE, ...)

Arguments

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

Author(s)

Cecile Proust-Lima, Viviane Philipps

See Also

predictMMSE,normMMSE

Examples

 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)

NormPsy documentation built on May 2, 2019, 9:41 a.m.