I am using lmRob.
require(robust)
stack.rob.int <- lmRob(Loss ~.*., data = stack.dat)
Fine but, I was wondering how I could obtain the psi-function that is used by the lmRob function in the actual fitting. Thanks in advance for any help!
If I were to use the lmrob function in robustbase, is it possible to change the psi function to subtract it by a constant. I am trying to implement the bootstrap as per Lahiri (Annals of Statistics, 1992) where the way to still keep the bootstrap valid is mentioned to be to replace the psi() with the originalpsi() minus the mean ot the residuals while fitting the bootstrap for the robust linear model.
So, there is no way to access the
psi
function directly forrobust::lmRob()
.Simply put,
lmRob()
callslmRob.fit()
(orlmRob.wfit()
if you supply weights) which subsequently callslmRob.fit.compute()
that then sets initial values for a Fortran version depending on thelmRob.control()
set to either"bisquare"
or"optimal"
.As a result of the above discussion, if you need access to the psi functions, you may wish to use
robustbase
as it has easy access to many psi functions (c.f. the biweights)Edit 1
Regarding:
No. The details of what is available after running
lmRob
is available in thelmRob.object
. The documentation is accessible via?lmRob.object
. Regarding residuals, the following are available in thelmRob
object.residuals
: the residual vector corresponding to the estimates returned incoefficients
.T.residuals
: the residual vector corresponding to the estimates returned inT.coefficients
.M.weights
: the robust estimate weights corresponding to the final MM-estimates incoefficients
, if applies.T.M.weights
: the robust estimate weights corresponding to the initial S-estimates inT.coefficients
, if applies.Regarding
Optimal refers to the following psi function:
For other traditional psi functions, you may wish to look at
robustbase
's vignette or a robust textbook.