I know how to write simpel code of a macro to complete one task:
e.g. drop obervations whose var1 value is missing.
global drop_missing "drop if var1 =."
But how can I write simpel code of a macro to complete multiple tasks?
e.g. drop obervations whose var1 value is missing, then drop those whose var2 value is missing, then drop those whose var3 value is missing.
global drop_missing "drop if var1 =. drop if var2 =. drop if var3 =."
The above line of code is definitively wrong. How can I write this code?
I do not know how to properly phrase this question, so I cannot search and find any previous Q&As.
Thank you for any advice/comments!
Related Posts with Multiple Tasks in a Macro
Baseline Balance - T-Test - Missing ValuesI want to create a balance table on STATA. It is a baseline dataset conducted as a part of an RCT. H…
Choosing the Correct Panel Data ModelHi there, I am estimating a fiscal reaction function in dynamic form (lagged dependent variable) and…
Standard errors with new -xthdidregress- command in Stata 18I am trying to understand how -xthdidregress- estimates standard errors for difference-in-difference…
Help with stcrreg / competing regressionDear All, I am trying to perform a competing regression analysis but receiving the following error.…
bar chart multiple global ifsHello, I am working on my masters thesis and am having some troubles visualizing the data as I woul…
Subscribe to:
Post Comments (Atom)
0 Response to Multiple Tasks in a Macro
Post a Comment