Description
Fits a family of centers.
Usage
fit.family(
x,
w = rep(1, length(x)),
family = "huber",
spread.fun = weighted.mad,
eps = .Machine$double.eps
)
Value
An object of class fit.family
; a data frame with the following columns:
- mu
the fitted values
- lambda
the thresholding parameter
Arguments
- x
a numeric vector of data
- w
a numeric vector of weights
- family
the location family; currently only allows 'huber' for Huber family
- spread.fun
a function used for the spread of x
; must accept data x
and
weights w
(in that order), and return a numeric
- eps
a numerical tolerance parameter
Author
Ryan Thompson <ryan.thompson-1@uts.edu.au>
Examples
Run this codefit <- fit.family(MASS::galaxies)
plot(fit)
Run the code above in your browser using DataLab