Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: application of post-estimation commands


From   Austin Nichols <[email protected]>
To   [email protected]
Subject   Re: st: application of post-estimation commands
Date   Mon, 12 Sep 2011 03:53:11 -0400

-help estimates-
or
. use firstdata
. regress y x
. use otherdata
. predict yhat

On Sun, Sep 11, 2011 at 11:55 PM,  <[email protected]> wrote:
> * Hi,
>
> * I'm a beginner using Stata 8.1.
>
> * Regarding the following -
>
> sysuse auto, clear
>
> gen wtsq = weight^2
>
> regress mpg weight wtsq
>
> predict mpghat
>
> twoway (scatter mpg weight) (line mpghat weight, sort)
>
> * Let's say I'm happy with the above fitted model.
>
> * In future, how can I predict mpg as a function
>
> * of weight using the same equation from above?
>
> * In other words, I want to save the above
>
> * function and use it in different .dta files.
>
> * Cheers,
>
> * Mike.
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index