Hello Statalist,
I am writing a long .do file that uses the same command at many different points:
keep if geo_id == "1600000US0606028" | geo_id == "1600000US0612048" | geo_id == "1600000US0614260" | geo_id == "1600000US0618986" | geo_id == "1600000US0618996" | geo_id == "1600000US0619022" | geo_id == "1600000US0636434" | geo_id == "1600000US0636448" | geo_id == "1600000US0636452" | geo_id == "1600000US0640354" | geo_id == "1600000US0629112" | geo_id == "1600000US0646660" | geo_id == "1600000US0652302" | geo_id == "1600000US0653224" | geo_id == "1600000US0655184" | geo_id == "1600000US0655254" | geo_id == "1600000US0659500" | geo_id == "1600000US0672156" | geo_id == "1600000US0678456" | geo_id == "1600000US0678596" | geo_id == "1600000US0683085" | geo_id == "1600000US0685208"
It takes up a lot of space and looks messy, so I'd like to be able to use a macro (or some other method) to store this exact line of command so that I can reference it in the .do file without having to copy and paste the long command line.
Is this possible?
Thanks,
Ian
Related Posts with Storing a command as a macro
Assigning a result from summarize to a variableHi everyone, I want to sum a variable and then assign its highest value +1 to an observation. The v…
Income Elasticity with Logit ModelHi, This is my model: Code: logit smoker lninc Where lninc, is the log transformation of the in…
regression over different number of observationsHi everyone I would like to regress each variable separately on one independent variable. Furthermo…
STATA SE 13, how to get r square after mi estimateDear STATA users, is there a way to obtain R square (model fit statistics) after conducting mice? I…
Individual-invariant variables in FEHello, I am sorry if this topic has come up before - however, I did searched for an answer and faile…
Subscribe to:
Post Comments (Atom)
0 Response to Storing a command as a macro
Post a Comment