Administrative functions > Creating and maintaining Quanvert databases > Setting up panel studies for Quanvert Text > Flipping the waves
 
Flipping the waves
Each record in a wave must have a unique serial number, and the data file must be sorted in ascending order on that serial number. Flip uses the serial number to determine which record in each wave belongs to each respondent, so it is important that a respondent’s record has the same serial number in all waves in which it is present. Don’t worry if a respondent drops out of the panel; flip can cope with gaps in serial numbers. However, the serial number must be flipped as a text variable called serial. Use namedalpha in the Quantum run to create the serial number text variable; for example, if the serial number is in c(1,5):
namedalpha c(1,5);varname=serial;vartext=Serial number
Note For more information about namedalpha, see Checking the Quantum program file.
In a levels job, there must be a serial number for each record at each level at which the user may want to cross-reference records. For example, if there are three levels, household, person and purchase, the user may want to track a household or person through the various waves, but is less likely to want to track the same purchase across all waves.
The serial number of the top level must be flipped as a text variable called serial1. Serial numbers for lower levels can be flipped as text variables called serialn, where n is a number corresponding to the level’s position in the levels file. In the example below, the serial number for records at person level is flipped as serial2, while records at trip level is flipped as serial4.
hhold cards=1,2,3
person cards=4,5 <hhold
purch cards=6,7 <person
trip cards=8 <person
To flip text variables in a levels database, insert the statement:
namedalpha col_spec;anlev=level_number [;options]
where level_number is the level number as described above, and all other parameters are as described for namedalpha in Checking the Quantum program file.
The serial number for lower levels is a composite number which includes the serial numbers of all higher levels as well as the level’s own unique number. Thus, if the household serial number is in c(1,5) and the person serial number is in c(6,7), the full serial number for the person level is columns 1 to 7, not just columns 6 to 7:
namedalpha c(1,7);anlev=2;varname=serial2;vartext=Serial number
See also
Setting up panel studies for Quanvert Text