snpRFexample: Simulated genetic data

Description Usage Format Author(s) Source References See Also Examples

Description

This is simulated genetic (autosomal and X-chromosome markers) and non-genetic data (gender, age, and smoking status).

Usage

1

Format

snpRFexample contains 6 objects:

autosome.snps

A matrix of 20 autosomal SNPs with each column corresponding to a SNP coded as count of a particular allele (i.e. 0,1 or 2), and each row corresponding to a subject (n=200).

xchrom.snps

A matrix of 10 X chromosome SNPs, each SNP coded as two adjacent columns (20 columns in all), alleles of a marker are coded as 0 or 1 for carrying a particular allele. Altough males only have one X-chromosome, their SNPs are coded as 2 columns as well, the second column being a duplicate of the first. Each row of this matrix corresponsponds to a subject (n=200). This data is phased and in chromosomal order.

xchrom.snps.names

A vector of names for markers in the xchrom.snps matrix ordered in the same manner as markers in xchrom.snps.

covariates

A matrix of 2 covariates, each column being a different covariate (ie. age and smoking status (yes=1, no=0)) and each row a subject (n=200).

phenotype

A vector indicating whether each subject is a case or a control.

gender

A vector indicating whether each subject is male or female.

Author(s)

Greg Jenkins

Source

Data was simulated using the hapsim R package (http://CRAN.R-project.org/package=hapsim).

References

Giovanni Montana (2012). hapsim: Haplotype Data Simulation. R package version 0.3. http://CRAN.R-project.org/package=hapsim

See Also

snpRF

Examples

1
2
3
4
5
6
7
data(snpRFexample)

stopifnot(require(snpRF))
eg.rf<-snpRF(x.autosome=autosome.snps,x.xchrom=xchrom.snps,
             xchrom.names=xchrom.snps.names,x.covar=covariates, 
             y=phenotype)
print(eg.rf)

Example output

snpRF 0.4

Call:
 snpRF(x.autosome = autosome.snps, x.xchrom = xchrom.snps, xchrom.names = xchrom.snps.names,      x.covar = covariates, y = phenotype) 
               Type of random forest: classification
                     Number of trees: 500
No. of variables tried at each split: 5

        OOB estimate of  error rate: 52.5%
Confusion matrix:
        control case class.error
control      27   65   0.7065217
case         40   68   0.3703704

snpRF documentation built on May 2, 2019, 6:51 a.m.

Related to snpRFexample in snpRF...