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
Khb: command unrecognizedDear all, I run into this strange message: I have to run a decomposition for a non-linear model, wi…
MGARCH VCC Predict Conditional correlationHi, I am trying to estimate the conditional correlation using a bivariate MGARCH-VCC model (Tse and…
Listing a series of 10 max and 10 min values of a variable in stataHi I want to extract a list of my panel IDs named as "FI" and months/years named as "Time_period" h…
ReportingSpatial Duirbin Model Results obtained using xsmleDear all, I have conducted a SDM model using xsmle in Stata and obtained the following results: S…
Sample selection model for continous dependent variable.Dear Statalisters, A few questions have got me confused and I am sure most of you know the answers.…
Subscribe to:
Post Comments (Atom)
0 Response to Storing a command as a macro
Post a Comment