Home > database >  How to read plain fixed width SPSS data with control syntax files in R
How to read plain fixed width SPSS data with control syntax files in R

Time:10-19

The PISA datasets for 2000-2012 are SPSS format txt files with fixed width data columns, there are accompanying SPSS control files (syntax files?) that tell you how to parse the data. I can't seem to find a way for R to ingest this data, I've looked at haven and foreign, but haven't had any luck.

Example SPSS txt fixed width file:

https://www.oecd.org/pisa/pisaproducts/INT_Sch06_Dec07.zip

Example SPSS control file:

https://www.oecd.org/pisa/pisaproducts/PISA2006_SPSS_school.txt

Full datasets

CodePudding user response:

You can use the EdSurvey R package to analyze PISA data. It's designed for large-scale studies such as PISA and handles lots of the 'grunt' work for data prep and weighting. The downloadPISA function will retrieve the data from OECD and the readPISA function works to parse the syntax scripts and prep the data into the EdSurvey environment for analysis.

  • Related