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
"relative improvement over chance" - modified Kappajust wondering if anyone has, or knows of, a program to calculate the "relative improvement over cha…
Automating command argumentHi All, I am looking for a way to automate writing a command so that it adapts if I change the cova…
Non-negative continuous right-skewed (zero-inflated) panel data analysisCurrently I am using Code: xtreg, fe vce(cluster ID) in Stata/MP 14.2 with panel data with 42 entit…
Checking for Assumptions before running a fe panel data model (Data Diagnostics)Hi, I am using panel data with 820 companies across 19 years (i.e. 15580 observations) and each obs…
Error with outreg2 appendDear everybody, I would like to ask for help. I use the outreg2 command, but there is an error like…
Subscribe to:
Post Comments (Atom)
0 Response to Multiple Tasks in a Macro
Post a Comment