Displaying 1 result from an estimated 1 matches for "all_residuals".
2005 Nov 13
4
Robust Non-linear Regression
...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]]