Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Problem with generating time dummies in panel data


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: Problem with generating time dummies in panel data
Date   Mon, 17 Jul 2006 07:38:06 -0500

-search generate dummies- (or -findit generate dummies-) points to the FAQ:


FAQ     . . . . . . . .  . . . . . . . . . . . Creating dummy variables
        . . . . . . . .  . . . . . . . . . . . . . . . . . . . W. Gould
        2/03   How do I create dummy variables?
               http://www.stata.com/support/faqs/data/dummy.html


Scott

> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Daghan Yeldan
> Sent: Monday, July 17, 2006 5:23 AM
> To: [email protected]
> Subject: st: Problem with generating time dummies in panel data
> Importance: High
> 
> Dear all,
> 
> I have been investigating an effect of a law by using a panel data. This
> panel data consists of three years of interviews on the labour market and
> I
> created some variables among the asked questions. Just like every panel
> data
> this dataset has also id numbers which are characterized as resp in my
> analysis. Moreover, by the help of the two variables h and hp I created
> another variable namely, minder, which is basically hp<h in every year.
> With the help of my instructor I manage to cobine all years and the
> variables with append command.
> 
> My problem now is, I have to generate time dummies for minder for every
> year
> that I have in my analysis. Hence, I need to have minder94, minder96,
> minder98. When I list the data, it seems as below
> 
> 
> 
>               resp96      y    h   hp   minder
> 
>     1.          701   1994   32   32      0
>     2.          701   1996   30   24      1
>     3.         1602   1994    .    .        .
>     4.         1602   1996   25    .       .
>     5.         1602   1998    .    .        .
> 
>     6.         1901   1994   40   40      0
>     7.         1901   1996   30   30      0
>     8.         1901   1998    .    .        .
>     9.         6101   1994   40   32      1
>    10         6101   1996    .    .        .
> 
> I think I cannot generate it with the simple gen command, but the other
> ways
> that i try didn't succeed at all.
> Kind Regards for your suggestions,
> Daghan
> 


*
*   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