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
Long form dataHi I have data in Stata I want to convert this into long formate, please clear input LATNUM LONGN…
Stack bar graph with cumulative on secondary axis as line graph Array I want to make the following graph using Stata. Could anyone please help …
Table of comparative summary statisticsHi. I am looking to table of momparative summary statistics. I have 3 categorical variables. The HE…
Help with reshaping and assigning column names and labelsFor the below sample dataset, I would like to reshape the data to wide format such that there are th…
PPML - log of dependent variableHello Statalist, I am running the gravity model of trade at the product level. So first I generate…
Subscribe to:
Post Comments (Atom)
0 Response to Local Vs. Global
Post a Comment