Biomedical Engineering Reference
In-Depth Information
w=w+1#thenumberofEMiteration
conv[w,]=c(al01,al02,beta1,beta2,beta3,theta)
convLik[w,1]=logFlik(conv[w,])
if(max(abs(c(al01,al02,beta1,beta2,beta3)-
c(pal01,pal02,pbeta1,pbeta2,pbeta3)))<tol)flag=1
}
#if(as.integer(w/10)==w/10)
cat("EMestimation....iteration#",w,
convLik[w,1],round(conv[w,(K2+1):(K2+4)],4),"\n")#forchecking
}
#ENDofEM
#Result
if(error_flag==1|w==nMax)print("Notcovergence")else
{
est=c(al01,al02,beta1,beta2,beta3,theta)
var_al01beta=-diag(qr.solve(he_al01beta(c(al01,beta1)),tol=1e-20))
var_al02beta=-diag(qr.solve(he_al02beta(c(al02,beta2,beta3)),tol=1e-20))
var_theta=-qr.solve(he_theta(theta),tol=1e-20)
se=sqrt(c(var_al01beta[1:K],var_al02beta[1:K],var_al01beta[K+1],
var_al02beta[(K+1):(K+2)],var_theta))
lower=est-(1.96*(se))
upper=est+(1.96*(se))
z_value=est/se
p_z=2*(1-pnorm(abs(z_value),0,1))
result=round(cbind(est,se,lower,upper,z_value,p_z),3)
rownames(result)=c(paste( ' hazard.tumor
( ' ,int1[-length(int1)], ' , ' ,int1[-1], ' ] ' ,sep= '' ),
paste( ' hazard.death
( ' ,int1[-length(int1)], ' , ' ,int1[-1], ' ] ' ,sep= '' ),
"beta1","beta2","beta3","theta")
colnames(result)=c("Estimate","SE","95%CI(L",",U)","Z","P")
cat("Gammafrailtymodel","\n")
print(result)
 
Search WWH ::




Custom Search