[R] robust regression

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jul 30 17:22:11 CEST 2003


On Wed, 30 Jul 2003, Joerg Schaber wrote:

> Hi,
> 
> trying to do a robudt regression of a two-way linear model, I keep 
> getting the following error:
> 
>  > lqs(obs ~ y + s -1,method="lms", contrasts=list(s=("contr.sum")))
> Error: lqs failed: all the samples were singular
> 
> Robust regression with M-estimators works (also regular least square 
> fits, of course):
> rlm.formula(formula = obs ~ y + s - 1, method = "M", contrasts = list(s 
> = ("contr.sum")))
> 
> I tried an exact sampling (psamp="exact"), but I keep getting syntax 
> errors. Any idea how I can make the first one work?

You may well not be able to.  lms relies on being able to find a good fit 
to (just over) 50% of the data.  Sounds like you can't fit to 50%.
Try increasing `quantile'.

Generally resistant methods should be employed with caution for designed 
experiments (with factor covariates), and your specification of contrasts 
suggest y is a factor.  So this may not make statistical sense either.


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list