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
Reshape data wide to long for xtivregHello, Currently I have panel data in wide form with variables indicating the year at the end, (eg, …
Power calculations in stataI would like to use the stata power command, to estimate the smallest effect size I would be able to…
ANOVA error r(422); "could not determine between-subject basic unit; use bseunit() option" Using bseunit() option, but get this error anywayHello, I'm new to using the ANOVA command (it is not common in my field). A reviewer for a journal …
Data transformation from survey ratings to variablesHi! I am researching the effect of cosmetic combinations on the perception of leadership characteris…
'xtoverid' after multiple imputation in panel data?Hello there, I am a first time Stata user and am having a few problems. I already searched in this f…
Subscribe to:
Post Comments (Atom)
0 Response to Local Vs. Global
Post a Comment