Working with harmonized Variables

This exercise shows you how to work effectively with versioned and harmonized SOEP variables. Please note that the new SOEP versioning and harmonizing concept has only been available since SOEP-Core v34 and only applies to the original SOEP-Core data in long format.

Create an exercise path with four subfolders:

../_images/uebungspfade.png

Example:

  • H:/material/exercises/do

  • H:/material/exercises/output

  • H:/material/exercises/temp

  • H:/material/exercises/log

These are used to store your script, log files, datasets, and temporary datasets. Open an empty do-file and define your paths with globals:

1***********************************************
2* Set relative paths to the working directory
3***********************************************
4global AVZ 	"H:\material\exercises"
5global MY_IN_PATH "\\hume\rdc-gen\consolidated\soep-long\soep.v34"
6global MY_DO_FILES "$AVZ\do\"
7global MY_LOG_OUT "$AVZ\log\"
8global MY_OUT_DATA "$AVZ\output\"
9global MY_OUT_TEMP "$AVZ\temp\"

The global “AVZ” defines the main path. The main paths are subdivided using the globals “MY_IN_PATH”, “MY_DO_FILES”, “MY_LOG_OUT”, “MY_OUT_DATA”, “MY_OUT_TEMP”. The global “MY_IN_PATH” contains the path to your ordered data.

1.) Differences in Response Options

Variables are versioned and harmonized because the response options have changed over time.

../_images/Harmonisierung_01.png
../_images/Harmonisierung_02.png

The variable plb0038_v1 was obtained from a simple yes/no question between 1992 and 2004. Since 2005, new response options have been added. The individual questionnaires from 2004 and 2005 show these differences. Through the versioning of the variable plb0038, this difference is recognizable to the data user when tabulating the variable. The variable label also shows the beginning and end of the period in which the question was asked differently.

1use "$MY_IN_PATH\pl.dta"
2tab plb0038_v1
3tab plb0038_v2
../_images/Harmonisierung_03.png
../_images/Harmonisierung_04.png

The variable plb0038_v1 is recoded during the harmonization process and written into a new variable, plb0038_h, together with plb0038_v2. The harmonized version of the variable should cover the survey period from 1992 to 2014 and should be usable.

1tab plb0038_h
2tabstat plb0038_v1 plb0038_v2 plb0038_h, by(syear)
../_images/Harmonisierung_05.png
../_images/Harmonisierung_06.png

2.) Differences in Coding of Response Options

Variables are versioned and harmonized because the coding of the response options has changed over time. Since the values of certain response options can change, the various wave-specific variables cannot be integrated easily into a variable in long format. The variable must be appropriately harmonized to be useable.

../_images/Harmonisierung_07.png
../_images/Harmonisierung_08.png

From 1994 to 2004, the question about “job change” was asked in the individual questionnaire as a category question with six response options. The order of the response options changed in 2005.

1tab plb0284_v1
2tab plb0284_v2
../_images/Harmonisierung_09.png
../_images/Harmonisierung_10.png

In addition to the different order of the response options, the coding order also changed. The data are stored in the wave-specific “raw” datasets with different coding and are contained in the variables plb0284_v1 and plb0284_v2. To use the variable for all survey years, it is necessary to harmonize the different versions. The variable plb0284_v1 is recoded (recode (1=1)(2=2)(3=3)(4=6)(5=4)(6=5)) and then written together with plb0284_v2 as plb0284_h. The new variable plb0284_h is created by the harmonization process.

1tab plb0284_h
2tabstat plb0284_v1 plb0284_v2 plb0284_h, by(syear)
../_images/Harmonisierung_11.png
../_images/Harmonisierung_12.png

3.) Content Differences in the Questions.

Variables are versioned when questions were asked differently in different years but the content belongs together. If the content or wording of the question changes, the wave-specific variables cannot easily be integrated into a long variable.

../_images/Harmonisierung_13.png
../_images/Harmonisierung_14.png

In the 2001 individual questionnaire, respondents were asked whether they had ever received an inheritance. In 2017, this question was worded differently: respondents were asked whether they had received an inheritance in the last 15 years. The questions are similar but cover different time periods. Therefore, the variable is not harmonized but made available as versioned variables. Data users have to decide whether or not to use the variables in the same way.

1tab plc0375_v1 
2tab plc0375_v2
../_images/Harmonisierung_15.png
../_images/Harmonisierung_16.png

4.) Change of Question Type.

Variables are versioned and harmonized when questions were asked differently in different years, for example, first as a question with multiple response options and later as a question with a single response option. The possibility to provide multiple answers in certain years makes it difficult to integrate the wave-specific variables into a variable in long format.

../_images/Harmonisierung_17.png
../_images/Harmonisierung_18.png

When comparing the question on scholarships in the individual questionnaires from 2011 and 2012, it appears that there should be no differences in the variables. Nevertheless, the two questions seem to have been asked differently and stored differently in the raw datasets. This results in several versioned variables.

1tab plg0015_v1
2tab plg0015_v2
3tab plg0015_v3
4tab plg0015_v4
../_images/Harmonisierung_19.png
../_images/Harmonisierung_20.png
../_images/Harmonisierung_21.png
../_images/Harmonisierung_22.png

As you can see, the variable was asked from 2007 to 2011 as a category question with three response options. As a result, respondents could only give one answer. Since 2012, the question has used binary items. It is quite possible that a respondent gave more than one answer. The harmonized version of the variable integrates the binary items from plg0015_v2, plg0015_v3, and plg0015_v4 into the harmonized version plg0015_h. The coding of the variable plg0015_v1 is used as the generation framework. In addition, the harmonization proposal takes into account the problematic multiple answers with the value four.

1plg0015_h
2tabstat plg0015_v1 plg0015_v2 plg0015_v3 plg0015_v4 plg0015_h, by(syear)
../_images/Harmonisierung_23.png
../_images/Harmonisierung_24.png

5.) Euro harmonisation

Variables are versioned and harmonized because they are metric and were asked as DM amounts before the introduction of the euro. For the long version of the variable, metric variables based on different currencies in different years are harmonized as euro amounts.

Most of the variables harmonized in the long datasets are amounts of money. Before the introduction of the euro, such information was collected in DM.

../_images/Harmonisierung_25.png
../_images/Harmonisierung_26.png

Euro harmonisation involves DM amounts being multiplied by the exchange rate so that the harmonized version of the variable represents euro amounts.

1list pid syear plc0013_v1 plc0013_h if pid==7006001 & syear==2001
2tabstat plc0013_v1 plc0013_v2 plc0013_h, by(syear)
../_images/Harmonisierung_27.png
../_images/Harmonisierung_28.png

Last change: Dec 04, 2024