Skip to main content

Variable Search in the NLS Investigator

Tutorial objective and prerequisites

This tutorial consists of two sections:

  • Part 1 offers practical search strategies for finding topic-specific variables in the NLS Investigator.
  • Part 2 walks through the process of using NLS documentation to explore a research topic and locate the relevant variables in the NLS Investigator.

Knowledge assumed

This tutorial assumes a basic understanding of how to search for variables using the NLS Investigator. If you are new to the tool or would like a refresher, please review the NLS Investigator User Guide.

Background information about searching in the NLS Investigator:

Eight search methods are available in the NLS Investigator which can be combined using AND/OR logic operators:

  • Area of Interest: the main research area of the variable.
    • Pick from list
  • Word in Title: any word that appears in the variable title.
    • Pick from list
    • Enter search term
  • Question Text: any word that appears in the text of the question.
    • Enter search term
  • Question Name: a code assigned to identify each question, which gives the location of the variable in the questionnaire or identifies it as a created variable. When possible, question names are kept consistent across survey years for the same question.
    • Pick from list
    • Enter search term
  • Reference Number: abbreviated RNUM, a letter and number combination uniquely assigned to each variable.
    • Pick from list
    • Enter search term
  • Survey Year
    • Pick from list
  • Codebook: a search for any text appearing anywhere on the codebook page.
    • Enter search term
  • Variable Type: a search for variables defined by a specific variable type (may not be enabled for all cohorts).
    • Pick from list

Background information about key NLS documentation:

Each NLS cohort is accompanied by a comprehensive set of documentation that describes the survey content in detail. The three resources below are particularly helpful for determining what information has been collected and where to find it.

  1. Cohort-specific User's Guides offer detailed descriptions of survey content and serve as a valuable resource for understanding the topics covered in each cohort.
  2. Asterisk Tables are a useful reference for determining which topics were collected and the survey rounds in which the information was gathered.
  3. Questionnaires provide the survey questions as asked of respondents, along with eligibility criteria and skip patterns that govern which questions are asked based on respondents' characteristics and prior answers.

Part 1: Search tips and solutions for common problems

Click below to expand and collapse the sections.

Try one or more of the following strategies:

  • Use the "Word in Title" search with the "Pick from List" option rather than "Enter Search Term." The drop-down list contains every word that appears in a variable title and can help you identify terms used in NLS documentation.
  • When searching with "Word in Title," try related terms that may be used to describe the same concept. For example, search for "drink" instead of "alcohol" or "smoking" instead of "cigarettes."
  • When using "Word in Title," enter only the first part of a word in the "Enter Search Term" box. For example, entering "smok" will return variable titles containing "smoke," "smoking," or "smoked."
  • Use the "Codebook Search" option instead of relying solely on "Word in Title." Codebook Search looks for terms throughout the codebook page, including question text, response categories, and other documentation.
  • After finding a variable related to your topic, use the "Reference Number" search option to see whether related variables appear nearby in the dataset.
  • Be aware that some variables are not associated with a specific survey year and are instead classified as "Survey Year = XRND" (cross-round). XRND variables often summarize information across survey rounds, such as cumulative educational attainment or age-based measures.
  • Become familiar with the "Areas of Interest" categories described in the NLS User's Guides and available as a search option in the NLS Investigator. These categories can help you identify variables on broader topics.
  • If the Variable Preference Level is set to "Primary Variables" (the default setting), change it to "All Variables" to expand the number of variables included in your search results.

Try one or more of the following strategies to narrow your results:

  • Limit your search to one or two survey years. Variables are often repeated across survey rounds. Repeated variables typically share the same question name (in the NLSY97) and variable title (in all NLS cohorts). Once you locate a relevant variable, search by its question name or by a few distinctive words using the "Word in Title" search option to find it in additional survey years.
  • Sort your search results. Click a column heading to sort the results. Sorting by question name or variable title can make it easier to identify variables that repeat across survey years.
  • Limit your search to the first loop. 
    • Use the search option: 
      • Search Types: Question Name (enter search term), Operators: contains, Values: .01
    • Once you identify the variables you need, you can use the question name to quickly locate the corresponding variables in other loops.
  • Use "Enter Search Term" instead of "Pick from List." This allows you to search for an exact phrase, such as "hours worked" or "past calendar year," rather than entering individual words. Exact-phrase searches often produce more focused results.
  • Use exclusion searches. Depending on the search type, options such as "doesn't equal" or "doesn't contain" can help you exclude unwanted terms and quickly remove large groups of irrelevant variables from your results.

The best way to demonstrate this is with a couple of examples:

