Description Usage Arguments Details Value Author(s) References Examples
Variance of the sum of predictions taking care of covariances between single predictions.
1 | varSumPredictNlmeGnls(object, newdata, pred = FALSE, retComponents = FALSE)
|
object |
the model fit object used for predictions, treated by |
newdata |
dataframe of new predictors and covariates |
pred |
if TRUE, the predicted value (sum of predictions) is returned in attribute pred |
retComponents |
if TRUE, the sum of the error components (fixed, random, noise) are returned in attributes "varFix","varRan","varResid" |
Variance calculation is based on Taylor series expansion as described in appendix A2 by Wutzler08.
Performance of this function scales with n^2. So do not apply for too many records.
named vector
pred |
sum of predictions |
sdPred |
standard deviation of pred |
varFix |
variance component due to uncertainty in fixed effects |
varRan |
variance component due to random effects |
varResid |
variance component due to residual variance |
Thomas Wutzler
Wutzler, T.; Wirth, C. & Schumacher, J. (2008)
Generic biomass functions for Common beech (Fagus sylvatica L.) in Central Europe - predictions and components of uncertainty.
Canadian Journal of Forest Research, 38, 1661-1675
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | data(modExampleStem) # load the model, which has already been prepared for prediction
#-- prediction on with varying number of records
data(Wutzler08BeechStem)
(resNlme <- varSumPredictNlmeGnls(modExampleStem, head( Wutzler08BeechStem, n=10 )))
(resNlme2 <- varSumPredictNlmeGnls(modExampleStem, head( Wutzler08BeechStem, n=180 )))
# plotting relative error components
barplot(c(sqrt(resNlme[-(1:2)])/resNlme[1], sqrt(resNlme2[-(1:2)])/resNlme2[1]) )
# note how the residual error declines with record number,
# while the fixed and random error does does not decline
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.