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 on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: plotting a regression function with time-dummies indicating structural breaks


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: plotting a regression function with time-dummies indicating structural breaks
Date   Tue, 3 May 2011 10:43:23 +0100 (BST)

--- Oliver Jones
> I wonder if there is an easy way to plot a regression of the form:
> 
> y_t = b_0 + b_1*TIME_t + Dummy_1*(b_2 + b_3*TIME_t) + b_4*Dummy_2
> 
> So far I tried:
> gen x = TIME_t
> twoway ///
>     (tsline y) ///
>     (function y = b_0 + b_1*x + Dummy_1*(b_2 + b_3*x) + b_4*Dummy_2, ///
>     range(`first_year' `last_year'))

I tend to plot such graphs by first using -predict- or -adjust- to 
get (adjusted) predictions and than use -twoway line-. It is just
too easy to make a typo in this type of -twoway function- calls. 

Hope this helps,
Maarten
 
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany


http://www.maartenbuis.nl
--------------------------

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index