2.1 Creating crosswave files

The most basic panel data manipulation is to bring data from more than one time point into a single file. This typically involves matching individuals across waves.

Choose a wINDRESP file for a particular wave and load it, keeping only personal ID (PID) and wFIMN, individual monthly income:

SPSS syntax:

get file 's:\bhps\spss\dindresp.sav' /keep=pid,dfimn.
sort cases by pid.
save out='m:\dinc.sav'.
get file 's:\bhps\spss\eindresp.sav' /keep=pid,efimn.
sort cases by pid.
match files file='m:\dinc.sav'/file=*/by=pid.
missing values all (-9 thru -1).
corr dfimn efimn.

Stata syntax:

use pid dfimn using s:\bhps\stata\dindresp
sort pid
save m:\dinc, replace
use pid efimn using s:\bhps\stata\eindresp
sort pid
merge pid using m:\dinc

Extend this using other variables (refer to the class notes). Look at transition tables from wave to wave if you have categorical variables (e.g., wMASTAT, wJBSTAT), or wave to wave correlations with continuous variables. (The extension to multiple waves is straightforward, and is laid out in more detail below, section 4.1.1.)

Watch out for missing values, -9 to -1: these are not declared as missing and it is up to you to deal with them.



© Brendan T. Halpin (e-mail), GNU Free Documentation Licence