prmu.time {mme}R Documentation

Estimated mean and probabilities for Model 2 and 3

Description

This function calculates the estimated probabilities and the estimated mean of the response variable, in the multinomial mixed models with two independent random effects, one random effect associated with the area and the other associated with the time, for each category of the response variable. The first model assumes independent time and domain random effect (Model 2) and the second model assumes correlated time and domain random effect (Model 3).

Usage

prmu.time(M, Xk, beta, u1, u2)

Arguments

M

vector with the area sample sizes.

Xk

list of matrices with the auxiliary variables per category obtained from data.mme. The dimension of the list is the number of domains.

beta

a list with the values for the fixed effects beta per category obtained from modelfit2.

u1

a vector with the values of the first random effect obtained from modelfit2 or modelfit3.

u2

a vector with the values of the second random effect obtained from modelfit2 or modelfit3.

Value

A list containing the following components:

Estimated.probabilities

matrix with the estimated probabilities for the categories of response variable.

mean

matrix with the estimated mean of the response variable.

eta

matrix with the estimated log-rates of the probabilities of each category over the reference category.

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. Submited for review.

See Also

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

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) # data
datar=data.mme(simdata2,k,pp,mod)
initial=datar$initial

## Estimated mean and estimated probabilities
mean=prmu.time(datar$n,datar$Xk,initial$beta.0,initial$u1.0,initial$u2.0)

[Package mme version 0.1-6 Index]