Suppose you have dataset containing many variables where you have performed some analyses using only a small number of the variables. Now it is time to upload the data and .do file to a replication archive (Dataverse etc.) for replication purposes. You don't want to upload the entire dataset, but only the relevant variables; specifically, you want to give users a dataset on which they will able to run your .do file containing your analyses, which possibly includes the creation of new variables--but no unnecessary variables.
Is there an efficient way to keep (or otherwise identify) only those variables in a dataset that are referred to in a given .do file (DVs, IVs, weights, in "if conditions", etc.)--but not those that are created within the .do file?
This is not so difficult to do manually, but it would be cool if there's a way automate it.
Related Posts with Is there a way to keep only variables referred to in a given .do file?
How to extract rar files with stata?How to extract rar files with stata?For example,I can use unzipfile to extract the zip file.What abo…
Creating yearly data from retrospective questions: Survival analysisDear Statlisters, I have retrospective questions about the employment status and the year of the st…
How to extract rar files with stata?How to extract rar files with stata?For example,I can use unzipfile to extract the zip file.What* ab…
Instrumenting a Lagged Dependent VariableHello all, I was curious if someone code help me with Stata code in instrumenting a lagged dependen…
create individual identifiers numbered from 0 upwardsHi, I need to create a new variable "ID" from a existing variable "Value", i have been trying with …
Subscribe to:
Post Comments (Atom)
0 Response to Is there a way to keep only variables referred to in a given .do file?
Post a Comment