Example Data Sets


Download data



ACTIVE (Advanced Cognitive Training for Independent and Vital Elderly), 1999-2001 [United States] was a multisite randomized controlled trial conducted at six field sites with New England Research Institutes (NERI) as the coordinating center. The field sites included the University of Alabama at Birmingham, Hebrew Rehabilitation Center for the Aged in Boston, Indiana University, Johns Hopkins University in Baltimore, Pennsylvania State University, and the University of Florida/Wayne State University (Detroit). The primary aim of the trial was to test the effects of three distinct cognitive interventions -- previously found to be successful in improving elders' performance on basic measures of cognition under laboratory or small-scale field conditions -- on measures of cognitively demanding daily activities. Trainings consisted of an initial series of ten group sessions followed by four-session booster trainings at one and three years. The three cognitive interventions focused on memory, executive reasoning, and speed of processing. The design included a no-contact control group. Participants were assessed at baseline, immediately after training, and annually thereafter. A total of 2,832 older adults were enrolled in the trial, and 2,802 were included in the analytical sample. Twenty-six percent of the participants were African American.

There are 13 variables in this data set.

  • site: a total of 6 sites
  • age
  • edu: years of eduction
  • group: there are four groups - control group and three other training groups (memory, reasoning, and speed)
  • booster: whether received booster training
  • sex: 1 Male 2 Female
  • reason: reasoning ability
  • ufov: useful field of view variable
  • hvltt: Hopkins Verbal Learning Test total score at time 1
  • hvltt2: Hopkins Verbal Learning Test total score at time 2
  • hvltt3: Hopkins Verbal Learning Test total score at time 3
  • hvltt4: Hopkins Verbal Learning Test total score at time 4
  • mmse: Mini-mental state examination total score

The head of the data is given below:

> usedata('active')
> head(active)
  site age edu group booster sex reason ufov hvltt hvltt2 hvltt3 hvltt4 mmse
1    1  76  12     1       1   1     28   16    28     28     17     22   27
2    1  67  10     1       1   2     13   20    24     22     20     27   25
3    6  67  13     3       1   2     24   16    24     24     28     27   27
4    3  78  13     3       1   2     NA   23    19      3     NA     NA   25
5    5  72  16     1       1   2     33   16    35     34     32     34   30
6    4  69  12     4       0   2     30   16    35     29     34     34   28


Jobe, J. B., Smith, D. M., Ball, K., Tennstedt, S. L., Marsiske, M., Willis, S. L., ... & Kleinman, K. (2001). ACTIVE: A cognitive intervention trial to promote independence in older adults. Controlled clinical trials, 22(4), 453-479.


Religious data

Download data


Recruitment of participants was conducted through four universities: a private university in the West, a private university in the Midwest, and public university in the East, and a public university in the South. Each university granted IRB approval for conducting the study. Participants were recruited through the psychology department subject pools at each university, as well as flyers posted on department bulletin boards. In all cases, individuals were directed to a sign-up webpage. This page was an online consent form that included the details of the study as well as buttons they were to click to indicate their willingness to participate. Those who agreed to participate were then taken to a page where they provided their contact information (including an email address). Email addresses for those enrolled in the study were imported into Qualtrics, the software program used for designing and distributing the survey. A few days after enrolling in the study, participants were sent an email that included a link to a baseline survey. This survey included a number of demographic questions as well as a series of trait measures of variables of interest to the research team. Then, a few days after that participants started receiving an email every day with a link to a daily survey that included a series of state measures pertaining to “this last day.” They received these daily emails for the next 50 days, with each daily survey being identical in nature. These daily survey links were sent in the evenings, and each link was only good for 24 hours.

Compensation was provided in a three different ways. For completing the baseline survey participants who were currently enrolled in psychology courses received extra credit. Participants were also compensated based on the number of daily surveys they completed. They were paid 1 dollar per day for the first 20 daily surveys completed, 2 dollars per day for the next 20, and 3 dollars per day for the last 10 (in other words, there was a total of 90 dollars possible if they completed all 50 surveys). Lastly, 10 Amazon.com gift certificates of 100 dollars each were awarded through a raffle. Individuals received one raffle ticket for each 10 surveys they completed (these did not need to be consecutive). To conduct the raffle, participant ID numbers were entered into a random number generator (one time for each ticket received).

The initial sample for the study was N = 146. However, some people only completed the baseline survey, and some people only completed a small number of the daily surveys. For the present student, given the complexity of the analyses, we identified those who had data on the daily surveys for at least 21 days.


All of the measures for the present study were self-report, and were completed on a daily basis for 50 days depending on the individual completion rate). Each measure asked participants to report on their behaviors, thoughts, or emotions during the “last day.”

Daily religious activities. Respondents were first presented a web page with a list of 16 religious activities (e.g., “prayed,” “attended religious worship services,” and “studied scriptures individually”) and asked to select the activities they had participated in during the last day. Next, they were presented separate web pages for each of the selected activities and asked to do the following: “(1) Indicate the approximate number of minutes you spent in this activity over the last day. (2) Rate the quality of your time spent in this activity during the last day. In other words, indicate the average value, significance, or impact of the time spent in this activity on the scale from ‘not at all valuable’ to ‘extremely valuable’.” For the minutes involved in the activity, participants entered a number in a cell provided. The quality of the time spent on that activity during the last day was assessed using a slider with response labels.

