Learn R Programming

robustbase (version 0.5-0-1)

psiFunc: Constructor for Objects "Psi Function" Class

Description

psiFunc(..) is a convenience interface to new("psi_func",..), i.e. for constructing objects of class "psi_func".

Usage

psiFunc(rho, psi, wgt, Dpsi, Erho = NULL, Epsi2 = NULL, EDpsi = NULL, ...)

Arguments

rho, psi, wgt, Dpsi
each a function of x and tuning parameters typically.
Erho, Epsi2, EDpsi
see psi_func-class, and note that these may change in the future.
...
potential further arguments for specifying tuning parameter names and defaults.

See Also

psi_func-class for the class description.

Examples

Run this code
## classical {trivial, not interesting}:
F1 <- function(x) rep.int(1, length(x))
cPsi <- psiFunc(rho = function(x) x^2 / 2, psi = function(x) x,
                wgt = F1, Dpsi = F1,
                Erho = function(x) rep.int(1/2, length(x)),
                Epsi2 = F1, EDpsi = F1)

Run the code above in your browser using DataLab