Fbetaf.it: The inverse of the Fisher information matrix of the fixed and...

Description Usage Arguments Value References See Also Examples

View source: R/modelfit2.R

Description

This function calculates the score vector S and the inverse of the Fisher information matrix for the fixed (beta) and the random effects (u1, u2) in Model 2. This model has two independet sets of random effects. The first one contains independent random effects u1dk associated to each category and domain. The second set contains random effects u2dkt associated to each category, domain and time period. Model 2 assumes that the u2dk are independent across time. modelfit2 uses the output of this function to estimate the fixed and random effect by the PQL method.

Usage

1
Fbetaf.it(sigmap, X, Z, phi1, phi2, y, mu, u1, u2)

Arguments

sigmap

a list with the model variance-covariance matrices for each domain.

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.

Z

design matrix of random effects obtained from data.mme.

phi1

vector with the first variance component obtained from modelfit2.

phi2

vector with the second variance component obtained from modelfit2.

y

matrix with the response variable, except the reference category obtained from data.mme. The rows are the domains and the columns are the categories of the response variable minus one.

mu

matrix with the estimated mean of the response variable obtained from prmu.time.

u1

matrix with the values of the first random effect obtained from modelfit2.

u2

matrix with the values of the second random effect obtained from modelfit2.

Value

A list containing the following components.

F

the inverse of the Fisher information matrix.

S

(beta, u1, u2) scores

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.

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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) #data
datar=data.mme(simdata2,k,pp,mod)
initial=datar$initial
mean=prmu.time(datar$n,datar$Xk,initial$beta.0,initial$u1.0,initial$u2.0)
sigmap=wmatrix(datar$n,mean$estimated.probabilities)

##The inverse of the Fisher information matrix of the fixed effects
Fisher=Fbetaf.it(sigmap,datar$X,datar$Z,initial$phi1.0,initial$phi2.0,
       datar$y[,1:(k-1)],mean$mean,initial$u1.0,initial$u2.0)

mme documentation built on May 30, 2017, 3:38 a.m.