[R] non linear regression with R

Spencer Graves spencer.graves at pdf.com
Wed Oct 22 13:30:59 CEST 2003


      Have you considered "nls" or "optim"? 

      My way of handling this kind of problem is to assume that x and / 
or y follow some probability distribution with parameters a and b.  Then 
I write a function to compute deviance = (-2*log(likelihood)) = 
(-2*log(probability density for x and / or y given a and b)) and feed it 
to "optim" to minimize this "deviance".  Or if the response variable is 
a nonlinear model plus independent normal errors with constant variance, 
I may use "nls". 

      hope this helps.  spencer graves

Sophie Gerber wrote:

> Dear Colleagues,
>
> I have x, y data (pollen and seed dispersal from oaks !) that I would 
> like to fit with a function which look like this:
>
> p(a,b,x,y)=b/(2*pi*a²gamma(2/b))*exp(-(square_root(x²+y²)/a)power(b))
>
> I am looking for a and b values that fit my data at best.
> Can someone give me hints to perform such an analysis with R ?
>
> Thanks a lot
>
> Sophie
>
>
>     Sophie Gerber                      gerber at pierroton.inra.fr
>      INRA - UMR BIOGECO
>      69 route d'Arcachon               tel (33) (0)5 57 12 28 30
>      33612 Cestas cedex                fax (33) (0)5 57 12 28 81
>       http://www.pierroton.inra.fr/genetics/Perso/Sophie/
>        page_sophie_english.html
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list