LVSmiRNA (version 1.22.0)

RLM: Robust Fitting of Linear Models

Description

Fit a linear model by robust regression using the Huber estimator.

Usage

RLM(formula, maxit=20, k=1.345, data, model=TRUE,na.action, method=c("joint","rlm"), x=TRUE, y=TRUE, offset,cov.formula=c("weighted","asymptotic"), start=NULL,...)

Arguments

formula
a formula of the form y ~ x1 + x2 + ...
maxit
the limit on the number of IWLS iterations.
k
tuning constant used for Huber proposal 2 scale estimation.
data
data frame from which variables specified in formula are preferentially to be taken.
model
should the model frame be returned in the object?
na.action
A function to specify the action to be taken if NAs are found. The 'factory-fresh' default action in R is na.omit, and can be changed by options.
method
currently, method="rlm" and "joint" are supported.
x
should the model frame be returned in the object?
y
should the model matrix be returned in the object?
offset
numeric of length n. This can be used to specify an a priori known component to be included in the linear predictor during fitting.
cov.formula
are the methods to compute covariance matrix, currently either weighted or asymptotic.
start
vector containing starting values for the parameters in the predictor.
...
...

Value

An object of class "RLM" inheriting from "lm".

Details

Fitting is done by iterated re-weighted least squares (IWLS). This customized version of robust linear model deal with wild ouliers using log link in joint modelling heterogeneous variance of covariates.

References

Pawitan, Y. 'In All Likelihood: Statistical Modeling and Inference Using Likelihood', (2001, Oxford University Press); Huber, P. J. , Robust Statistics, (1981. Wiley).

See Also

RLM is modified from "rlm" in the MASS, "rlmFit"

Examples

Run this code

set.seed(133)
n <- 9 
p <- 3
X <- matrix(rnorm(n * p), n,p) 
y <- rnorm(n)

fit <- RLM(y~X-1) #no intercept

Run the code above in your browser using DataCamp Workspace