Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I would like to import the World Value Survey data file into Mathematica, but it's only given in spss, sas or stata formats, which are statistical analysis softwares format I think.

I can't get to import these files in Mathematica, they are not recognized.

I've found a Wolfram executable that should allow me to import SAS files but it can't make it work on Linux. Have you already been able to import such files in Mathematica?

share|improve this question

This question has an open bounty worth +50 reputation from rhermans ending in 5 days.

This question has not received enough attention.

    
No luck so far. I have submitted the data file to Wolfram|Alpha, I think it would be a great addition to their search engine. –  Sulli Oct 25 '13 at 8:10
    
cran.r-project.org/web/packages/sas7bdat/vignettes/sas7bdat.pdf has some information on reverse enginerring the sas7bdat binary format if you want to do any tinkering with BinaryReadList. Looks pretty horrible though. If you can get hold of a .dta file, according to this you can use RLink and get R to do the import for you first. –  Histograms yesterday
    
@rhermans Which file exactly would you like to import? Could you edit the original question and add a direct link to it? What should be in the file? –  MarcoB yesterday
    
@rhermans The data (at least what I found on that website) is also available in R (labeled "rdata"). R is free and can be called from Mathematica. Also with R you can import data from SPSS and some versions of Stata (and SAS as is mentioned above). –  Jim Baldwin 8 hours ago
1  
Looks like the quickest way is to download R and use this code here to export to CSV. Since you only need to do it as a once off there is very little point in messing around with Rlink. –  Gordon Coale 6 hours ago

1 Answer 1

You are right - those formats are for statistical software packages.
I've noticed in Big Data discussions that Mathematica does not want to extend the range of acceptable data formats leaving the job to third-party software. I would recommend to use software like 'Stat/Transfer', which is a usual practice for such tasks. If you take data from WVS, say Stata's .dta which I prefer, you may easily transfer it to .CSV or .DAT file.
Just take an option ASCII - Delimited as shown below. enter image description here
Then .csv is imported to Mathematica as usual.
Another option is to use ASCII Fixed Format + All Programs which will produce .dat file also easily imported to Mathematica (I've checked both cases).

share|improve this answer
1  
Thanks for the answer, 'Stat/Transfer' unfortunately its a paid software. –  rhermans 6 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.