Learn R Programming

NlsyLinks (version 0.19)

Ace: Estimates the heritability of additive traits using a single variable.

Description

An ACE model is the foundation of most Behavior Genetic research. It estimates the additive heritability (with a), common environment (with c) and unshared heritability/environment (with e).

Usage

AceUnivariate(outcomeForSubject1, outcomeForSubject2, relatedness, 
  method=c("DeFriesFulkerMethod1", "DeFriesFulkerMethod3"))
DeFriesFulkerMethod1(outcomeForSubject1, outcomeForSubject2, relatedness)
DeFriesFulkerMethod3(outcomeForSubject1, outcomeForSubject2, relatedness)

Arguments

outcomeForSubject1
The outcome variable corresponding to the first subject in the pair.
outcomeForSubject2
The outcome variable corresponding to the second subject in the pair.
relatedness
The relatedness coefficient for the pair (this is typically abbreviated as R).
method
The specific estimation technique.

Value

  • Currently, a list is returned with the arguments HSquared, CSquared, ESquared, and RowCount. In the future, this may be changed to an S4 class.

Details

The AceUnivariate function is a wrapper that calls DeFriesFulkerMethod1 or DeFriesFulkerMethod3. Future versions will incorporate methods that use latent variable models.

References

Rodgers, Joseph Lee, & Kohler, Hans-Peter (2005). Reformulating and simplifying the DF analysis model. http://www.springerlink.com/content/n3x1v1q282583366/{Behavior Genetics, 35 (2), 211-217}.

Examples

Run this code
library(NlsyLinks) #Load the package into the current R session.
dsOutcomes <- ExtraOutcomes79
dsOutcomes$SubjectTag <- CreateSubjectTag(subjectID=dsOutcomes$SubjectID,
  generation=dsOutcomes$Generation)
dsDF <- CreatePairLinksDoubleEntered(outcomeDataset=dsOutcomes, linksPairDataset=Links79Pair, 
  outcomeNames=c("MathStandardized", "Weight", "WeightStandardized", "WeightStandardizedForAge19To25"))

estimatedAdultWeight <- DeFriesFulkerMethod3(
  outcomeForSubject1=dsDF$WeightStandardizedForAge19To25_1, 
  outcomeForSubject2=dsDF$WeightStandardizedForAge19To25_2, 
  relatedness=dsDF$R)  
# The HSquared and CSquared values should be 0.633936 and 0.006209162.

estimatedMath <- DeFriesFulkerMethod3(
  outcomeForSubject1=dsDF$MathStandardized_1, 
  outcomeForSubject2=dsDF$MathStandardized_2, 
  relatedness=dsDF$R)  
# The HSquared and CSquared values should be 0.8595078 and 0.03879863.

Run the code above in your browser using DataLab