Does the NLSY97 contain questions about respondents' participation in high school athletics?

  • First, check the NLSY97 Asterisk Tables, NLSY97 User's Guide Topical Guide, and the first few rounds of NLSY97 Questionnaires, when the respondents were still in high school. These resources can help you quickly determine whether data on your topic are available. In this example, no information related to "high school athletics" is found in these sources. Continue to the next recommendation for additional search strategies.
  • Next, search the NLS Investigator using keywords such as "athletic" and related terms like "sport" and "football." To broaden your results, try using singular forms of words or partial word stems. 
    • Use the Codebook search option with the OR group operator, or run separate searches for each term. 
      • Example: 
        Search Types: Codebook, Operators: contains, Values: athletic
        Search Types: Codebook, Operators: contains, Values: sport
        Search Types: Codebook, Operators: contains, Values: football
    • Be sure to review all returned variables, as relevant items may appear farther down the results list. In this case, the search does not return information specifically related to "high school athletics." Continue to the next recommendation for additional search strategies.
  • Next try entering the Codebook search option with the AND group operator:
    • Example: 
      Search Types: Codebook, Operators: contains, Values: extra
      Search Types: Codebook, Operators: contains, Values: curricular
    • Once again, there are no results for this alternative search option.

At this point, you would be able to conclude that the NLSY97 does not ask questions about respondents' participation in high school sports or any extra-curricular activities for that matter. If you still have questions about whether a cohort was asked about a specific topic, please contact NLS User Services.

Does the NLSY97 have any information about respondents' personality type?

  1. First, check the NLSY97 User's Guide. In this example, there is no direct information about "personality type," even within the Attitudes section, where information on this topic would most likely appear. Continue to the next recommendation.
  2. Next, review the Asterisk Tables. Under Section H, "Attitudes, behaviors, and time use,"you will find that round 6 (2002 survey year) includes a series of questions about the "Youth's Perception of Own Personality Traits."
  3. Then, consult the round 6 questionnaire to view the exact questions. These items can be difficult to locate. They appear in the Self-Administered Questionnaire section. Searching the questionnaire for the word "trait" will take you to the beginning of the series at question YSAQ-282I. Reviewing the sequence reveals personality-related terms such as "agreeable" and "dependable" in the question text. You can use these terms to search in the NLS Investigator, or search by question name beginning with YSAQ-282 to locate the entire series of questions.
  4. Open the NLS Investigator and search using:
    • Search Types: Question Name (Pick from List), Operators: starts with, Values: YSAQ-2
      Search Types: Survey Year, Operators: equals, Values: 2002
    • Scroll through the results to find the sequence of variables related to personality traits.

When searching for core concepts such as demographics, annual work hours, or highest grade completed, start with the following selections as demonstrated in the Creating Search Criterion portion of the NLS Investigator Use Guide.

  • For the NLSY79:
    • Search Types: Area of Interest
    • Operators: equals
    • Values: key variables
  • For the NLSY79 Child/Young Adult:
    • Search Types: Area of Interest
    • Operators: equals
    • Values: child background
  • For the NLSY97:
    • Search Types: Variable Type
    • Operators: equals
    • Values: created variables
      or
    • Search Types: Word in Title
    • Operators: contains
    • Values: (enter or choose a term, such hours or grade)

In the NLSY79, the "Birth Record" Area of Interest contains raw survey data about respondents' children, while the "Fertility and Relationship History/Created" Area of Interest contains created variables that have been extensively cleaned and edited by survey staff. For most analyses, we recommend using the latter.

Part 2: Finding information using NLS documentation and the NLS Investigator

In Part 2, you will learn how to use NLS documentation to research a specific topic and identify the relevant variables in the NLS Investigator. A sample research question is used to illustrate each step of the process.

Example: Effect of marital status on labor supply (NLSY79)

Preview of steps

  • Step 1: Construct a list of concepts that you would like to measure.
  • Step 2: Check documentation to find information for Step 1 concepts and search for the appropriate variables in the NLS Investigator.

Step 1: Construct a list of concepts to measure

  1. Dependent variable
    • Hours worked in a calendar year
  2. Key independent variable
    • Current marital status
  3. Control variables
    • AFQT score
    • Year of birth
    • Race/ethnicity
    • Sex
    • Spouse labor supply
    • Educational attainment
    • Number of children

Step 2: Check and search

  1. Check documentation to find information for Step 1 concepts
  2. Search for the appropriate variables in the NLS Investigator

