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]
st: Dummy variable coding
From
Dheepan Ratha Krishnan <[email protected]>
To
statalist <[email protected]>
Subject
st: Dummy variable coding
Date
Wed, 1 Aug 2012 12:29:41 +1000
Hello all,
I am writing my dissertation on happiness adaptation to life events.
The specific life event that I am looking at is 'death of a relative'
i.e how individuals adapt (in terms of happiness) to the shock of a
relative's passing. I am having trouble coding a dummy variable to
enable me to analyse how people adapt (an adaptation variable).
Specifically, I would like to create an adaptation dummy variable to
take the value of 1 for each two year (eg between 2004-2006) period
following the life event and 0 for all other years. This is to allow
for within variation to be estimated using the fixed effects
estimator. A problem that I am facing is that various individuals in
my sample experience this life event at different points in time (i.e
different years). Is there a command that will allow me to generate an
adaptation dummy variable as I described above to enable analysis of
adaptation for various individuals who have experienced the life event
in different years?
Dheepan Ratha
*
* 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/