Hi everyone! I'm a grad student with a few years of experience with Stata. In all my courses that use Stata, I never really understood the difference between a local and global macro. From the limited knowledge I do know, local stores string or numerical values that can be later used to have a very clean do-file. And from what I understand, global does the same thing, but applies to the whole program instead of specific instances within the do file.
This is how I imagine it would be in a do-file:
global proj regress1
- - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
local desc age educ female publications
regress citation `desc', vsquish
- - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
export $proj-01.do
log close
Any clarification would be great!
Related Posts with Local Vs. Global
Stata runs very slow when estimating mixed models in a multiple imputed databaseDear Statalisters, I am using mixedin Stata 13 to assess the effect of a treatment on four different…
Stata runs very slow when estimating mixed models in a multiple imputed databaseDear Statalisters, I am using mixedin Stata 13 to assess the effect of a treatment on four different…
longitudinal dataI would be very pleased if someone can provide me references on how to claen longitudinal data. Than…
merging two year database company keys with one year observations databaseHi all, I would like to have an answer regarding the following topic. I want to match observations f…
How do i get the mean of all the seperate regressions?Hey, I have the problem that I have multiple regressions of years from 1963 to 2004 and I want the …
Subscribe to:
Post Comments (Atom)
0 Response to Local Vs. Global
Post a Comment