varfh {saeMSPE}R Documentation

Estimates of the variance component using several methods for Fay Herriot model.

Description

This function returns the estimate of variance component with several existing method for Fay Herriot model. This function does not accept missing values.

Usage

varfh(Y, X, D, method)

varOBP(Y, X, D)

Arguments

Y

(vector). It represents the response value for Fay Herriot model.

X

(matrix). It stands for the available auxiliary values.

D

(vector). It represents the knowing sampling variance for Fay Herriot model.

method

Variance component estimation method. See "Details".

Details

Default value for method is 1, It represents the moment estimator, Also called ANOVA estimator, The available variance component estimation method are list as follows:

method = 1 represents the moment (MOM) estimator, ;

method = 2 represents the restricted maximum likelihood (REML) estimator;

method = 3 represents the maximum likelihood (ML) estimator;

method = 4 represents the empirical bayesian (EB) estimator;

Value

This function returns a list with components:

bhat

(vector) Estimates of the unknown regression coefficients.

Ahat

(numeric) Estimates of the variance component.

Author(s)

Peiwen Xiao, Xiaohui Liu, Yuzi Liu, Jiming Jiang, and Shaochu Liu

References

J. Jiang. Linear and Generalized Linear Mixed Models and Their Applications. 2007.

Examples

X = matrix(runif(10 * 3), 10, 3)
X[,1] = rep(1, 10) 
D = (1:10) / 10 + 0.5
Y = X %*% c(0.5,1,1.5) + rnorm(10, 0, sqrt(2)) + rnorm(10, 0, sqrt(D))
varOBP(Y, X, D)
varfh(Y, X, D, 1)

[Package saeMSPE version 1.2 Index]