Description Usage Arguments Value Examples
Estimate the accuracy based on predictions.
1 | accuracy(predRes)
|
predRes |
object of class |
accuracy estimates in the form of the mean squared error (MSE), the negative log-predictive probability (nLPP), and the sum squared error (SSE)
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.