Description Usage Arguments Value References See Also Examples
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).
1 | phi.mult.ct(beta.0, y, Xk, M, u1, u2)
|
beta.0 |
a list with the initial values for the fixed effects per category obtained from |
y |
matrix with the response variable obtained from |
Xk |
list of matrices with the auxiliary variables per category obtained from |
M |
vector with the sample size of the areas. |
u1 |
matrix with the values for the first random effect obtained from |
u2 |
matrix with the values for the second random effect obtained from |
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. |
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.
data.mme
, initial.values
,
wmatrix
, prmu.time
,
Fbetaf.ct
, phi.direct.ct
,
sPhikf.ct
, ci
,
modelfit3
, msef.ct
,omega
,
mseb
.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.