[R] Invert Deviance Residuals

BillJones bill.jones at usaa.com
Fri Apr 24 21:52:10 CEST 2009


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
-- 
View this message in context: http://www.nabble.com/Invert-Deviance-Residuals-tp23223703p23223703.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list