Hi,
So I created a dummy variable by the following code:
gen YearGroup = 0
replace YearGroup = 1 if year>=2011
label define YearGroup_label 0 "Max MTR 2003-2010" 1 "Max MTR 2011-2018"
label values YearGroup YearGroup_label
Now I am trying to take the mean of another variable (which is MIT) by Region_Name and YearGroup but I get the error varlist not allowed
MIT
30
60.06
20
40
28
I used the following command:
egen mean_MIT_yearGroup = mean(MIT) by (Region_Name YearGroup)
but it gives me error. Can someone please help? Thank you.
Related Posts with Dummy Variable
High resolution graphs for publishingDear Users, I would like to ask you if do you know how to deal with graphs' resolution for scientif…
Estimating measures of income uncertaintyHi everyone, I have Italian panel data for 13 years and I have information on taxable income individ…
Find occurrences of string across multiple variablesHi, I want to find the amount of occurrences of a string variable across multiple variables by diff…
test for comparing two Poisson meansHi. I work with count data and the comparison of the two groups is the purpose of my study. My profe…
calculating yield to maturity for coupon bondsHi, I do a research on bond market. Searching on the net, I could not find any stata cammand which …
Subscribe to:
Post Comments (Atom)
0 Response to Dummy Variable
Post a Comment