phi.direct: Variance components for Model 1

Description Usage Arguments Value References See Also Examples

Description

This function calculates the variance components for the multinomial mixed model with one independent random effect in each category of the response variable (Model 1). These values are used in the second part of the fitting algorithm implemented in modelfit1. The algorithm adapts the ideas of Schall (1991) to a multivariate model and the variance components are estimated by the REML method.

Usage

1
phi.direct(sigmap, phi, X, u)

Arguments

sigmap

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

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.

phi

vector with the initial values of the variance components obtained from modelfit1.

u

matrix with the values of the random effects obtained from modelfit1.

Value

a list containing the following components.

phi.new

vector with the variance components.

References

Lopez-Vizcaino, ME, Lombardia, MJ and Morales, D (2013). Multinomial-based small area estimation of labour force indicators. Statistical Modelling, 13 ,153-178.

Schall, R (1991). Estimation in generalized linear models with random effects. Biometrika, 78,719-727.

See Also

data.mme, initial.values, wmatrix, phi.mult, prmu, Fbetaf, sPhikf, ci, modelfit1, msef, 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
data(simdata)   #data
mod=1 #type of model
datar=data.mme(simdata,k,pp,mod)
initial=datar$initial
mean=prmu(datar$n,datar$Xk,initial$beta.0,initial$u.0)
#model variance-covariance matrix
sigmap=wmatrix(datar$n,mean$estimated.probabilities)

##Variance components
phi=phi.direct(sigmap,initial$phi.0,datar$X,initial$u.0)

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