msef.it: Analytic MSE for Model 2

Description Usage Arguments Value References See Also Examples

Description

This function calculates the analytic MSE for the multinomial mixed model with two independent random effects for each category of the response variable: one random effect associated with the domain and another independent random effect associated with time and domain (Model 2). See details of the model and the expresion of mse in Lopez-Vizcaino et al. (2013). The formulas of Prasad and Rao (1990) are adapted to Model 2. This function uses the output of modelfit2.

Usage

1
msef.it(p, X, result, M, MM)

Arguments

p

vector with the number of the auxiliary variables per category.

X

list of matrices with the auxiliary variables obtained from data.mme. The dimension of the list is the number of categories of the response variable minus one.

result

the output of the function modelfit2.

M

vector with the area sample sizes.

MM

vector with the population sample sizes.

Value

mse.analitic is a matrix with the MSE estimator calculated by adapting the explicit formulas of Prasad and Rao (1990). The matrix dimension is the number of domains multiplied by the number of categories minus 1.

References

Lopez-Vizcaino, ME, Lombardia, MJ and Morales, D (2013). Small area estimation of labour force indicator under a multinomial mixed model with correlated time and area effects. Submitted for review.

Prasad, NGN, Rao, JNK (1990).The estimation of the mean squared error of small area estimators. Journal of the American Statistical Association, 85, 163-171.

See Also

data.mme, initial.values, wmatrix, phi.mult.it, prmu.time, phi.direct.it, sPhikf.it, modelfit2, Fbetaf.it, ci, mseb

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
k=3 #number of categories of the response variable
pp=c(1,1) #vector with the number of auxiliary variables in each category
mod=2 #type of model
data(simdata2)
datar=data.mme(simdata2,k,pp,mod)
##Model fit
result=modelfit2(datar$d,datar$t,pp,datar$Xk,datar$X,datar$Z,datar$initial,datar$y[,1:(k-1)],
       datar$n,datar$N)

##Analytic MSE
msef=msef.it(pp,datar$X,result,datar$n,datar$N)

mme documentation built on May 2, 2019, 10:46 a.m.