Dear James,
I think that in general one centers variables to make the
interpretation of the marginal effects, conditional on the averages,
easier.
Centering variables in a pane should be based on the means of all the
observations of the particular variables and never by groups. If you
deducted the means of groups, you are carrying out a within
transformation, which will lead to a fixed effects model, which is
certainly not your goal of centering the variables.
You can do this by:
egen meanvar = mean(var)
gen centered_var = var - meanvar
This may not work quite right if there is missing data or if you are
otherwise only analyzing a subset of the data.
I started teaching centering because my students were making
statements like "once you control for female*income, the effect of
female becomes insignificant." But centering also makes the results
more intelligible.
The next time I teach this, I think I am going to place some emphasis
on using the margins command on graphing relationship. Centering
tells you things about "average" people, but a graph can give you a
broader range and doesn't require that you alter the variables first.
With regards to computational issues I have seen instances where even
Stata chokes on an X^2 term, e.g. year^2. Rescaling the variable or
centering it seems to help.