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

Oliver Ruebenacker curoli at gmail.com
Fri Jun 1 21:00:52 CEST 2012


     Hello Florian,

  The best fit only depends on the relative statistical errors. The
estimated parameter error is a purely statistical error and can be
estimated from the sample. Systematic parameter errors are not
estimated. Yes, parameter errors grow with measurement errors.

     Take care
     Oliver

On Fri, Jun 1, 2012 at 11:29 AM, Hengstberger Florian
<Florian.Hengstberger at ait.ac.at> wrote:
> 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 at 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.



-- 
Oliver Ruebenacker
Bioinformatics Consultant (http://www.knowomics.com/wiki/Oliver_Ruebenacker)
Knowomics, The Bioinformatics Network (http://www.knowomics.com)
SBPAX: Turning Bio Knowledge into Math Models (http://www.sbpax.org)



More information about the R-help mailing list