accuracy: Accuracy Estimates for Predictions

Description Usage Arguments Value Examples

Description

Estimate the accuracy based on predictions.

Usage

1
accuracy(predRes)

Arguments

predRes

object of class GPPMPred as obtained by predict.GPPM

Value

accuracy estimates in the form of the mean squared error (MSE), the negative log-predictive probability (nLPP), and the sum squared error (SSE)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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,])
accEsts <- accuracy(predRes)
accEsts$MSE #mean squared error
accEsts$nLPP #negative log-predictive probability

karchjd/gppm documentation built on May 27, 2019, 11:49 p.m.