plot.GPPMPred: Plotting predictions

Description Usage Arguments Value Examples

Description

Plots person-specific predictions

Usage

1
2
## S3 method for class 'GPPMPred'
plot(x, plotId, ...)

Arguments

x

object of class GPPMPred as obtained by predict.GPPM

plotId

character string or integer. ID of the person for which the predictions should be plotted

...

additional arguments (currently not used).

Value

A plot visualizing the predictive distribution. The bold line describes the mean and the shaded area the 95% credibility interval.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data("demoLGCM")
#remove all measurements from person 1 and the first form person 2
predIdx <- c(which(demoLGCM$ID==1),which(demoLGCM$ID==2)[1])
fitDemoLGCM <- demoLGCM[setdiff(1:nrow(demoLGCM),predIdx),]

lgcm <- gppm('muI+muS*t','varI+covIS*(t+t#)+varS*t*t#+(t==t#)*sigma',
             fitDemoLGCM,'ID','y')
lgcm <- fit(lgcm)
predRes <- predict(lgcm,demoLGCM[predIdx,])
plot(predRes,1)

karchjd/gppmr documentation built on May 14, 2019, 8:05 a.m.