[RsR] Fwd: How to evaluate psi(t) from a lmrob object

Manuel Koller ko||er@m@nue| @end|ng |rom gm@||@com
Sun Jan 20 19:03:41 CET 2013


forgot to cc the list...

---------- Forwarded message ----------
From: Manuel Koller <koller.manuel using gmail.com>
Date: Sun, Jan 20, 2013 at 5:40 PM
Subject: Re: [RsR] How to evaluate psi(t) from a lmrob object
To: Olivier Renaud <Olivier.Renaud using unige.ch>


Dear Olivier,

The lmrob.psifun, lmrob.wgtfun, etc. are not exported yet (we are
working on it, slowly).
In the meantime, you will have to access the functions via
robustbase:::, for example:
rho <- function(x, cc) robustbase:::lmrob.psifun(x, cc, "lqq", -1),
psi <- function(x, cc) robustbase:::lmrob.psifun(x, cc, "lqq", 0),
Dpsi <- function(x, cc) robustbase:::lmrob.psifun(x, cc, "lqq", 1),
wgt <- function(x, cc) robustbase:::lmrob.wgtfun(x, cc, "lqq"),
Dwgt <- function(x, cc) (robustbase:::lmrob.psifun(x, cc, "lqq", 1) -
robustbase:::lmrob.wgtfun(x, cc, "lqq"))/x

Which psi function and what tuning parameters have been used is stored
in the control list. The type of psi function is given by
control$psi
and the tuning constants (cc) are stored in
control$tuning.chi for the initial estimate, and
control$tuning.psi for the M and D steps.

Best,

Manuel

On Sat, Jan 19, 2013 at 4:09 PM, Olivier Renaud <Olivier.Renaud using unige.ch> wrote:
>
> Dear list members,
>
> This might be an easy question... or not.
> Suppose I have a lmrob object (resulting from a call to lmrob() ), say
> my.lrob, for which the last step is an M-estimator, e.g.
>
> my.lrob = lmrob(Loss ~ ., data=stack.dat,
> control=lmrob.control(psi='bisquare'))
>
> I would like to evaluate psi(t) at several t of the M-estimator (with its
> set of constants) that has been used to fit this object, based on my.lrob or
> my.lrob$control. Ideally I'm looking for a function that would be something
> like
>
> psifunction (seq(-2,2,,100), my.lrob$control)
>
> I would like this function to work for any possible psi that is implemented
> in lmrob. I've looked into lmrob.psifun and the Class of "Psi Functions" but
> was not successful.
>
> Thanks !
> Olivier
>
>  --
> Prof. Olivier Renaud                  http://www.unige.ch/fapse/mad/
> Methodology & Data Analysis - Psychology Dept - University of Geneva
> UniMail, Office 4138  -  40, Bd du Pont d'Arve   -  CH-1211 Geneva 4
>
> _______________________________________________
> R-SIG-Robust using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-robust




More information about the R-SIG-Robust mailing list