[R] Forcing best-fit lines to go through the origin

From: Jim Milks <jrclmilks_at_joimail.com>
Date: Mon 18 Apr 2005 - 11:08:32 EST

Dear All,

I have a rather unusual problem. I have a set of data for a class in subsurface processes. From that dataset, I must calculate the slope of the best-fit line (which is the parameter of interest). The problem I have is twofold: 1) for the purposes of the exercise, I must force my best-fit line to go through the origin (0,0), and 2) the line must be linear, even though the data is not. I would like to use R to help me calculate the line, but am unaware of any code or packages that will allow me to force the line through the origin.

The dataset is as follows:

    C   		C*
4.1 		17.4
6.2 		24.9
27.9 		39.5
91.1 		57.4
168.0 	75.5

Thank you in advance for any advice you can give me.


Jim Milks
Graduate Student
Environmental Sciences Ph.D. Program
Wright State University
3640 Colonel Glenn Hwy
Dayton, OH 45435

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 Received on Mon Apr 18 13:46:25 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:15 EST