Learn R Programming

NlsyLinks

NlsyLinks is a free downloadable R package to facilitate Behavior Genetic and Family Studies research using the NLSY samples (the National Longitudinal Survey of Youth). These samples are based on a cross-generational longitudinal nationally representative sample of over 30,000 participants followed for up to 35 years. There are almost 50,000 pairwise kinship links.

Get started at here the NLSY and here for the NlsyLinks package.

Installing

The release version of NlsyLinks can be installed from CRAN.

install.packages("NlsyLinks")

The latest development version of NlsyLinks can be installed from GitHub after installing the remotes package.

install.packages("remotes")
remotes::install_github(repo="nlsy-links/NlsyLinks")

Obtaining the Links

There are roughly three versions of the links:

  1. The release versions are bundled in the NlsyLinks package and updated once or twice a year during development.
  2. The pre-release versions are downloadable from our team’s website and updated several times a month during development. Formats include R, SAS, and plain-text CSV.
  3. The development versions are downloadable from our determination repo updated several times a day during development.

Locations for Help and Development

This repository contains the code used in the NlsyLinks R package. For additional information about the package and using it in NLSY research, please see https://nlsy-links.github.io/NlsyLinks/.

This GitHub repository is our primary way of managing, tracking, and build-checking versions of the source code. (We’re no longer using our R-Forge site.) The stable releases (intended for most researchers) is available on the package’s CRAN site.

We recently moved the forums to https://groups.google.com/forum/#!forum/nlsy-links. Previous conversations are available at our old R-Forge and Disqus sites.

Publication

Please see research-publications for a list of the 70+ publications arising from the kinship links. An overview is available at:

Joseph Lee Rodgers, William H. Beasley, David E. Bard, Kelly M. Meredith, Michael D. Hunter, Amber B. Johnson, Maury Buster, Chengchang Li, Kim O. May, S. Mason Garrison, Warren B. Miller, Edwin van den Oord, and David C. Rowe (2016). Behavior Genetics, 46. https://doi.org/10.1007/s10519-016-9785-3.

The National Longitudinal Survey of Youth datasets (NLSY79; NLSY-Children/Young Adults; NLSY97) have extensive family pedigree information contained within them. These data sources are based on probability sampling, a longitudinal design, and a cross-generational and within-family data structure, with hundreds of phenotypes relevant to behavior genetic (BG) researchers, as well as to other developmental and family researchers. These datasets provide a unique and powerful source of information for BG researchers. But much of the information required for biometrical modeling has been hidden, and has required substantial programming effort to uncover—until recently. Our research team has spent over 20 years developing kinship links to genetically inform biometrical modeling. In the most recent release of kinship links from two of the NLSY datasets, the direct kinship indicators included in the 2006 surveys allowed successful and unambiguous linking of over 94 % of the potential pairs. In this paper, we provide details for research teams interested in using the NLSY data portfolio to conduct BG (and other family-oriented) research.

Thanks to Funders

The current work on the NLSY Kinship links has been supported by NIH Grant R01-HD065865 (Joe Rodgers, PI).

Build Status and Package Characteristics

BranchGitHub ActionsCodecov
Master
Dev
Ubuntu LatestTest Coverage
CRANVersionRateZenodo
Latest
Latest CRAN versionCRAN DownloadsIndependently-hosted Archive

Copy Link

Version

Install

install.packages('NlsyLinks')

Monthly Downloads

358

Version

2.2.2

License

GPL

Issues

Pull Requests

Stars

Forks

Last Published

October 10th, 2024

Functions in NlsyLinks (2.2.2)

CreateSubjectTag

Creates a SubjectTag. This value uniquely identifies subjects, when both generations are included in the same dataset.
ExtraOutcomes79

Extra outcome variables in the NLSY79
CreatePairLinks

Creates a pairs linking file.
ValidatePairLinksAreSymmetric

Verifies that the pair relationships are symmetric.
GetDetails-methods

GetDetails-methods
ColumnUtilities

A collection of functions that helps data management data.frames, particularly those derived from NLSY Extracts.
Links79Pair

Kinship linking file for pairs of relatives in the NLSY79 and NLSY79 Children and Young Adults
CreateAceEstimate

Instantiate an AceEstimate object.
Ace

Estimates the heritability of additive traits using a single variable.
SubjectDetails79

Dataset containing further details of the Gen1 and Gen2 subjects.
CreateSpatialNeighbours

Distances between related family members, formatted for spatial analysis.
AceEstimate-class

Class AceEstimate
ReadCsvNlsy79

Read a CSV file downloaded from the NLS Investigator
RGroupSummary

Calculates summary statistics for each Relatedness Group in the sample.
Survey79

Dataset containing survey details for each subject, for each year
Links79PairExpanded

Kinship linking file for pairs of relatives. It builds upon the Links79Pair dataset.
Links97Pair

Kinship linking file for pairs of relatives in the NLSY97
ValidateOutcomeDataset

Validates the schema of datasets containing outcome variables.
ValidatePairLinks

Validates the schema of a links for pairs of relatives
CleanSemAceDataset

Produces a cleaned dataset that works well with when using SEM to estimate a univariate ACE model.
AceLavaanGroup

A simple multiple-group ACE model with the lavaan package.
Links97PairExpanded

Kinship linking file for pairs of relatives In the NLSY97. It builds upon the Links97Pair dataset.
NlsyLinks-package

NlsyLinks: Utilities and Kinship Information for Research with the NLSY