Re: [R] {spam?} Nonlinear Regression

From: Martin Henry H. Stevens <stevenmh_at_muohio.edu>
Date: Mon, 11 Jun 2007 06:47:41 -0400

Hi tronter,

PLEASE do read the posting guide http://www.R-project.org/posting- guide.html
and provide commented, minimal, self-contained, reproducible code.

Hank
On Jun 7, 2007, at 5:50 PM, tronter wrote:

>
> Hello
>
> I followed the example in page 59, chapter 11 of the 'Introduction
> to R'
> manual. I entered my own x,y data. I used the least squares. My
> function has
> 5 parameters: p[1], p[2], p[3], p[4], p[5]. I plotted the x-y data.
> Then I
> used lines(spline(xfit,yfit)) to overlay best curves on the data while
> changing the parameters. My question is how do I calculate the
> residual sum
> of squares. In the example they have the following:
>
> df <- data.frame( x=x, y=y)
>
> fit <- nls(y ~SSmicmen(s, Vm, K), df)
>
> fit
>
>
> In the second line how would I input my function? Would it be:
>
> fit <- nls(y ~ myfunction(p[1], p[2], p[3], p[4], p[5]), df) where
> myfunction is the actual function? My function doesnt have a name,
> so should
> I just enter it?
>
> Thanks
>
> --
> View this message in context: http://www.nabble.com/Nonlinear-
> Regression-tf3886617.html#a11016968
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help_at_stat.math.ethz.ch 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.



R-help_at_stat.math.ethz.ch 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. Received on Mon 11 Jun 2007 - 10:51:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 11 Jun 2007 - 11:31:42 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.