wmatrix function

Model variance-covariance matrix of the multinomial mixed models

Model variance-covariance matrix of the multinomial mixed models

This function calculates the variance-covariance matrix of the multinomial mixed models. Three types of multinomial mixed model are considered. The first model (Model 1), with one random effect in each category of the response variable; Model 2, introducing independent time effect; Model 3, introducing correlated time effect.

wmatrix(M, pr)

Arguments

  • M: vector with area sample sizes.
  • pr: matrix with the estimated probabilities for the categories of the response variable obtained from prmu or prmu.time.

Returns

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

Examples

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) initial=datar$initial mean=prmu.time(datar$n,datar$Xk,initial$beta.0,initial$u1.0,initial$u2.0) ##The model variance-covariance matrix varcov=wmatrix(datar$n,mean$estimated.probabilities)

References

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

See Also

data.mme, initial.values, phi.mult, prmu, prmu.time

Fbetaf, phi.direct, sPhikf, ci, modelfit1, msef, mseb

  • Maintainer: E. Lopez-Vizcaino
  • License: GPL (>= 2)
  • Last published: 2019-01-27

Useful links