Displaying 3 results from an estimated 3 matches for "zibi".
Did you mean:
zib
2012 Jul 03
2
EM algorithm to find MLE of coeff in mixed effects model
...%t(datai$Zi))%*%(datai$yi-datai$Xi%*%beta)
return(temp1+temp2)
}
#######################################################################
#functions to evaluate the conditional expection, saved as Efun v2.R
#Eh1new=E(bibi')
#Eh2new=E(X'(y-Zbi))
#Eh3new=E(bi'Z'Zbi)
#Eh4new=E(Y-Xibeta-Zibi)'(Y-Xibeta-Zibi)
#Eh5new=E(Xibeta-yi)'Zibi
#Eh6new=E(bi)
Eh1new=function(datai=data.list[[i]],
weights.m=weights.mat)
{
#one way
#temp=matrix(0,2,2)
#for (i in 1:nrow(bi))
#{
#temp=temp+bi[i,]%*%t(bi[i,])*weights.m[i,1]*weights.m[i,2]
#}
#print(temp)
#the other way
bi=datai$b
tempb=bi*...
2012 Jul 03
0
need help EM algorithm to find MLE of coeff in mixed effects model
...t(datai$Zi))%*%(datai$yi-datai$Xi%*%beta)
return(temp1+temp2)
}
#######################################################################
#functions to evaluate the conditional expection, saved as Efun v2.R
#Eh1new=E(bibi')
#Eh2new=E(X'(y-Zbi))
#Eh3new=E(bi'Z'Zbi)
#Eh4new=E(Y-Xibeta-Zibi)'(Y-Xibeta-Zibi)
#Eh5new=E(Xibeta-yi)'Zibi
#Eh6new=E(bi)
Eh1new=function(datai=data.list[[i]],
weights.m=weights.mat)
{
#one way
#temp=matrix(0,2,2)
#for (i in 1:nrow(bi))
#{
#temp=temp+bi[i,]%*%t(bi[i,])*weights.m[i,1]*weights.m[i,2]
#}
#print(temp)
#the other way
bi=dat...
2006 Jun 01
1
setting the random-effects covariance matrix in lme
...ear R-users,
I have longitudinal data and would like to fit a model where both the variance-covariance matrix of the random effects and the residual variance are conditional on a (binary) grouping variable.
I guess the model would have the following form (in hierarchical notation)
Yi|bi,k ~ N(XiB+Zibi, sigmak*Ident)
bi|k ~ N(0, Dk)
K~Bernoulli(p)
I can obtain different sigmas (sigma0 and sigma1 based on the factor 'dx') using the weights option in the call to lme:
lme(fixed = height ~ -1 + bage + mat_ht + pat_ht + dx + time:dx + time2:dx ,
weights=varIdent(form=~1|dx...