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 (u1) and another independent time and domain random effect (u2) (Model 2).
1 | phi.mult.it(beta.0, y, Xk, M, u1, u2)
|
beta.0 |
initial values for the fixed effects 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 |
vector with the initial values for the first random effect obtained from |
u2 |
vector with the initial values for the second random effect obtained from |
phi.0 vector of the initial values for the variance components.
Lopez-Vizcaino, ME, Lombardia, MJ and Morales, D (2013). Multinomial-based small area estimation of labour force indicators. Statistical Modelling, 13, 153-178.
data.mme
, initial.values
,
wmatrix
, prmu.time
,
Fbetaf.it
, phi.direct.it
,
sPhikf.it
, ci
,
modelfit2
, msef.it
,
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
data(simdata2) #data
mod=2 #Type of model
datar=data.mme(simdata2,k,pp,mod)
D=nrow(simdata2)
###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.it(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.