Learn R Programming

RFGLS (version 1.1)

pheno: Simulated quantitative-trait dataset

Description

A dataset of observations on a normally distributed phenotype, generated with means conditional on genotype at the effect locus. All six family-types recognized in package RFGLS are represented.

Usage

data(pheno)

Arguments

Format

A data frame with 4050 observations on the following 6 variables:
FAMID
"Family ID." Each family in the dataset is uniquely identified by a value of FAMID, which are all multiples of 10.
ID
Individual ID. Each subject in the dataset is uniquely identified by a value of ID, which is equal to his/her INDIV plus his/her FAMID.
FTYPE
"Family-type." RFGLS recognizes six different family-types, five of which are, at largest, four-person nuclear families (two parents, two offspring), distinguished by how the two offspring are related to one another:
  1. MZ-twin families,
  2. DZ-twin families,
  3. Adoptive-offspring families,
  4. Non-twin bio-offspring families,
  5. "Mixed" families with one bio and one adopted offspring, and
  6. "Independent observations," who do not fit into a four-person nuclear family.
INDIV
"Individual code," which represents how a subject fits into his/her family: INDIV=1 is for "Offspring #1," INDIV=2 is for "Offspring 2," INDIV=3 is for the mother, and INDIV=4 is for the father. In families of FTYPE=5, the biological offspring has INDIV=1, and the adopted offspring, INDIV=2. All "independent observations" (i.e., FTYPE=6) have INDIV=1. Note that individuals in a given family are ordered by their INDIV.
Zscore
The phenotype score.
IsFemale
Binary indicator; a value of 1 indicates female sex. All offspring in families of type #2 (DZ twins) happen to be same-sex, but this is not a requirement.

Details

Each family's phenotype scores were generated from a multivariate normal distribution (mvrnorm in package mvtnorm) with a centroid defined conditional upon the family members' genotypes on the effect locus (rs7681769 in dataset geno), and a variance matrix with 1s on its diagonal and covariances (really, correlations) consistent with an additive heritability of 0.5 and a shared-environmentality of 0.2, but zero assortative mating.

Examples

Run this code
data(pheno)
str(pheno)
qqnorm(pheno$Zscore[pheno$INDIV==1]) ##<--Normally distributed phenotype.
qqline(pheno$Zscore[pheno$INDIV==1])
##Also see examples for functions fgls(), gls.batch(), and gls.batch.get().

Run the code above in your browser using DataLab