fit.family: Fit family

fit.familyR Documentation

Fit family

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
)

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

Value

An object of class fit.family; a data frame with the following columns:

mu

the fitted values

lambda

the thresholding parameter

Author(s)

Ryan Thompson <ryan.thompson1@unsw.edu.au>

Examples

fit <- fit.family(MASS::galaxies)
plot(fit)

familial documentation built on July 9, 2023, 7:27 p.m.