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)
lines(x,y)

fit<-nls(yeps~p1*x+p2,start=list(p1=a*1.5,p2=b*1.5),weights=w)

summary(fit)

What is the basic idea behind this behavior which is counterintuitive to me?
The weights in my example are estimates of the absolute measurement error
and I think that scaling the weights by a factor of ten should result in 
parameter errors ten times as large.
How do I achieve this behaviour?

Kind regards
Florian Hengstberger


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to