Skip to content

prediction intervals (alpha and beta) for model average estimates from binomial glm and model.avg (library=dRedging)

2 messages · Michelle Ensbey, David Winsemius

#
In R, the predict family of functions provides that facility. If you  
want the code it will be in the particular function associated with  
the model type.

?predict
?predict.glm
# the example illustrates creation of prediction curves on the  
response scale for  a specific range of data.
# create the desired CI's by appropriate use of the se.fit value  
returned from the predict call.
# This is the code inside predict.glm that does the work when se.fit  
is set as TRUE in the predict call:

se.fit <- pred$se.fit
switch(type, response = {
             se.fit <- se.fit * abs(family(object)$mu.eta(fit))
             fit <- family(object)$linkinv(fit)
         }, link = , terms = )