Description Usage Arguments Value References See Also Examples
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 correlated random effect associated with time and domain (Model 3). 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 3. This function uses the output of modelfit3
.
1 | msef.ct(p, X, result, M, MM)
|
p |
vector with the number of the auxiliary variables per category. |
X |
list of matrices with the auxiliary variables obtained from |
result |
the output of the function |
M |
vector with the area sample sizes. |
MM |
vector with the population sample sizes. |
mse.analitic is a matrix with the MSE estimator calculated by adapting the explicit formulas of Prasad and Rao (1990).
Lopez-Vizcaino, ME, Lombardia, MJ and Morales, D (2013). Small area estimation of labour force indicators 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.
data.mme
, initial.values
,
wmatrix
, phi.mult.ct
,
prmu.time
, phi.direct.ct
,
sPhikf.ct
, modelfit3
,
Fbetaf.ct
, ci
, omega
,
mseb
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
k=3 #number of categories of the response variable
pp=c(1,1) #vector with the number of auxiliary variables in each category
mod=3 #type of model
data(simdata3) #data
datar=data.mme(simdata3,k,pp,mod)
##Model fit
result=modelfit3(d,t,pp,datar$Xk,datar$X,datar$Z,datar$initial,datar$y[,1:(k-1)],
datar$n,datar$N,0)
##Analytic MSE
msef=msef.ct(pp,datar$X,result,datar$n,datar$N)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.