[R] [Q] How to fit data to a straight line

From: Young-Jin Lee <youngjin.michael_at_gmail.com>
Date: Thu 19 Oct 2006 - 20:53:43 GMT


Dear R users

I have a question about how to fit data to a straight line. I tried nls to do it, but it didn't work.

The reason I want to fit data to a straight line is that I need to compare AIC or BIC values of the two models (a straight line model vs a nonlinear curve model). Fitting data to a nonlinear curve is straightforward, but I could not figure out how to fit the data to a straight line and therefore, I could not get the AIC/BIC values of this simple model. If I can get the AIC/BIC value of the straight line fit without actually doing a fit, that is also fine.

Thanks in advance.

Young-Jin

        [[alternative HTML version deleted]]



R-help@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 Fri Oct 20 07:24:50 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 20 Oct 2006 - 00:30:11 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.