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

st: R: year dummy

From   "Carlo Lazzaro" <>
To   <>
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,

-----Messaggio originale-----
[] Per conto di Rajesh Tharyan
Inviato: venerd́ 28 marzo 2008 7.25
Oggetto: st: year dummy


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)

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index