Last chance! 50% off unlimited learning
Sale ends in
R
') between subjects in the same extended family. Each row represents a unique relationship pair. An extended family with $k$ subjects will have $k$($k$-1)/2 rows. Typically, Subject1 is older while Subject2 is younger.
The dataset contains Gen1 and Gen2 subjects. "Gen1" refers to subjects in the original NLSY79 sample (data(Links79Pair)
Links2011V51
.Subject1Tag
and Subject2Tag
uniquely identify subjects. For Gen2 subjects, the SubjectTag is identical to their CID (ie, C00001.00 -the SubjectID assigned in the NLSY79-Children files). However for Gen1 subjects, the SubjectTag is their CaseID (ie, R00001.00), with "00" appended. This manipulation is necessary to identify subjects uniquely in inter-generational datasets. A Gen1 subject with an ID of 43 has a SubjectTag
of 4300. The SubjectTags of her four children remain 4301, 4302, 4303, and 4304.
Level 5 of RelationshipPath
(ie, AuntNiece) is gender neutral. The relationship could be either Aunt-Niece, Aunt-Nephew, Uncle-Niece, or Uncle-Nephew. If there's a widely-accepted gender-neutral term, please tell me.
MZ twins have R
=1. DZ twins and full-siblings have R
=.5. Half-siblings have R
=.25. Typical first-cousins have R
=.125 Unrelated subjects have R
=0 (this occasionally happens for Gen1Housemates
). Other R
coefficients are possible. ??Joe, do you have an earlier paper that enumerates all the obscure combinations, like half-cousins or an ambiguous AuntNiece??ExtendedID
variable. This is discussed at LinksPair79
dataset contains columns necessary for a basic BG analysis. The Links79PairExpanded
dataset contains further information that might be useful in more complicated BG analyses.
A tutorial that produces a similar dataset is Links79Pair
) can be saved as a CSV file (comma-separated file) and imported into in other programs and languages. In the R console, type the following two lines of code:
library(NlsyLinks); data(Links79Pair)
write.csv(Links79Pair, "C:/BGDirectory/Links79Pair.csv")
where "C:/BGDirectory/"
is replaced by your preferred directory. Remember to use forward slashes instead of backslashes; for instance, the path "C:\BGDirectory\Links79Pair.csv"
will be misinterpreted.library(NlsyLinks) #Load the package into the current R session.
data(Links79Pair) #Load the dataset from the NlsyLinks package.
summary(Links79Pair) #Summarize the five variables.
hist(Links79Pair$R) #Display a histogram of the Relatedness coefficients.
table(Links79Pair$R) #Create a table of the Relatedness coefficients for the whole sample.
#Create a dataset of only Gen2 sibs, and display the distribution of R.
gen2Siblings <- subset(Links79Pair, RelationshipPath=='Gen2Siblings')
table(gen2Siblings$R) #Create a table of the Relatedness coefficients for the Gen2 sibs.
Run the code above in your browser using DataLab