Note that the NLSY79 User's Guide and Asterisk Table will be particularly helpful here. They provide information on the topics of interest, describe the types of variables that may be available, and point to particular Areas of Interest and other information that will help you search for variables in the NLS Investigator.

  1. Dependent variable
    • Hours worked in a calendar year
      1. Read the entry on Work Experience in the NLSY79 Topical Guide. The created variables documentation indicates that a variable for the number of hours worked in the past calendar year is available for each survey round. These keywords provide a good starting point for locating the corresponding variables in the NLS Investigator.
      2. Search using the following criteria with the AND group operator:
        • Search Types: Area of Interest, Operators: equals, Values: key variables 
        • Search Types: Word in Title, Operators: contains, Values: hours 
        • Search Types: Word in Title, Operators: contains, Values: year
    • Note: With the Group Operator set to the default, AND, the search yields one variables per round called NUMBER OF HOURS WORKED IN PAST CALENDAR YEAR *KEY*

      variable search tab loaded with dependent var criteria

  2. Key independent variable
    • Current marital status
      1. Read the Topical Guide entry on Marital Status, Marital Transitions & Attitudes.  According to this section, the "Key Variables" Area of Interest includes created marital status variables for each interview date.
      2. Search using the following criteria with the AND group operator:
        • Search Types: Area of Interest, Operators: equals, Values: key variables 
        • Search Types: Word in Title, Operators: contains, Values: marital status
    • Note: With the Group Operator set to the default, AND, the search yields two variables for each round: MARITAL STATUS and MARITAL STATUS (COLLAPSED) where the categories of separated, divorced, remarried, and widowed are combined into the category: other.

      variable search tab loaded with independent var criteria

  3. Control variables can be searched in similar ways to the dependent and independent variables by changing the Search Criteria.
    • AFQT score
      1. Read the Topical Guide entry on Aptitude, Achievement & Intelligence Scores. Table 2 is very helpful. It shows that we should look under the "Profiles" Area of Interest, and even gives the reference numbers to look for. Of course, searching for the initials AFQT could work as well, since we are looking for a particular score.
      2. Search using the following criteria:
        • Search Types: Word in Title, Operators: contains, Values: AFQT
    • Year of birth
      1. See the Asterisk Table, Section A, Table 1 (NLSY79: Early formative influences and parental status variables by year) lists "Birth date" is available in 1979 and 1981 (RNUMs: R00003.00, R00005.00, R04101.00, R04103.00). Which variables to use is discussed in the Important information: Using age data note in the NLSY79 topical guide.
      2. Search using the following criteria with the AND group operator:
        • Search Types: Word in Title, Operators: contains, Values: birth 
        • Search Types: Word in Title, Operators: contains, Values: date
    • Race/ethnicity and Sex:
    • Spouse labor supply
      1. See the Asterisk Table, Section F, Table 6 (NLSY79: Marital and spouse characteristics variables by year) or the Topical Guide entry on Marital Status, Marital Transitions & Attitudes. In the latter, under "Spousal Characteristics," we find that weeks worked and hours worked during the past calendar year are among the available variables.
      2. Search using the following criteria with the AND group operator:
        • Search Types: Word in Title, Operators: contains, Values: spouse
        • Search Types: Word in Title, Operators: contains, Values: worked
        • Search Types: Area of Interest, Operators: equals, Values: marriage
        • Note: This search returns several variables, including NUMBER OF WEEKS WORKED BY SPOUSE and HOURS PER WEEK WORKED DURING WEEKS WORKED BY SPOUSE.
    • Educational attainment
      1. See the Topical Guide entry on Educational Attainment and School Enrollment. In the "data files" section, we find out that a yearly created variable for highest grade completed is found in the "Key Variables" Area of Interest.
      2. Search using the following criteria with the AND group operator:
        • Search Types: Word in Title, Operators: contains, Values: highest
        • Search Types: Word in Title, Operators: contains, Values: grade
        • Search Types: Area of Interest, Operators: equals, Values: key variables
        • Note: This search returns one created variable, HIGHEST GRADE EVER COMPLETED, which has been cleaned, standardized, and made consistent across survey years by survey staff.
    • Number of children
      1. See the Asterisk Table, Section G, Table 7 (NLSY79: Household and children variables by year) or the Topical Guide entry on Fertility. We can see that variables on this topic are available, and that the "Fertility and Relationship History/Created" Area of Interest may be a useful place to continue your search.
      2. Search using the following criteria with the AND group operator:
        • Search Types: Word in Title, Operators: contains, Values: number
        • Search Types: Word in Title, Operators: contains, Values: children
        • Search Types: Area of Interest, Operators: equals, Values: fertility and relationship history/created
        • Note: This search returns 62 variables, including the number of children ever born and number of bio/step/adopted children in household.

Using the NLS Investigator

Once your variable search is complete, tag the variables you want to include in your analysis to create a tagset. You can then extract your dataset using one of the available Download Options. See the NLS Investigator User Guide for additional assistance.