psi_func-class.RdThe class "psi_func" is used to store \(\psi \ (psi)\)
functions for M-estimation. In particular, an object of the class
contains \(\rho(x) \ (\code{rho})\), its derivative
\(\psi(x) \ (psi)\), the weight function \(\psi(x)/x\), and
first derivative of \(\psi\), Dpsi = \(\psi'(x)\).
Objects can be created by calls of the form new("psi_func", ...),
but preferably by psiFunc(...).
rho:the \(\rho()\) function, an object of
class "functionX". This is used to formulate the
objective function; \(\rho()\) can be regarded as generalized
negative log-likelihood.
psi:\(\psi()\) is the derivative of \(\rho\),
\(\psi(x) = \frac{d}{dx} \rho(x)\);
also of class "functionX".
wgt:The weight function \(\psi(x)/x\),
of class "functionX".
Dpsi:the derivative of \(\psi\),
\(Dpsi(x) = psi'(x)\); of class "functionX".
Dwgt:the derivative of the weight function,
of class "functionX", is generated automatically if
psiFunc constructor is used.
tDefs:named numeric vector of tuning parameter Default values.
Erho:A function of class "functionXal" for
computing \(E[\rho(X)]\) when \(X\) is standard normal
\(\mathcal{N}(0,1)\).
Epsi2:A function of class "functionXal" for
computing \(E[\psi^2(X)]\) when \(X\) is standard normal.
EDpsi:A function of class "functionXal" for
computing \(E[\psi'(X)]\) when \(X\) is standard normal.
name:Name of \(\psi\)-function used for printing.
xtras:Potentially further information.
Currently, only chgDefaults(), plot()
and show().
str(huberPsi, give.attr = FALSE)
#> Formal class 'psi_func' [package "robustbase"] with 11 slots
#> ..@ rho :Formal class 'functionX' [package "robustbase"] with 1 slot
#> .. .. ..@ .Data:function (x, k = 1.345)
#> ..@ psi :Formal class 'functionX' [package "robustbase"] with 1 slot
#> .. .. ..@ .Data:function (x, k = 1.345)
#> ..@ wgt :Formal class 'functionX' [package "robustbase"] with 1 slot
#> .. .. ..@ .Data:function (x, k = 1.345)
#> ..@ Dpsi :Formal class 'functionX' [package "robustbase"] with 1 slot
#> .. .. ..@ .Data:function (x, k = 1.345)
#> ..@ Dwgt :Formal class 'functionX' [package "robustbase"] with 1 slot
#> .. .. ..@ .Data:function (x, k = 1.345)
#> ..@ tDefs: Named num 1.34
#> ..@ Erho :Formal class 'functionXal1' [package "robustbase"] with 1 slot
#> .. .. ..@ .Data:function (k = 1.345)
#> ..@ Epsi2:Formal class 'functionXal1' [package "robustbase"] with 1 slot
#> .. .. ..@ .Data:function (k = 1.345)
#> ..@ EDpsi:Formal class 'functionXal1' [package "robustbase"] with 1 slot
#> .. .. ..@ .Data:function (k = 1.345)
#> ..@ name : chr "Huber"
#> ..@ xtras:List of 1
#> .. ..$ tuningP:List of 1
#> .. .. ..$ k: num 1.34
plot(hampelPsi)# calling the plot method (nicely showing "all" !)