Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Can I change the intercept in a linear regression model


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Can I change the intercept in a linear regression model
Date   Sat, 20 Apr 2013 13:19:28 +0100

You could always subtract the mean of your continuous variable before
running a regression.
After -summarize- the mean is available in r(mean).

Nick
njcoxstata@gmail.com


On 20 April 2013 12:57, Daniel Herbert Opi <opi.herbert@gmail.com> wrote:

> I am running a linear regression model that includes a continuous
> variable and a categorical variable as the independent variables.
>
> I would like to run this model with the intercept instead of running
> through zero it runs through a specified value i.e the mean of my
> continuous variable.
>
> Is there a way of doing this in Stata?
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index