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: Create dummy variables in automated way


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Create dummy variables in automated way
Date   Wed, 13 Mar 2013 18:33:33 +0000

The easiest ways to generate indicator variables (I vote against the
term "dummy variables" as all too often misunderstood) are

1. On the fly as part of factor variable notation.

2. The -generate()- option of -tabulate-.

Nick

On Wed, Mar 13, 2013 at 6:23 PM, Mirnezami, Oliver
<O.Y.Mirnezami@warwick.ac.uk> wrote:

> I am trying to perform a chow 2 test for predictive failure and would like some help in creating dummy variables in an automated way.
>
> I have panel data and am interested in seeing if the coefficients when estimating the model for my reduced sample (1994-2002) hold for the full sample (1994-2010).
>
> I understand I need to create dummies for each individual in each year for the later part of the sample (2003-2010).
>
> How can I generate these dummies using some kind of loop or automation process?
*
*   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