Dear Mr. Weiss,
Thanks for your reply! You are right---it should be -foreach-- rather
than --local--.
What I meant and actually used is using --foreach--to standardize all
the variables. I don't know why I wrote into -local--. Thanks!
I think I kind of find why the results given by the two methods are
different. It maybe is due to missing values. That is, for some groups
, there are missing values for some years and for some indepent
variables.
------------------------------
group year y var1 var2 var 3 var4
1 1981 1 1 missing 0 1
1 1982
1 1983
2 1981
2 1982
3 1981
3 1982
3 1983
------------------------------------
For the first observation, it's included in the way "standardizing
varaibles first" because y , var1,var3-4 included this observation.
But it's excluded from the way "using beta option directly".
So, can I underdtand that it is an alternative way to get beta
coefficents by standardized variables first and then use the regular
commands? This is the question I'm interested in.
Thanks a lot!
Mandy
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/