Skip past navigation to main part of page
 
Melbourne Institute Homepage
---

Creating Longitudinal Files

There are a number of ways users might want to create a balanced longitudinal file:

  • Wide file of responding persons – this is where we keep only people responding in all waves and put the variables for each wave next to each other.
  • Wide file of enumerated persons – this is where we keep only those people who were in responding households in all waves and the variables for each wave are put next to each other.
  • Long file of responding persons – this is where we keep only people responding in all waves and the information for each wave is stacked together (that is, there is a separate row of data for each wave of information for each person).
  • Long file of enumerated persons – this is where we keep only those people who were in responding households in all waves and the information for each wave is stacked together (that is, there is a separate row of data for each wave of information for each person).

Most users will probably want to restrict the files to only include respondents or people from responding households. A few users may also want to add people who have died or moved out of scope (depending on the research question they are answering).

Example SAS and SPSS programs to create balanced long files of responding persons are provided:

SAS program to create long longitudinal files

SPSS program to create long longitudinal files

The wide files are created by matching the responding or enumerated files for each wave together using xwaveid. An alternative way to strip off the first letter of the variable names using SAS is provided:

SAS macro to strip the first letter from the variable name

Some users may want to create an unbalanced panel – where you take all respondents or enumerated persons available at each wave (not just those that consistently respond or are consistently in responding households). An example STATA program to create an unbalanced panel and balanced panel is provided:

STATA program to create long longitudinal files

Example SAS, SPSS and STATA programs to create wide files are provided:

SAS program to create wide longitudinal files

SPSS program to create wide longitudinal files

STATA program to create wide longitudinal files

The longitudinal weights on the enumerated person file and the responding person file are for the full balanced panel of respondents and enumerated persons from wave 1 (i.e., across the first two, three... six waves). If you are constructing a balanced panel with different specifications, you should find a suitable weight in the longitudinal weights file. Out of scopes are treated as acceptable outcomes, so these people have weights applied as well.

 

top of pagetop of page

HILDA Contact us

Contact the University : Disclaimer & Copyright : Privacy : Accessibility