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
Interpretation of the covariance between random intercepts and slopes after mixed (multilevel analysis)Dear all, I am trying to estimate a model with a three-level hierarchical structure using STATA 16’…
Exploring Stata mapping toolkitDear All, I want to visualise trade data showing the links between regions. Something like this (won…
Extract coefficients and SE from stored estimatesI am looking for a way of extracting coefficients and standard errors(SE) after storing them. For ex…
File pathHello ! I am facing a problem after giving command to include file : . do "C:\Users\GP\AppData\Loc…
Creating a year variable in a longitudinal datasetHi All My dataset is longitudinal in the long format, and each individual has 5 rows of data with e…
Subscribe to:
Post Comments (Atom)
0 Response to Multiple Tasks in a Macro
Post a Comment