[R] Robust Non-linear Regression

roger koenker roger at ysidro.econ.uiuc.edu
Sun Nov 13 23:02:32 CET 2005


you might consider nlrq() in the quantreg package, which does median
regression for nonlinear response functions....


url:    www.econ.uiuc.edu/~roger                Roger Koenker
email   rkoenker at uiuc.edu                       Department of Economics
vox:    217-333-4558                            University of Illinois
fax:    217-244-6678                            Champaign, IL 61820


On Nov 13, 2005, at 3:47 PM, Vermeiren, Hans [VRCBE] wrote:

> Hi,
>
> I'm trying to use Robust non-linear regression to fit dose response  
> curves.
> Maybe I didnt look good enough, but I dind't find robust methods  
> for NON
> linear regression implemented in R. A method that looked good to me  
> but is
> unfortunately not (yet) implemented in R is described in
> http://www.graphpad.com/articles/RobustNonlinearRegression_files/ 
> frame.htm
> <http://www.graphpad.com/articles/RobustNonlinearRegression_files/ 
> frame.htm>
>
>
> in short: instead of using the premise that the residuals are  
> gaussian they
> propose a Lorentzian distribution,
> in stead of minimizing the squared residus SUM (Y-Yhat)^2, the  
> objective
> function is now
> SUM log(1+(Y-Yhat)^2/ RobustSD)
>
> where RobustSD is the 68th percentile of the absolute value of the  
> residues
>
> my question is: is there a smart and elegant way to change to  
> objective
> function from squared Distance to log(1+D^2/Rsd^2) ?
>
> or alternatively to write this as a weighted non-linear regression  
> where the
> weights are recalculated during the iterations
> in nlme it is possible to specify weights, possibly that is the way  
> to do
> it, but I didn't manage to get it working
> the weights should then be something like:
>
> SUM (log(1+(resid(.)/quantile(all_residuals,0.68))^2)) / SUM (resid 
> (.))
>
> the test data I use :
> x<-seq(-5,-2,length=50)
> x<-rep(x,4)
> y<-SSfpl(x,0,100,-3.5,1)
> y<-y+rnorm(length(y),sd=5)
> y[sample(1:length(y),floor(length(y)/50))]<-200 # add 2% outliers  
> at 200
>
> thanks a lot
>
> Hans Vermeiren
>
>
>     [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting- 
> guide.html
>




More information about the R-help mailing list