Exporting data from CSPro to Stata

Discussions about tools to complement CSPro data processing
Forum rules
New release: CSPro 8.0
Post Reply
elenaba
Posts: 5
Joined: June 20th, 2019, 12:20 pm

Exporting data from CSPro to Stata

Post by elenaba »

Hi all,

a while ago I posted about our problem of exporting a dataset with variables over 32 characters long to Stata. The survey is split in two parts, and the problem of variable names being too long occurs only in part 2 of the survey. Dictionary 1 gives the structure of the data collected in part 1 of the survey, while dictionary 2 gives the structure of the whole survey (part 1 + part 2), and the CSPro datafiles for part 2 contain the ID variable (respondent code) that uniquely identifies each observation.

Our coworkers have tried to solve the issue of the variable names being too long by exporting the cspro data for each record separately to Stata, and changing the variable names in the Stata dofile that is created in the exporting process. We then want to run the Stata dofiles for each record separately to obtain stata datafiles that we can save.

We are able to export the CSPRo data to a stata datafile this way, but the datafile contains far too few observatons. After exporting, we receive an error message that almost all observations have 'bad structure' and there are many of the following messages:
*** Case [21050107041001] has 1 messages (1 E / 0 W / 0U)
E 10008 Required Record or Group Q_5_4_TAILLE_DU_MENAGE not found

Does anyone have any idea of what is going wrong? Is the problem related to the use of two dictionaries?

Any help would be incredibly appreciated!
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Exporting data from CSPro to Stata

Post by aaronw »

The dictionary has Q_5_4_TAILLE_DU_MENAGE marked as required, but it doesn't exist in the data file. As an example, this can happen if you added the record later in data collection. I would mark it as Not Required and try exporting the data.
Post Reply