Objective: To link the respondent’s first cohabiting partner to the partner’s characteristics using information from the created event history arrays, the household and non-resident rosters, and the partner roster. In particular, this tutorial shows you how to find the age of the respondent’s first cohabiting partner in the NLSY97 data set.
Knowledge Assumed: This tutorial assumes that you already know:
- how to use the NLS Web Investigator to create a tag set that saves your variables and to extract data. If you need assistance with the NLS Web Investigator before starting this tutorial you should see "How to use the NLS Investigator."
- how to use rosters to link individuals to their characteristics. To learn more about using rosters, see the tutorial on "Linking Roster Items across Rounds in the NLSY97."
Background Reading:
- Understand event history arrays. To find the respondent’s 1st cohabiting partner’s age, you should first understand the event history arrays that have been created to help you use the NLSY97 data. The "Marital and Marriage-Like Relationships" section of the user's guide describes the event history variables that describe marital status. We’ll use the monthly array MAR_PARTNER_LINK to find the id of the 1st partner.
- Understand Household Composition, including marriage-like relationships. You will also need to know what characteristics are collected for spouses and partners and where those pieces of information are collected. Cohabitation variables can be found in the in the marriage and cohabitation section of the questionnaire, as well as in the household rosters. Consequently, characteristics of spouses and partners could be located in one of three parts of the survey, depending on when, relative to his/her interview, the respondent lived with the partner.
For more information, read the "Household Composition" and "Marital and Marriage-Like Relationships" sections of the NLSY97 user's guide.
- For partners with whom the respondent lived prior to the Round 1 interview, the partner’s characteristics are found on the non-resident roster.
- For partners with whom the respondent is living at the date of the interview, the partner’s characteristics are found on the household roster.
- For partners with whom the respondent lived between interviews, the partner’s characteristics are collected as part of the marriage/cohabitation section of the questionnaire.
- Understand the ID variables. There are two id variables for partners. Partners who appear on the non-resident or household rosters have valid values for both id variables: (1) id (round and loop in the marriage section when reported) and (2) uid (unique id) that let the user identify that person across rosters and rounds. Those partners with whom the respondent lived between rounds may have a valid value only for the id variable and not for the uid.
Preview of Steps
- Find and tag the relevant variables.
- Tag age and ID from Household Roster
- Tag age and ID from non-resident Roster
- Tag age and ID from partner Roster
- Tag Mar_Partner_link event history array variables
- Extract selected variables.
- Find partner id for the 1st partner.
- Split 1st partner id into round number and loop number.
- Locate partner on partner roster collected in marriage and cohabitation section and link partner to his/her age.
- For partners who were in the household use the unique id to find the partner on the household roster and link partner to his/her age.
- For non-resident partners from prior to the date of the NLSY97 Round 1 interview, get age from the non-resident roster in Round 1.
Review the output of the program
Review additional information about this tutorial
Step 1: Use NLS Web Investigator to find and tag the relevant variables
First, be aware you’ll want to pull data from all rounds of the survey because the respondents could have first cohabitated in any of these rounds.
Second, in this example, I will require that respondents are interviewed in Round 10—that lets us use only the event history data created in Round 10. When working on your own projects, you can decide your own criteria. For example, must the sample members have interviewed after a certain age?
- Let’s start with the variables from the household roster. You will need both the unique ids (UIDs) and ages of household members. In Round 1, the variables on the household roster begin with “HHI2”. First search on Question Name (pick from list) starts with "HHI2_U" and you’ll get the unique id’s for all household members in Round 1. Next, if you search on Question Name (pick from list) starts with "HHI2_A" and Word in Title (enter search term) contains "age", you will get the age of all household members in Round 1.
Next, you’ll need the unique ids and age from the household rosters for Rounds 2 and higher. If you search using Question Name (pick from list) starts with "HHI_UI", you’ll get all the variables that contain the unique id numbers for the household members in Rounds 2 and higher. Next, if you change the filter to Question Name (pick from list) starts with "HHI_AG", the list of variables that result contains the ages and the estimated ages of the household members. For this tutorial, we are not going to use the information in the estimated ages variables (asked only when the respondent can’t report the age of the household member), so search one more time keeping the previous filter and including an additional one where Word in Title (enter search term) does NOT contain "estimated".
To see the list of variables tagged from the household rosters, click here.
- Next, you’ll pull the relevant variables from the non-resident roster. To find the unique ids of members of the non-resident roster, search with Question Name (pick from list) starts with "NONHHI", Word in Title (enter search term) contains "unique", and Year=1997. Tag these variables. Next, to get the ages of the members of the non-resident roster, keep the filters for NONHHI and 1997, and add a new filter where Word in Title (enter search term) contains "age". Click here to see the list of variables.
- Next, you’ll tag the partner characteristics from the partner rosters. You’ll need to tag both id and uid variables. The ids (round and loop on the partner roster) match to the values on the MAR_PARTNER_LINK array. The uids match to the household roster variables. To find id and unique id (UID) on the partner roster, search with Question Name (pick from list) starts with "PARTNE" and Word in Title (enter search term) contains "id". This will bring up partner ids and partner uids. You’ll want to tag all of these variables. Next to find age from the partner roster, search with Question Name (pick from list) starts with "YMAR-3" and Word in Title (enter search term) contains "age". This brings up more variables than only the age of the partners. If you refine your search, by keeping the filters, and adding Word in Title (enter search term) contains "start", you’ll be closer to only those variables that you want. This 2nd search brings up the age of the partner and the estimated age of the partner when the couple started living together. We can further limit our search by adding a filter of Word in Title (enter search term) does NOT contain "estimated". Click here to review the list of variables.
Now we have all the age and id variables for the partners.
- Last, you’ll need the variables that tell you with whom the respondent first cohabitated. The MAR_PARTNER_LINK monthly arrays provide the id of the partner in each month that the respondent is cohabitating. The partner id lets you link to partner roster variables. To find these search Question Name (enter search term) contains "MAR_PARTNER_LINK". Tag the variables from April 1994 through May of 2007. To see the list of selected variables, click here.
Step 2: Extract selected variables
In step 1, you created a tagset of variables from the household rosters across rounds, the Round 1 non-resident roster, and Round 10 mar_partner_link array. Now you have partner ids, ages, and information about when the respondent first cohabitated and with whom. Now it’s time to run an extract to create a data set and corresponding SAS/SPSS/Stata programs. Note that this tutorial uses SAS programming code, but the same logic applies to other statistical software packages. Note that the variables used in the program examples are based on question names from the NLSY97, in most cases they are altered to reflect the survey year and be readable by the software. My rename statement is available here.
A version of the programming steps in this tutorial using Stata is also available here.
Step 3: Find the partner id for the first partner
To find the id for the first partner, you will look at the element of the MAR_PARTNER_LINK array for the first element that contains a partner id. For instance, for respondent id=7525, the first partner id (501) is is found in MAR_PARTNER_LINK_02_01 (February 2001).
In Round 10, the MAR_PARTNER_LINK array is available for the months April 1994 to May 2007.
Using SAS, sample code that is provided below shows how to find the id of the first partner. The code first creates an array with all the MAR_PARTNER_LINK variables. It then loops through the array until SAS finds the first element in which the array contains a partner id. When the array first contains a value for partner id, the value of MAR_PARTNER_LINK is the id for the respondent’s first partner. I made two new variables, called (1) firstpid, that takes the value of the 1st partner id and (2) month1cohab, that indicates the number of the element in array when the respondent first cohabitated.
Array MAR_PARTNER_LINK (163)
MAR_PARTNER_LINK_01_94 MAR_PARTNER_LINK_02_94 MAR_PARTNER_LINK_03_94 MAR_PARTNER_LINK_04_94 MAR_PARTNER_LINK_05_94 MAR_PARTNER_LINK_06_94 MAR_PARTNER_LINK_07_94 MAR_PARTNER_LINK_08_94 MAR_PARTNER_LINK_09_94 MAR_PARTNER_LINK_10_94 MAR_PARTNER_LINK_11_94 MAR_PARTNER_LINK_12_94
MAR_PARTNER_LINK_01_95 MAR_PARTNER_LINK_02_95 MAR_PARTNER_LINK_03_95 MAR_PARTNER_LINK_04_95 MAR_PARTNER_LINK_05_95 MAR_PARTNER_LINK_06_95 MAR_PARTNER_LINK_07_95 MAR_PARTNER_LINK_08_95 MAR_PARTNER_LINK_09_95 MAR_PARTNER_LINK_10_95 MAR_PARTNER_LINK_11_95 MAR_PARTNER_LINK_12_95
MAR_PARTNER_LINK_01_96 MAR_PARTNER_LINK_02_96 MAR_PARTNER_LINK_03_96 MAR_PARTNER_LINK_04_96 MAR_PARTNER_LINK_05_96 MAR_PARTNER_LINK_06_96 MAR_PARTNER_LINK_07_96 MAR_PARTNER_LINK_08_96 MAR_PARTNER_LINK_09_96 MAR_PARTNER_LINK_10_96 MAR_PARTNER_LINK_11_96 MAR_PARTNER_LINK_12_96
MAR_PARTNER_LINK_01_97 MAR_PARTNER_LINK_02_97 MAR_PARTNER_LINK_03_97 MAR_PARTNER_LINK_04_97 MAR_PARTNER_LINK_05_97 MAR_PARTNER_LINK_06_97 MAR_PARTNER_LINK_07_97 MAR_PARTNER_LINK_08_97 MAR_PARTNER_LINK_09_97 MAR_PARTNER_LINK_10_97 MAR_PARTNER_LINK_11_97 MAR_PARTNER_LINK_12_97
MAR_PARTNER_LINK_01_98 MAR_PARTNER_LINK_02_98 MAR_PARTNER_LINK_03_98 MAR_PARTNER_LINK_04_98 MAR_PARTNER_LINK_05_98 MAR_PARTNER_LINK_06_98 MAR_PARTNER_LINK_07_98 MAR_PARTNER_LINK_08_98 MAR_PARTNER_LINK_09_98 MAR_PARTNER_LINK_10_98 MAR_PARTNER_LINK_11_98 MAR_PARTNER_LINK_12_98
MAR_PARTNER_LINK_01_99 MAR_PARTNER_LINK_02_99 MAR_PARTNER_LINK_03_99 MAR_PARTNER_LINK_04_99 MAR_PARTNER_LINK_05_99 MAR_PARTNER_LINK_06_99 MAR_PARTNER_LINK_07_99 MAR_PARTNER_LINK_08_99 MAR_PARTNER_LINK_09_99 MAR_PARTNER_LINK_10_99 MAR_PARTNER_LINK_11_99 MAR_PARTNER_LINK_12_99
MAR_PARTNER_LINK_01_00 MAR_PARTNER_LINK_02_00 MAR_PARTNER_LINK_03_00 MAR_PARTNER_LINK_04_00 MAR_PARTNER_LINK_05_00 MAR_PARTNER_LINK_06_00 MAR_PARTNER_LINK_07_00 MAR_PARTNER_LINK_08_00 MAR_PARTNER_LINK_09_00 MAR_PARTNER_LINK_10_00 MAR_PARTNER_LINK_11_00 MAR_PARTNER_LINK_12_00
MAR_PARTNER_LINK_01_01 MAR_PARTNER_LINK_02_01 MAR_PARTNER_LINK_03_01 MAR_PARTNER_LINK_04_01 MAR_PARTNER_LINK_05_01 MAR_PARTNER_LINK_06_01 MAR_PARTNER_LINK_07_01 MAR_PARTNER_LINK_08_01 MAR_PARTNER_LINK_09_01 MAR_PARTNER_LINK_10_01 MAR_PARTNER_LINK_11_01 MAR_PARTNER_LINK_12_01
MAR_PARTNER_LINK_01_02 MAR_PARTNER_LINK_02_02 MAR_PARTNER_LINK_03_02 MAR_PARTNER_LINK_04_02 MAR_PARTNER_LINK_05_02 MAR_PARTNER_LINK_06_02 MAR_PARTNER_LINK_07_02 MAR_PARTNER_LINK_08_02 MAR_PARTNER_LINK_09_02 MAR_PARTNER_LINK_10_02 MAR_PARTNER_LINK_11_02 MAR_PARTNER_LINK_12_02
MAR_PARTNER_LINK_01_03 MAR_PARTNER_LINK_02_03 MAR_PARTNER_LINK_03_03 MAR_PARTNER_LINK_04_03 MAR_PARTNER_LINK_05_03 MAR_PARTNER_LINK_06_03 MAR_PARTNER_LINK_07_03 MAR_PARTNER_LINK_08_03 MAR_PARTNER_LINK_09_03 MAR_PARTNER_LINK_10_03 MAR_PARTNER_LINK_11_03 MAR_PARTNER_LINK_12_03
MAR_PARTNER_LINK_01_04 MAR_PARTNER_LINK_02_04 MAR_PARTNER_LINK_03_04 MAR_PARTNER_LINK_04_04 MAR_PARTNER_LINK_05_04 MAR_PARTNER_LINK_06_04 MAR_PARTNER_LINK_07_04 MAR_PARTNER_LINK_08_04 MAR_PARTNER_LINK_09_04 MAR_PARTNER_LINK_10_04 MAR_PARTNER_LINK_11_04 MAR_PARTNER_LINK_12_04
MAR_PARTNER_LINK_01_05 MAR_PARTNER_LINK_02_05 MAR_PARTNER_LINK_03_05 MAR_PARTNER_LINK_04_05 MAR_PARTNER_LINK_05_05 MAR_PARTNER_LINK_06_05 MAR_PARTNER_LINK_07_05 MAR_PARTNER_LINK_08_05 MAR_PARTNER_LINK_09_05 MAR_PARTNER_LINK_10_05 MAR_PARTNER_LINK_11_05 MAR_PARTNER_LINK_12_05
MAR_PARTNER_LINK_01_06 MAR_PARTNER_LINK_02_06 MAR_PARTNER_LINK_03_06 MAR_PARTNER_LINK_04_06 MAR_PARTNER_LINK_05_06 MAR_PARTNER_LINK_06_06 MAR_PARTNER_LINK_07_06 MAR_PARTNER_LINK_08_06 MAR_PARTNER_LINK_09_06
MAR_PARTNER_LINK_10_06 MAR_PARTNER_LINK_11_06 MAR_PARTNER_LINK_12_06
MAR_PARTNER_LINK_01_07 MAR_PARTNER_LINK_02_07 MAR_PARTNER_LINK_03_07 MAR_PARTNER_LINK_04_07 MAR_PARTNER_LINK_05_07 MAR_PARTNER_LINK_06_07 MAR_PARTNER_LINK_07_07;do k=1 to 163;
if MAR_PARTNER_LINK(k) gt 0 and firstpid eq . then do; month1cohab=k; firstpid=MAR_PARTNER_LINK(k);
end;
Step 4: Split 1st partner id (firstpid) into round number and loop number
The values of the MAR_PARTNER_LINK variables are the round followed by the partner number within that round. For instance, for sample member 7525, the MAR_PARTNER_LINK value in February of 2001 is 501, indicating that this partner is first listed in Round 5. You’ll need to look in the partner roster in this round. To do this more efficiently, you need to split the partner id into its two components—round and number within that round.
In SAS, code that lets you split the two pieces of information can be:
withinrnd=mod(firstpid,100); /* this command yields the remainder from dividing firstpid by 100*/
round=(firstpid-withinrnd)/100;
Step 5: Locate partner on partner roster collected in marriage and cohabitation section and link partner to his/her age
Using SAS, I define 3 arrays: (1) lists the partners’ ids, (2) lists the partners’ unique ids, and (3) lists the partners’ ages. The first array, named pid, is made up of the variables that indicate the partner’s id. A match between the value of “firstpid” and the value in this array that is needed to find the partner’s age. The second array, named puid, is made up of the variables that provide the unique id of the respondent’s partners. The third array, named page, is made up of the variables that provide the age of the respondent’s partners—for partners who were not living in the respondent’s household at the time of the interview. All of three arrays have 40 elements; that is, 10 rows (one for each round of the data) and 4 columns (4 is the maximum number of partners that any respondent reports in a round). In some rounds, all respondents report fewer than 4 partners. In that case, there is no variable for the 4th partner’s age or unique id. I use “blank” as a placeholder variable to fill out the array in these cases.
The sample code shows how to loop through the arrays and find the 1st partner. The 1st partner will show up for the first time in the row of the array pid is equal to the variable “round” that you created in step 4. You will need to search over the elements of this array to find the partner id that is equal to “firstpid”. At this same location in the puid array, you will find the 1st partner’s unique id and at the same location in the page array, you will find the 1st partner’s age. You will create 2 new variables in the loop below, “partuid” which is the 1st partner’s unique id and “partage” which is the 1st partner’s age (again for partner’s not living in the household at the date of the interview).
blank=.;
array pid (10,4)
partners_id_1_97 partners_id_2_97 blank blank
partners_id_1_98 partners_id_2_98 partners_id_3_98 blank
partners_id_1_99 partners_id_2_99 blank blank
partners_id_1_00 partners_id_2_00 partners_id_3_00 partners_id_4_00
partners_id_1_01 partners_id_2_01 partners_id_3_01 partners_id_4_01
partners_id_1_02 partners_id_2_02 partners_id_3_02 blank
partners_id_1_03 partners_id_2_03 partners_id_3_03 blank
partners_id_1_04 partners_id_2_04 partners_id_3_04 blank
partners_id_1_05 partners_id_2_05 partners_id_3_05 partners_id_4_05
partners_id_1_06 partners_id_2_06 partners_id_3_06 blank;array puid (10,4)
partners_uid_1_97 partners_uid_2_97 blank blank
partners_uid_1_98 partners_uid_2_98 partners_uid_3_98 blank
partners_uid_1_99 partners_uid_2_99 blank blank
partners_uid_1_00 partners_uid_2_00 partners_uid_3_00 partners_uid_4_00
partners_uid_1_01 partners_uid_2_01 partners_uid_3_01 partners_uid_4_01
partners_uid_1_02 partners_uid_2_02 partners_uid_3_02 blank
partners_uid_1_03 partners_uid_2_03 partners_uid_3_03 blank
partners_uid_1_04 partners_uid_2_04 partners_uid_3_04 blank
partners_uid_1_05 partners_uid_2_05 partners_uid_3_05 partners_uid_4_05
partners_uid_1_06 partners_uid_2_06 partners_uid_3_06 blank;array page (10,4)
YMAR3200_01_97 YMAR3200_02_97 blank blank
YMAR3200_01_98 YMAR3200_02_98 YMAR3200_03_98 blank
YMAR3200_01_99 YMAR3200_02_99 blank blank
YMAR3200_01_00 YMAR3200_02_00 YMAR3200_03_00 YMAR3200_04_00
YMAR3200_01_01 YMAR3200_02_01 YMAR3200_03_01 YMAR3200_04_01
YMAR3200_01_02 YMAR3200_02_02 YMAR3200_03_02 blank
YMAR3200_01_03 YMAR3200_02_03 YMAR3200_03_03 blank
YMAR3200_01_04 YMAR3200_02_04 YMAR3200_03_04 blank
YMAR3200_01_05 YMAR3200_02_05 YMAR3200_03_05 YMAR3200_04_05
YMAR3200_01_06 YMAR3200_02_06 YMAR3200_03_06 blank;** for partners no longer in hh, link to characteristics **;
**link to uid **;
do k=1 to 10;
if round eq k then do;
do l=1 to 4;
if pid(k,l) eq firstpid then do;
partuid=puid(k,l); partage=page(k,l);
end;
end;
end;
end;
Step 6: For partners who were in the household use the unique id to find the partner on the household roster and link partner to his/her age
Thus far, you have found the age of the respondent’s first partner for partners with whom the respondent lived between rounds, but who were no longer living with the respondent at the date of the interview. The characteristics of partners with whom the respondents were living at the time of the interview are available on the household roster for that round.
You’ll use the partner’s unique id to identify him or her on the household roster. To do this make the “hhuid” array of household unique id’s. There are up to 17 household members in some Round 1 households. That is the largest household size across rounds, so make the arrays 10 rows (one for each round) by 17 columns (largest household size).
The sample code uses the “round” variable that you created in step 5 to find the round in which the partner is first reported by the respondent. Then check the household unique id’s for that round until you find the one that is the same as the partner’s unique id. At that same location in the “hhage” array, you’ll find the 1st partner’s age.
array hhuid (10, 17)
HHI2UID01_97 HHI2UID02_97 HHI2UID03_97 HHI2UID04_97 HHI2UID05_97
HHI2UID06_97 HHI2UID07_97 HHI2UID08_97 HHI2UID09_97 HHI2UID10_97 HHI2UID11_97 HHI2UID12_97 HHI2UID13_97 HHI2UID14_97 HHI2UID15_97 HHI2UID16_97 HHI2UID17_97
HHIUID01_98 HHIUID02_98 HHIUID03_98 HHIUID04_98 HHIUID05_98 HHIUID06_98 HHIUID07_98 HHIUID08_98 HHIUID09_98 HHIUID10_98 HHIUID11_98 HHIUID12_98 HHIUID13_98 HHIUID14_98 blank blank blank
HHIUID01_99 HHIUID02_99 HHIUID03_99 HHIUID04_99 HHIUID05_99 HHIUID06_99 HHIUID07_99 HHIUID08_99 HHIUID09_99 HHIUID10_99 HHIUID11_99 HHIUID12_99 HHIUID13_99 HHIUID14_99 blank blank blank
HHIUID01_00 HHIUID02_00 HHIUID03_00 HHIUID04_00 HHIUID05_00 HHIUID06_00 HHIUID07_00 HHIUID08_00 HHIUID09_00 HHIUID10_00 HHIUID11_00 HHIUID12_00 HHIUID13_00 HHIUID14_00 blank blank blank
HHIUID01_01 HHIUID02_01 HHIUID03_01 HHIUID04_01 HHIUID05_01 HHIUID06_01 HHIUID07_01 HHIUID08_01 HHIUID09_01 HHIUID10_01 HHIUID11_01 HHIUID12_01 HHIUID13_01 HHIUID14_01 HHIUID15_01 HHIUID16_01 blank
HHIUID01_02 HHIUID02_02 HHIUID03_02 HHIUID04_02 HHIUID05_02 HHIUID06_02 HHIUID07_02 HHIUID08_02 HHIUID09_02 HHIUID10_02 HHIUID11_02 HHIUID12_02 HHIUID13_02 blank blank blank blank
HHIUID01_03 HHIUID02_03 HHIUID03_03 HHIUID04_03 HHIUID05_03 HHIUID06_03 HHIUID07_03 HHIUID08_03 HHIUID09_03 HHIUID10_03 HHIUID11_03 HHIUID12_03 HHIUID13_03 blank blank blank blank
HHIUID01_04 HHIUID02_04 HHIUID03_04 HHIUID04_04 HHIUID05_04 HHIUID06_04 HHIUID07_04 HHIUID08_04 HHIUID09_04 HHIUID10_04 HHIUID11_04 HHIUID12_04
blank blank blank blank
HHIUID01_05 HHIUID02_05 HHIUID03_05 HHIUID04_05 HHIUID05_05 HHIUID06_05 HHIUID07_05 HHIUID08_05 HHIUID09_05 HHIUID10_05 HHIUID11_05 HHIUID12_05 HHIUID13_05 blank blank blank blank
HHIUID01_06 HHIUID02_06 HHIUID03_06 HHIUID04_06 HHIUID05_06 HHIUID06_06 HHIUID07_06 HHIUID08_06 HHIUID09_06 HHIUID10_06 HHIUID11_06 HHIUID12_06 HHIUID13_06 HHIUID14_06 blank blank blank
;array hhage (10, 17)
HHI2AGE01_97 HHI2AGE02_97 HHI2AGE03_97 HHI2AGE04_97 HHI2AGE05_97
HHI2AGE06_97 HHI2AGE07_97 HHI2AGE08_97 HHI2AGE09_97 HHI2AGE10_97 HHI2AGE11_97 HHI2AGE12_97 HHI2AGE13_97 HHI2AGE14_97 HHI2AGE15_97 HHI2AGE16_97 HHI2AGE17_97
HHIAGE01_98 HHIAGE02_98 HHIAGE03_98 HHIAGE04_98 HHIAGE05_98 HHIAGE06_98 HHIAGE07_98 HHIAGE08_98 HHIAGE09_98 HHIAGE10_98 HHIAGE11_98 HHIAGE12_98 HHIAGE13_98 HHIAGE14_98 blank blank blank
HHIAGE01_99 HHIAGE02_99 HHIAGE03_99 HHIAGE04_99 HHIAGE05_99 HHIAGE06_99 HHIAGE07_99 HHIAGE08_99 HHIAGE09_99 HHIAGE10_99 HHIAGE11_99 HHIAGE12_99 HHIAGE13_99 HHIAGE14_99 blank blank blank
HHIAGE01_00 HHIAGE02_00 HHIAGE03_00 HHIAGE04_00 HHIAGE05_00 HHIAGE06_00 HHIAGE07_00 HHIAGE08_00 HHIAGE09_00 HHIAGE10_00 HHIAGE11_00 HHIAGE12_00 HHIAGE13_00 HHIAGE14_00 blank blank blank
HHIAGE01_01 HHIAGE02_01 HHIAGE03_01 HHIAGE04_01 HHIAGE05_01 HHIAGE06_01 HHIAGE07_01 HHIAGE08_01 HHIAGE09_01 HHIAGE10_01 HHIAGE11_01 HHIAGE12_01 HHIAGE13_01 HHIAGE14_01 HHIAGE15_01 HHIAGE16_01 blank
HHIAGE01_02 HHIAGE02_02 HHIAGE03_02 HHIAGE04_02 HHIAGE05_02 HHIAGE06_02 HHIAGE07_02 HHIAGE08_02 HHIAGE09_02 HHIAGE10_02 HHIAGE11_02 HHIAGE12_02 HHIAGE13_02 blank blank blank blank
HHIAGE01_03 HHIAGE02_03 HHIAGE03_03 HHIAGE04_03 HHIAGE05_03 HHIAGE06_03 HHIAGE07_03 HHIAGE08_03 HHIAGE09_03 HHIAGE10_03 HHIAGE11_03 HHIAGE12_03 HHIAGE13_03 blank blank blank blank
HHIAGE01_04 HHIAGE02_04 HHIAGE03_04 HHIAGE04_04 HHIAGE05_04 HHIAGE06_04 HHIAGE07_04 HHIAGE08_04 HHIAGE09_04 HHIAGE10_04 HHIAGE11_04 HHIAGE12_04 blank blank blank blank blank
HHIAGE01_05 HHIAGE02_05 HHIAGE03_05 HHIAGE04_05 HHIAGE05_05 HHIAGE06_05 HHIAGE07_05 HHIAGE08_05 HHIAGE09_05 HHIAGE10_05 HHIAGE11_05 HHIAGE12_05 HHIAGE13_05 HHIAGE14_05 HHIAGE15_05 HHIAGE16_05 HHIAGE17_05
HHIAGE01_06 HHIAGE02_06 HHIAGE03_06 HHIAGE04_06 HHIAGE05_06 HHIAGE06_06 HHIAGE07_06 HHIAGE08_06 HHIAGE09_06 HHIAGE10_06 HHIAGE11_06 HHIAGE12_06 HHIAGE13_06 HHIAGE14_06 blank blank blank
;
do k=1 to 10;
if k eq round then do;
do l=1 to 17;
if partuid gt 0 and partuid eq hhuid(k,l) and partage le 0 then do;
partage=hhage(k,l);
end;
end;
end;
end;
Step 7: For non-resident partners from prior to the date of the NLSY97 Round 1 interview, get age from the non-resident roster in Round 1
There is one last possible location to find the age of the respondent’s first partner—on the Round 1 non-resident roster.
The structure is very similar to that encountered when we used the partner roster or the household roster above. We create 2 arrays: (1) contains the unique ids of all key non-residents that get rostered onto the Round 1 non-resident roster, “nruid” and (2) contains the age of those on the non-resident roster.
Because we are only checking the Round 1 non-resident roster, our arrays have only one row. The longest non-resident roster in Round 1 has 23 people on it, thus we have 23 variables in the NLSY97 that tell unique id, and 23 for age (and other characteristics) of the members of the non-resident roster. Consequently, the arrays used here have 23 elements.
If the variable we made for the 1st partner’s unique id (partuid) has a value between 200 and 300, then that partner is on the Round 1 non-resident roster. The first line of the sample code below checks this condition and only executes the lines that loop through the elements in the array if the 1st partner is on the Round 1 non-resident roster. The sample code then checks to find the 1st partner’s unique id, and if found fills in the variable “partage” with the corresponding age in the array “nrage”.
array nruid (23)
NONHHIUID_01-NONHHIUID_23;array nrage (23)
NONHHIAGE_01-NONHHIAGE_23;if partuid gt 200 and partuid lt 300 then do;
do l=1 to 23;
if partuid eq nruid(l) and partage le 0 then do;
partage=nrage(l);
end;
end;
end;
Output
You’ve made a variable that tell you the age of respondent’s first partner, ‘partage.’
Partage is defined for 4499 observations, has a mean value of 21.6059124, and a standard deviation of 4.2393980.
Additional Information
- Up until Round 9, cohabitation was collected only for opposite sex couples. Beginning in Round 9, the NLSY97 began collecting spells of cohabitation including those with same-sex partners.
- Note that the timing of the age of the 1st partner differs for partners currently living in the household and those who are no longer living in the household. For partners currently living in the household, the respondent reports their age in the household section at the date of the interview. For partners no longer living with the respondent, the respondent reports their age when the couple started living together.
- The variable CV_FIRST_COHAB_MONTH will not necessarily match the information in the event history arrays. Different rules are applied when constructing the created variable versus the event history array.
Extensions: What might be more relevant is the difference in age between the respondent and his or her first partner. This requires a few more steps but is easy to figure out. The respondent’s month and year of birth are collected as part of the survey, KEY!BDATE_M and KEY!BDATE_Y. For respondents, whose partner’s age is reported as of the date that the couple began living together, you can calculate the respondent’s age at that point: (168+month1cohab)-(KEY!BDATE_Y-1980)*12+ KEY!BDATE_M) is the respondent’s age in months at that point. Note that 168+month1cohab will give you the month of first cohabitation from the event history variables. A created variable is available (CV_FIRST_COHAB_MONTH), but the value recorded in this variable will not necessarily match the event history. Note you would need to take the integer of this age, since the partner’s age is reported in years. For respondents, whose partner’s age is reported as of the date the interview, you can use the respondent’s age at the interview. The difference between the respondent’s age and the 1st partner’s age can now easily be calculated.