Displaying 2 results from an estimated 2 matches for "gausspar".
2012 Jul 03
2
EM algorithm to find MLE of coeff in mixed effects model
...,sd=0.5),log(2:8)) #Xi=cbind(rep(1,7),1:7)
y.m=matrix(NA,nrow=n,ncol=nrow(Xi)) #100*7, each row is a y_i
Zi=Xi
b.list=as.list(data.frame(t(b.m.true)))
psi.old=matrix(c(0.5,0.4,0.4,0.5),2,2) #starting psi, beta and var, not
exactly the same as the true value
beta.old=c(-0.3,0.7)
var.old=1.7
gausspar=gauss.quad(10,kind="hermite",alpha=0,beta=0)
data.list.wob=list()
for (i in 1:n)
{
data.list.wob[[i]]=list(Xi=Xi,yi=y.m[i,],Zi=Zi)
}
#compute true loglikelihood and initial loglikelihood
truelog=0
for (i in 1:length(data.list.wob))
{
truelog=truelog+loglike(data.list.wob[[i]],vvar,beta,...
2012 Jul 03
0
need help EM algorithm to find MLE of coeff in mixed effects model
...,sd=0.5),log(2:8)) #Xi=cbind(rep(1,7),1:7)
y.m=matrix(NA,nrow=n,ncol=nrow(Xi)) #100*7, each row is a y_i
Zi=Xi
b.list=as.list(data.frame(t(b.m.true)))
psi.old=matrix(c(0.5,0.4,0.4,0.5),2,2) #starting psi, beta and var,
not exactly the same as the true value
beta.old=c(-0.3,0.7)
var.old=1.7
gausspar=gauss.quad(10,kind="hermite",alpha=0,beta=0)
data.list.wob=list()
for (i in 1:n)
{
data.list.wob[[i]]=list(Xi=Xi,yi=y.m[i,],Zi=Zi)
}
#compute true loglikelihood and initial loglikelihood
truelog=0
for (i in 1:length(data.list.wob))
{
truelog=truelog+loglike(data.list.wob[[i]],vvar,beta,...