[R] scaling of parameter errors in a weighted regression using nls

2012-06-01 Thread Hengstberger Florian
I noticed that nls treats weights as relative and that the absolute size of the weights w in the following script has therefore no influence on the errors of the parameters reported in the summary a<-1 b<-3 x<--100:100 y<-a*x+b yeps<-y+rnorm(length(x),sd=1) w<-rep(1,length(x)) plot(x,yeps) lin

[R] rls() fails on function calling spline()

2011-10-18 Thread Hengstberger Florian
Hello everybody I want to use rls() on a multi-dimensional function, where parts of it are modeled using a spline. I tried to condense my problem into the following code example, which tries to fit the y-values of a spline interpolation: --