Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Blaise to Stata


From   Phil Schumm <[email protected]>
To   [email protected]
Subject   Re: st: Blaise to Stata
Date   Fri, 21 Oct 2011 10:03:50 -0500

On Oct 21, 2011, at 9:34 AM, Matthew White wrote:
> I'm using the CAI (computer-assisted interviewing) program Blaise, and I'm trying to import Blaise databases into Stata. (I'm using Stata 11.2 SE.) Has anyone done this before? Blaise can export to ASCII, but even variable names are lost. Blaise can also export to XML, but the resulting .xml file isn't readable using -xmluse- in Stata 11.2, and when I convert it to an Excel XML spreadsheet, variable and value labels are lost. Any suggestions?


I've never used Blaise, but I just looked at their website, and under "Capabilities" they list "Data export for statistical or database packages."  If that doesn't include Stata, then it almost surely includes SAS, in which case your easiest (and probably best) option would be to export the data in SAS format, and then use Stat/Transfer to translate the data into a Stata-format dataset.

If, for some reason, you want to work with the XML export, then you'll need to spend some time coming up to speed with XSLT (http://www.w3schools.com/xsl/).  This is not too difficult, and if the XML file contains all of the information you need (and assuming it follows the applicable standards), then you can probably generate an ASCII file containing the raw data and one or more dictionary and do-files to read them into Stata and format them appropriately (e.g., construct and apply value labels) without doing too much work.  However, as I said, the first option (i.e., going through SAS or equivalent) is probably what you're looking for here.


-- Phil


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index