Hello,
I am having issues in using the generate or gen command. I get the message "variable2 already defined". I am just giving the basic set up of the code (which I have inherited
here at our firm).
------------code summary-------------------
foreach ... in $...{
run a regression across 50 cities between city and nation
//then I generate a new variable let's call it variable2
by city: gen variable2 = x1-x2 if time>1990q1
----end of code summary--------------------------
Then I get the following error even though variable2 was never defined prior to this line of code.
"variable2 already defined"
Any idea how to fix this? Thanks in advance.
Umair
I am having issues in using the generate or gen command. I get the message "variable2 already defined". I am just giving the basic set up of the code (which I have inherited
here at our firm).
------------code summary-------------------
foreach ... in $...{
run a regression across 50 cities between city and nation
//then I generate a new variable let's call it variable2
by city: gen variable2 = x1-x2 if time>1990q1
----end of code summary--------------------------
Then I get the following error even though variable2 was never defined prior to this line of code.
"variable2 already defined"
Any idea how to fix this? Thanks in advance.
Umair
Comment