-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consolidating metadata for a collection of files #4
Comments
Hello Florent, I only got three .DTA files using your script, but the question is still the same.
This version of the DDIwR package contains all elements from the DDI Codebook 2.6, which you can browse (see for instance I tried to play with your files and for the moment I am getting errors (don't yet know why, but I will investigate). |
Hello Adrian, thank you for your reply. I was refering to the demographic and health surveys in my example, because it is to my knowledge the standardized household survey that is the most widely used around the world (in more than 90 countries), because the DHS program provide "mock-up" survey datasets for tests (downloaded in the reproducible example above) and because the DDIs produced with these survey are used by many online catalogues (NADA or others), such as the International Household Survey Network. See for instance a recent DHS survey entry on IHSN catalogue that was created with a DDI Codebook 2.5 (hundreds others can be found by searching "DHS" on this catalog). The DDI codebook can be downloaded here, but it seems to have a different structure than what I get from DDIwR: We have a docDscr, a stdyDscr, one fileDscr per stata file, and a dataDscr that includes one entry per variables and a files variable that refers to the ID of one of the fileDscr. I can try to figure it out myself, but I think that it would serve common use cases to provide some guidance on how to prepare a multifile DDI with your package. I think that it would also be useful to have some handy functions to populate the docDscr and stdyDscr sections. |
Returning a bit to this issue, it is still open and will likely stay open for a "little" while. It requires me writing out a guide (either intro, as in getting started, or probably that plus more advanced topics). But there actually are handy functions to populate docDscr and stdyDscr. In fact, the latest functions allows one to write the entire codeBook using these functions, see for instance: The DDI Codebook elements are standard, so the structure of the XML file produced by DDIwR has to be compatible (impossible not) to the IHSN files. The reason why they seem different must be the fact that IHSN codebook files are completely documented, while the ones (automatically) produced by DDIwR thoroughly document the variables in the dataDscr element, but there is no other information about the study. The other elements of the Codebook have to be created manually (using the above commands), or using a script that make use of these commands to populate the Codebook from a database. |
Congratulations and many thanks for this great tool @dusadrian !
I undestand how to use the
convert
function to produce DDI files with a one to one correspondence between source files (in Stata for instance) and xml files. But I can't figure out how to consolidate it. Here is one reproducible example using the survy models proposed by DHS:Here I have 4 stata files that correspond to different questionnaire sections or different formatting of the same data. I would like to make a consolidated DDI file out of them. Here are two questions:
How can I use DDIwR to convert them to children of a parent common object?
How can use DDIwR to add general metadata to document the Overview, scope & coverage, sampling... and other attributes common to all the files?
Thanks in advance for your feedback.
The text was updated successfully, but these errors were encountered: