phi.mult.ct: Initial values for the variance components in Model 3

Description Usage Arguments Value References See Also Examples

View source: R/modelfit3.R

Description

This function is used in initial.values to calculate the initial values for the variance components in the multinomial mixed model with two independent random effects for each category of the response variable: one domain random effect and another correlated time and domain random effect (Model 3).

Usage

1
phi.mult.ct(beta.0, y, Xk, M, u1, u2)

Arguments

beta.0

a list with the initial values for the fixed effects per category obtained from 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 minus one.

Xk

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

M

vector with the sample size of the areas.

u1

matrix with the values for the first random effect obtained from initial.values.

u2

matrix with the values for the second random effect obtained from initial.values.

Value

A list containing the following components.

phi.0

vector of the initial values for the variance components.

rho.0

vector of the initial values for the correlation parameter.

References

Lopez-Vizcaino, ME, Lombardia, MJ and Morales, D (2013). Small area estimation of labour force indicators under a multinomial mixed model with correlated time and area effects. Submitted for review.

See Also

data.mme, initial.values, wmatrix, prmu.time, Fbetaf.ct, phi.direct.ct, sPhikf.ct, ci, modelfit3, msef.ct,omega, mseb.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
k=3 #number of categories of the response variable
pp=c(1,1) #vector with the number of auxiliary variables in each category
mod=3  #type of model
data(simdata3) #data
D=nrow(simdata3)
datar=data.mme(simdata3,k,pp,mod)
###Fixed effects values
beta.new=list()
beta.new[[1]]=matrix(c( 1.3,-1),2,1)
beta.new[[2]]=matrix(c( -1.6,1),2,1)
## Random effects values
u1.new=rep(0.01,((k-1)*datar$d))
dim(u1.new)=c(datar$d,k-1)
u2.new=rep(0.01,((k-1)*D))
dim(u2.new)=c(D,k-1)

## Initial variance components
phi=phi.mult.ct(beta.new,datar$y,datar$Xk,datar$n,u1.new,u2.new)

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