Hi all,
I'm currently attempting to ask Stata to code a variable as '1' if it meets several criteria, and 0 if it doesn't. Here's the code below, which may make more sense than my explanation:
"gen radicalright=0
replace radicalright=1 if (stack==3 country==1)"
Stata gives me the following error message when I run this:
"3country invalid name"
Any idea where I'm going wrong?
Many thanks for your help,
Tom
I'm currently attempting to ask Stata to code a variable as '1' if it meets several criteria, and 0 if it doesn't. Here's the code below, which may make more sense than my explanation:
"gen radicalright=0
replace radicalright=1 if (stack==3 country==1)"
Stata gives me the following error message when I run this:
"3country invalid name"
Any idea where I'm going wrong?
Many thanks for your help,
Tom
Comment