Statalist


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

st: R: year dummy


From   "Carlo Lazzaro" <carlo.lazzaro@tin.it>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: R: year dummy
Date   Fri, 28 Mar 2008 09:29:45 +0100

Dear Rajesh,
provided that I have understood your question well, I suppose you have to
(please see example below concerning law enactment only; ten years are
considered; the same can be replicated for enforcement):
-------------------------------begin example--------------------------
set obs 10
g law_ena_year=2000 in 1/5
replace law_ena_year=2001 in 6/8
replace law_ena_year=1999 in 9/10
g enact=1 if  law_ena_year>2000
replace enact=0 if  law_ena_year<=2000
------------------------------end example-------------------------------
As far as the regression is concerned, I am not that clear about the model
you are intended to perform (Logistic regression?? Probit??).

HTH and Kind Regards,

Carlo
-----Messaggio originale-----
Da: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Per conto di Rajesh Tharyan
Inviato: venerd́ 28 marzo 2008 7.25
A: statalist@hsphsun2.harvard.edu
Oggetto: st: year dummy

Hi,

I have a simple model, where I want to examine the effect of the regulation
on certain behaviour. As far as the regulation is concerned, I want to look
at two things. One is the enactment of the law (say year 2000) and the first
enforcement of the law (say year 2004). Is it right to create dummy
variables as below and run them in the same regression

gen enact= (year>2000)
gen enfor= (year>2004)
 
regards
rajesh

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



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