Learn R Programming

JoSAE (version 0.1)

eblup.mse.f: Helper functions to derive the variance of the EBLUP estimate

Description

A set of helper functions. The default returns the first component.

Usage

eblup.mse.f(...)
## S3 method for class 'default':
eblup.mse.f(lme.obj, n.i, gamma.i, ...)
## S3 method for class 'c1':
eblup.mse.f(lme.obj, n.i, gamma.i, ...)
## S3 method for class 'c2.ai':
eblup.mse.f(lme.obj, n.i, gamma.i, X.i, ...)
## S3 method for class 'c2':
eblup.mse.f(gamma.i, X.i, X.bar.i, sum.A.i, ...)
## S3 method for class 'c3.asyvarcovarmat':
eblup.mse.f(lme.obj, n.i, ...)
## S3 method for class 'c3':
eblup.mse.f(lme.obj, asympt.var.covar, n.i, ...)
## S3 method for class 'c3.star':
eblup.mse.f(lme.obj, asympt.var.covar, n.i, mean.resid.i, ...)

Arguments

lme.obj
a linear mixed-effects model generated with lme
n.i
the number of samples within domain i
gamma.i
the gamma_i value resulting from JoSAE.gamma.i.f
X.i
the design matrix of sampled elements in domain i
X.bar.i
mean of the populations elements design matrix in domain i
sum.A.i
sum of the domains A_i matrices resulting from eblup.mse.f.c2.ai
asympt.var.covar
the asymptotic variance-covariance matrix of the mixed-effects model resulting from eblup.mse.f.c3.asyvarcovarmat
mean.resid.i
the mean residual of the fixed-part of the linear mixed-effects model in domain i (i.e., use level=0 in predict.lme)
...
forward attributes to other functions. Not used so far.

Value

  • A compontent of the EBLUP variance (aka mean squared error). Which component depends on the method used.

See Also

JoSAE-package for more examples

Examples

Run this code
library(nlme)
data(JoSAE.sample.data)
#fit a lme 
summary(fit.lme <- lme(biomass.ha ~ mean.canopy.ht, data=JoSAE.sample.data
                       , random=~1|domain.ID))
#calculate the first component of the EBLUP variance for a domain with 5 samples
eblup.mse.f.c1(fit.lme, 5, 0.2)

Run the code above in your browser using DataLab