| plot.GPPMPred | R Documentation |
Plots person-specific predictions
## S3 method for class 'GPPMPred'
plot(x, plotId, ...)
x |
object of class |
plotId |
character string or integer. ID of the person for which the predictions should be plotted |
... |
additional arguments (currently not used). |
A plot visualizing the predictive distribution. The bold line describes the mean and the shaded area the 95\
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.