Displaying 1 result from an estimated 1 matches for "beta_z".
Did you mean:
beta_1
2002 May 15
1
calculating likelihood-based CI
...e a more efficient way to do it?
obj<-glm(y~x+z....) #fit the full model
beta.z<-seq(a, b, length=500) #where a<coef(obj)["z"]<b
out<-list()
for(i in 1:500){
out[[i]]<-update(obj,.~.-z+offset(I(beta.z[i]*z)) ) }
dev.z<-sapply(out, function(x)x$dev) #profile dev for \beta_z
range(beta.z[(dev.z-obj$dev)<3.8]) #likelihood based CI
I understand that there could be some package to do it (for instance in
MASS???), but I like know the code to use it with some nonstandard
situations.
best,
vito
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-...