[DDI-users] Translation tools/processes from syntax files to DDICodebook

Adrian Dușa dusa.adrian at unibuc.ro
Wed Apr 28 05:37:41 EDT 2021


Hi Jessica,

The package DDIwR is designed to convert to and from all major statistical
software, plus DDI.
It can for instance convert from SPSS to Stata and the other way round,
including missing values.

It is also possible to extract all the metadata from any such data file
(SPSS, Stata, SAS and R) to create a DDI Codebook v2.5.

But that is about all it does automatically. Otherwise, additional
information can of course be added to the XML file using the already
existing R package xml2. Using this package, it is possible to query
individual XML nodes, or modify those nodes or even create new ones.
However, this is a command line experience, I am afraid the simplicity of
NESSTAR could only be matched by creating a similar Graphical User
Interface for the DDIwR package.

This is also possible, and not even that complicated, but I didn't yet have
the time to do something like this. For the moment, if you don't mind
writing a few lines of code, you can achieve everything you might imagine
in R.

I reckon that documenting conditional routing can hardly be automatic. This
is by definition a manual task, someone (preferably the original
researcher) needs to put that information somewhere. The GUI that I have in
mind would allow for this kind of information to be documented, and it
would also allow creating the research instrument to be exported to
virtually any type of survey tool, either out of the box of the tool is
already standard and established, or to be imported via a dedicated API.

I just need to make some time for this, the technology is already there.

Best wishes, I hope this helps,
Adrian

On Wed, Apr 28, 2021 at 10:48 AM Hrudey, E.J. <e.j.hrudey at vu.nl> wrote:

> Thanks for sharing your R package, Adrian, and for starting the
> conversation, Wendy.
>
>
>
> Re: the original question-I used NESSTAR and uploaded the data files I had
> (in this case SPSS, but it works with STATA too). NESSTAR automatically
> uploads the existing metadata from the dataset, but there is still a lot of
> manual work to do if the questionnaire had conditional questions/routing.
> NESSTAR is nice in that you can add additional information or include
> question text that is longer than the standard variable label, but
> everything is manual so it takes a lot of work.
>
>
>
> @Adrian-with your R package, is it designed solely to translate existing
> labeled data into a codebook or is it possible to add and modify the
> metadata (e.g. with NESSTAR there was the possible of providing additional
> information about routing)? And can is be used to convert data formats
> other than STATA?
>
>
>
> On a general note, after the time I spent working in NESSTAR and comparing
> it to Colectica, it seems to me it would be more efficient if the questions
> in a survey could be marked up at the level of the survey itself (to allow
> for capturing additional text or routing that cannot be readily included in
> the labels of the dataset variables). I think that’s what the Colectica
> Designer tool aims to do, but the problem is that while it allows you to
> design a survey in Designer and then export that marked-up survey to be
> uploaded into a survey tool, there are only a handful of survey tools that
> can utilize this exported marked-up survey. Unfortunately, it’s not so
> simple for my institution to just switch to another survey tool (we use
> Qualtrics), so I’m not sure how we can best create marked-up surveys that
> can be reused and that should make the process of creating a DDI codebook
> easier, without requiring researchers to create the survey two times: once
> in a DDI tool like Colectica and once in the survey tool itself.
>
> Has anyone else had this experience?
>
>
>
> Sincerely,
>
>
>
> Jessica
>
>
>
>
>
> *From: *<ddi-users-bounces at icpsr.umich.edu> on behalf of Adrian Dușa <
> dusa.adrian at unibuc.ro>
> *Reply-To: *Data Documentation Initiative Users Group <
> ddi-users at icpsr.umich.edu>
> *Date: *Friday, April 23, 2021 at 10:58 PM
> *To: *Data Documentation Initiative Users Group <ddi-users at icpsr.umich.edu
> >
> *Subject: *Re: [DDI-users] Translation tools/processes from syntax files
> to DDICodebook
>
>
>
> I have an R package that can do that out of the box. The command is as
> simple as:
>
> convert("yourfile.dta", to = "DDI")
>
>
>
> The latest development version depends on another R package called
> "haven", which (in its latest development version but yet not published on
> CRAN) can read and write Stata style defined missing values such as .a, .b
> etc.
>
> In the XML codebook file, they are automatically (and consistently across
> all variables) replaced with negative numbers such as -1, -2 etc.
>
>
>
> Both development versions can be installed from GitHub, using:
>
>
>
> library(remotes)
>
> install_github("tidyverse/haven")
>
> install_github("dusadrian/DDIwR")
>
>
>
> I'd be happy to be of assistance in case you need any help.
>
>
>
> I hope this helps,
>
> Adrian
>
>
>
> On Fri, Apr 23, 2021 at 9:23 PM Wendy Thomas <wlt at umn.edu> wrote:
>
> I had this question within another conversation recently and was wondering
> what people were using and if there were any new tools out there.
>
>
>
> "While I have your attention: what is the process of creating the DDI
> codebooks based on existing data sets? Suppose I have a labeled data set in
> Stata, what would I need to do to produce a DDI codebook XML file out if
> it? "
>
>
>
> Answer to the list. I'll compile and I'm sure others are interested.
>
>
>
> Wendy
>
>
>
> --
>
> Wendy L. Thomas                              Phone: +1 612.624.4389
>
> Data Access Core Director                 Fax:   +1 612.626.8375
>
> Minnesota Population Center             Email: wlt at umn.edu
>
> University of Minnesota
>
> 50 Willey Hall
>
> 225 19th Avenue South
>
> Minneapolis, MN 55455
>
> _______________________________________________
> DDI-users mailing list
> DDI-users at icpsr.umich.edu
> http://lists.icpsr.umich.edu/mailman/listinfo/ddi-users
>
>
>
>
> --
>
> Adrian Dusa
> University of Bucharest
> Romanian Social Data Archive
> Soseaua Panduri nr. 90-92
> 050663 Bucharest sector 5
> Romania
>
> https://adriandusa.eu
> _______________________________________________
> DDI-users mailing list
> DDI-users at icpsr.umich.edu
> http://lists.icpsr.umich.edu/mailman/listinfo/ddi-users
>


-- 
Adrian Dusa
University of Bucharest
Romanian Social Data Archive
Soseaua Panduri nr. 90-92
050663 Bucharest sector 5
Romania
https://adriandusa.eu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.icpsr.umich.edu/pipermail/ddi-users/attachments/20210428/488abad8/attachment-0001.html 


More information about the DDI-users mailing list