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
ReshapeHello I would appreciate if someone can tell me the command that would reshape my data from 201…
Conditional sum on STATAHi, I have a dataset with the following variables: - Brand (41 brands in total) - product identifie…
Mkmat for groups in a dataset for use with other matrix operationsHi Statalist: I do not have much experience writing code for Stata except for the routines with whic…
étude en données de panel.rsquared of fixed effectfrançais Hello, My name is Gibran. I am doing a panel data study on the causes of deforestation in U…
Oaxaca command not workingI am trying to run the oaxaca command and it keeps saying that it does not recognize it. Does anyone…
Subscribe to:
Post Comments (Atom)
0 Response to Local Vs. Global
Post a Comment