Hello,
I am constructing a pooled dataset from the demographic and health surveys (DHS).
Currently, I have all my data stored in one huge folder, in which each file represents a data for a country, say, Albenia 2008, Albenia 2014; Kenya 2003, Kenya 2008.
I have harmonized all the datasets to ensure that the variables are equivalent. The next stage is to append them to each other.
However, there are a set of operations that I need to do on each dataset before trying to append/pool them. Some of these are computing and developing new variable weights (for denormalization processes), creating country level summaries (for example, GNP, HIV prevalence etc).
At the moment, i call each dataset, execute the commands for that dataset, close it, and open the next etc. One way is to write a major do file that will call each dataset, run it, save the output and move on to the next. I think there can be a more efficient way of doing this - a sort of loop that will input and output a new dataset with the changes.
I would appreciate some thoughts on whether this is possible/feasible.
cheers, Yy
Related Posts with Execute same syntax across multiple stata datasets
Graph line with values for only a few groups over timeHi, I want to graph the development of the number of houses of the type "allmännyttan" (publicly ow…
OLS regression where one independent variable is a rare eventHello all, I am performance ols regression, something like: regress y i.x1##i.x2 x3 x4 x5, cluster…
Managing workflow with the global macroHello Stata users, I am trying to use the global macro to switch between subfolders. For instance, …
SchemesI have just upgraded from 15 to 16. Is there any way to import my schemes from 15 without having to …
Keep last 4 digits of a numeric variableHi everyone, I would like to ask you how can I keep the last 4 digits of the variable date. It is a …
Subscribe to:
Post Comments (Atom)
0 Response to Execute same syntax across multiple stata datasets
Post a Comment