[R] How to fix slope and estimate intercept

2010-07-22 Thread Jun Shen
Dear all, Is there anyway I can fix slope in some value and only estimate intercept for a linear regression? I understand lm(y~1, data) will NOT have a slope at all. This is not what I want. Thanks. Jun __ R-help@r-project.org mailing list

Re: [R] How to fix slope and estimate intercept

2010-07-22 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jun Shen Sent: Thursday, July 22, 2010 10:30 AM To: R-help Subject: [R] How to fix slope and estimate intercept Dear all, Is there anyway I can fix slope in some value

Re: [R] How to fix slope and estimate intercept

2010-07-22 Thread Jun Shen
To: R-help Subject: [R] How to fix slope and estimate intercept Dear all, Is there anyway I can fix slope in some value and only estimate intercept for a linear regression? I understand lm(y~1, data) will NOT have a slope at all. This is not what I want. Thanks. You can use an offset() term