pp: vector with the number of the auxiliary variables per category.
Xk: list of matrices with the auxiliary variables per category obtained from data.mme. The dimension of the list is the number of domains.
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.
initial: output of the function initial.values.
y: matrix with the response variable obtained from data.mme. The rows are the domains and the columns are the categories of the response variable.
M: vector with the area sample sizes.
MM: vector with the population sample sizes.
mod: a number specifying the type of models: 1=multinomial mixed model with one independent random effect in each category of the response variable (Model 1), 2=multinomial mixed model with two independent random effects in each category of the response variable: one domain random effect and another independent time and domain random effect (Model 2) and 3= multinomial model with two independent random effects in each category of the response variable: one domain random effect and another correlated time and domain random effect (Model 3).
Returns
the output of the function modelfit1, modelfit2 or modelfit3.
Examples
k=3#number of categories of the response variablepp=c(1,1)#vector with the number of auxiliary variables in each categorydata(simdata)#datamod=1#Model 1datar=data.mme(simdata,k,pp,mod)result=model(datar$d,datar$t,pp,datar$Xk,datar$X,datar$Z,datar$initial,datar$y[,1:(k-1)],datar$n,datar$N, mod)
References
Lopez-Vizcaino, ME, Lombardia, MJ and Morales, D (2013). Multinomial-based small area estimation of labour force indicators. Statistical Modelling, 13 ,153-178.
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.