I have entered a categorial variable (country) to a regression and I coded their values in Effect coding (0, 1, -1). In other words, I put them in the regression to get the 'beta' values of the coefficients as in the post-regression contrast (compared to the grand mean). I did the analysis twice, each time another country got the value -1 in order to getting data also about the comparison country.

I ended up getting results of the two regressions with the same coefficients, standard deviations, and significance. Only the value of the beta came out different the two times I ran the regressions. I don't understand how it can be! To my understanding, beta is simply the standardized coefficient.

I attach both outputs, marked a random country, but you can see that in both outputs all the values of all countries are completely identical except the 'beta' values. Array Array

Questions:
A. How can such a situation arise? How is the beta calculated in stata ?
B. How, however, can I get the correct 'beta' values for a categorical variable in the effect coding for comparison to the grand mean? Is there any way to do this in Stata?

Thanks!