[R] Forcing best-fit lines to go through the origin
Jim Milks
jrclmilks at joimail.com
Mon Apr 18 03:08:32 CEST 2005
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.
Sincerely,
Jim Milks
Graduate Student
Environmental Sciences Ph.D. Program
Wright State University
3640 Colonel Glenn Hwy
Dayton, OH 45435
More information about the R-help
mailing list