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
U-testHELLO EVERYONE, I run the PMG estimators for the quadratic model and the results show that positive …
xtscc command for robust standard errors in unbalanced panels (autoregressive model)Dear all, I am currently trying to estimate a dynamic panel model using the xtscc command to provid…
How to output random-intercepts and random-slope information to Excel properly?Hi All, My question: Would you know why the random-effects portions of my (i) random-intercept only…
t-statistic and survey dataHello, I would like to perform a t-statistic test for differences in percentages. Below, I provide …
Troubleshooting a random-intercept modelHi All, My question: Would you have an idea why my random-effects model is reporting a much lower #…
Subscribe to:
Post Comments (Atom)
0 Response to Dummy Variable
Post a Comment