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(
dataSet=dsDF,
oName_1="WeightStandardizedForAge19To25_1",
oName_2="WeightStandardizedForAge19To25_2")
estimatedAdultWeight #ASquared and CSquared should be 0.634 and 0.006.
estimatedMath <- DeFriesFulkerMethod3(
dataSet=dsDF,
oName_1="MathStandardized_1",
oName_2="MathStandardized_2")
estimatedMath #ASquared and CSquared should be 0.860 and 0.039.
class(GetDetails(estimatedMath))
summary(GetDetails(estimatedMath))
Run the code above in your browser using DataLab