Daily spiritual experiences. Respondents were first presented a web page with a list of 18 spiritual experiences (e.g., “I felt guided by God or the Spirit of God,” “I felt comfort, calm release, or peace,” and “I sensed an increase in emotional or spiritual strength”) and asked to select those they had experienced in during the last day. Next, they were presented separate web pages for each of the selected experiences and asked to do the following: “(1) Record how often you had this type of experience during the last day. (2) Rate the quality of those experiences. Indicate the average intensity, depth, quality, or significance of this type of experience during the last day on the scale from ‘not at all significant’ to ‘extremely significant’.” Participants indicated the frequency of spiritual experiences for a given day on a 5-point scale from “not at all” to “very often or most of the day.” The quality of the spiritual experiences during the last day was assessed using a slider with response labels.

Daily moral affect. The moral emotions of empathy, gratitude, and forgiveness were assessed on a daily basis using 9 items (three for each emotion). Based on the procedures for the Positive and Negative Affect Schedule (Watson & Clark, 1994), we asked participants to “Indicate to what extent you felt the emotion during the last day on average on a scale from ‘not at all’ to ‘extremely’.” The three items for each emotion were derived from prior research on empathy (sympathetic, softhearted, and compassionate; Batson, Lishner, Cook, & Sawyer, 2005), gratitude (grateful, thankful, appreciative; Emmons & Kneezel, 2005) and forgiveness (hateful, resentful, forgiving; McCullough et al., 1998).


NLSY data

Download Data

To get data, go to https://www.nlsinfo.org/investigator/pages/login.jsp.

One needs to register a free account in order to access the data.
You can use this account to get data.
Username: ndclassdata@gmail.com
Password: dnuvw03067

How to get data

  • Login at https://www.nlsinfo.org/investigator/pages/login.jsp
  • Select variables using "Variable Search".
  • Download data using "Save/Download".
  • Select "Advanced Download". You may choose "Comma-delimited datafile of selected variables", Codebook, and Short desecription.
  • Download the zip file and unzip it to get the data.


The National Longitudinal Surveys (NLS) are a set of surveys designed to gather information at multiple points in time on the labor market activities and other significant life events of several groups of men and women. For more than 4 decades, NLS data have served as an important tool for economists, sociologists, and other researchers.

The NLSY97 consists of a nationally representative sample of approximately 9,000 youths who were 12 to 16 years old as of December 31, 1996. Round 1 of the survey took place in 1997. In that round, both the eligible youth and one of that youth's parents received hour-long personal interviews. In addition, during the screening process, an extensive two-part questionnaire was administered that listed and gathered demographic information on members of the youth's household and on his or her immediate family members living elsewhere. Youths are interviewed on an annual basis.

The NLSY97 is designed to document the transition from school to work and into adulthood. It collects extensive information about youths' labor market behavior and educational experiences over time. Employment information focuses on two types of jobs, "employee" jobs where youths work for a particular employer, and "freelance" jobs such as lawn mowing and babysitting. These distinctions will enable researchers to study effects of very early employment among youths. Employment data include start and stop dates of jobs, occupation, industry, hours, earnings, job search, and benefits. Measures of work experience, tenure with an employer, and employer transitions can also be obtained. Educational data include youths' schooling history, performance on standardized tests, course of study, the timing and types of degrees, and a detailed account of progression through post-secondary schooling.

Aside from educational and labor market experiences, the NLSY97 contains detailed information on many other topics. Subject areas in the questionnaire include: Youths' relationships with parents, contact with absent parents, marital and fertility histories, dating, sexual activity, onset of puberty, training, participation in government assistance programs, expectations, time use, criminal behavior, and alcohol and drug use. Areas of the survey that are potentially sensitive, such as sexual activity and criminal behavior, comprise the self-administered portion of the interview.

One unique aspect of the NLSY97 is that Round 1 contains a parent questionnaire that generates information about the youths' family background and history. Information in the parent questionnaire includes: parents' marital and employment histories, relationship with spouse or partner, ethnic and religious background, health (parents and child), household income and assets, participation in government assistance programs, youths' early child-care arrangements, custody arrangement for youth, and parent expectations about the youth.

Additional efforts provide information that will greatly enhance the research uses of the NLSY97. In 1997 and early 1998, the NLSY97 respondents were given the computer-adaptive version of the Armed Services Vocational Aptitude Battery (CAT-ASVAB). The CAT-ASVAB comprises 10 tests that measure knowledge and skill in a number of areas including mathematics and language.

To cite the book, use: Zhang, Z. & Wang, L. (2017-2022). Advanced statistics using R. Granger, IN: ISDSA Press. https://doi.org/10.35566/advstats. ISBN: 978-1-946728-01-2.
To take the full advantage of the book such as running analysis within your web browser, please subscribe.