Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Fixed intercept in linear regression, How?


From   Ronan Conroy <[email protected]>
To   [email protected]
Subject   Re: st: Fixed intercept in linear regression, How?
Date   Tue, 27 Aug 2002 09:42:16 +0100

on 26/8/02 7:17 PM, Meng Lu at [email protected] wrote:

> I'd like to do a linear regression with the intercept fixed at 1, i.e.,
> 
> y = 1 + bx
> 
> I found it's quite simple in SAS and splus to do so, but I was not able
> to figure out how to fullfill this in stata.

If you consider the model you are testing, you are saying that y-1 is a
function of bx. So -replace- x with x-1, then use the -noconstant- option in
Stata to force omission of the intercept.

Of course, although you may be sure that the intercept is exactly 1, you
should check this assumption with the data. Using the -test- command, you
can 

test _cons = 1

Measurement bias can mean that regressions that should not have an intercept
actually do. That's life...

Ronan M Conroy ([email protected])
Lecturer in Biostatistics
Royal College of Surgeons
Dublin 2, Ireland
+353 1 402 2431 (fax 2329)

-------------------- 
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index