Skip to content
Prev 178254 / 398506 Next

Invert Deviance Residuals

I have a vector of deviance residuals, r, a vector of fitted values, yhat and
I need to solve for a vector of actuals, y.  The deviance residual formula
is r={2(c ln c - c + 1)}^1/2.  c=y/yhat.

Since this can't be solved in closed form, I believe that I should be able
to solve this numerically using a function like optim but I can't get my
head around how to setup the problem and looking at the examples for optim
it hasn't clicked for me.  Any help would be appreciated.  

I am using this result as part of a funtion to do non-parametric
bootstrapping of a glm to build a range around my parameter errors.  

Thanks.

Bill