[R] calculating likelihood-based CI

vito muggeo vito.muggeo at giustizia.it
Wed May 15 09:56:33 CEST 2002


Hi there,
I'm interested in estimating likelihood- (or simply deviance- for GLM) based
CI. I use the following code, but is there 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


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list