psifun | R Documentation |
Finds the tuning constant(s) associated to the supplied breakdown point or asymptotic efficiency or computes breakdown point and efficiency associated with the supplied constant(s) for the following psi functions: TB=Tukey biweight, HA=Hampel, HU=Huber, HYP=Hyperbolic, OPT=Optimal, PD=mdpd.
psifun(
u = vector(mode = "double", length = 0),
p = 1,
fun = c("TB", "bisquare", "biweight", "HA", "hampel", "HU", "huber", "HYP",
"hyperbolic", "OPT", "optimal", "PD", "mdpd"),
bdp,
eff,
const,
param,
trace = FALSE
)
u |
optional vector containing scaled residuals or Mahalanobis
distances for the |
p |
number of variables ( |
fun |
psi function class. One of TB, HA, HU, HP, OPT or PD. |
bdp |
requested breakdown point |
eff |
requested asymptotic efficiency |
const |
tuning constant c |
param |
additional parameters |
trace |
whether to print intermediate results. Default is |
A list will be returned containing the following elements:
class
: link function which has be used. Possible values are
'bisquare', 'optimal', 'hyperbolic', 'hampel', 'huber' or 'mdpd'
bdp
: breakdown point
eff
: asymptotic efficiency
c1
: consistency factor (and other parameters) associated
to required breakdown point or nominal efficiency.
kc1
: Expectation of rho associated with c1
to get a
consistent estimator at the model distribution
kc1 = E(rho) = sup(rho)*bdp
rho
: vector of length n
which contains the rho
function associated to the residuals or Mahalanobis distances
for the n
units of the sample. Empty if u
is not provided.
psi
: vector of length n
which contains the psi
function associated with the residuals or Mahalanobis distances
for the n
units of the sample. Empty if u
is not provided.
psider
: vector of length n
which contains the derivative of the
psi function associated with the residuals or Mahalanobis distances
for the n
units of the sample. Empty if u
is not provided.
psix
: vector of length n
which contains
the psi function mutiplied by u
associated with the residuals or Mahalanobis distances
for the n
units of the sample. Empty if u
is not provided.
wei
: vector of length n
which contains the weights
associated with the residuals or Mahalanobis distances
for the n
units of the sample. Empty if u
is not provided.
FSDA team, valentin.todorov@chello.at
Hoaglin, D.C. and Mosteller, F. and Tukey, J.W. (1982), Understanding Robust and Exploratory Data Analysis, Wiley, New York.
Huber, P.J. (1981), Robust Statistics, Wiley.
Huber, P.J. and Ronchetti, E.M. (2009), Robust Statistics, 2nd Edition, Wiley.
Hampel, F.R. and Rousseeuw, P.J. and Ronchetti E. (1981), The Change-of-Variance Curve and Optimal Redescending M-Estimators, Journal of the American Statistical Association, 76, pp. 643–648.
Maronna, R.A. and Martin D. and Yohai V.J. (2006), Robust Statistics, Theory and Methods, Wiley, New York.
Riani, M. and Atkinson, A. C. and Corbellini, A. and Perrotta, D. (2020) Robust regression with density power divergence: Theory, comparisons, and data analysis, Entropy 22. doi:10.3390/e22040399.
## Not run:
## Find c for given bdp for the Tukey biweight function
## The constant c associated to a breakdown point of
## 50 percent in regression is
## c=1.547644980928226
psifun(bdp=0.5)
psifun(c=1.547644980928226)
## Find c for given bdp for the Hampel function
psifun(bdp=0.5, fun="hampel")
## Plot Huber rho function.
x <- seq(-3, 3, 0.001)
c <- 1.345;
HUc1 <- psifun(u=x, p=1, fun="HU", const=c)
rhoHU <- HUc1$rho
plot(x, rhoHU, type="l", lty="solid", lwd=2, col="blue",
xlab="u", ylab="rho (u,1.345)", ylim=c(0.16, 4.5))
lines(x, x^2/2, type="l", lty="dotted", lwd=1.5, col="red")
legend(-1, 4.6, legend=c("Huber rho function", "u^2/2"),
lty=c("solid", "dotted"), lwd=c(2,1.5), col=c("blue", "red"))
yc <- 0.13;
text(-c, yc, paste0("-c=", -c), adj=1)
text(c,yc, paste0("c=",c), adj=0)
segments(c, 0, c, c**2/2, col="red")
segments(-c, 0, -c, c**2/2, col="red")
points(c, c**2/2, col="red")
points(-c, c**2/2, col="red")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.