Description Usage Format Author(s) Source References See Also Examples
This is simulated genetic (autosomal and X-chromosome markers) and non-genetic data (gender, age, and smoking status).
1 |
snpRFexample
contains 6 objects:
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).
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.
A vector of names for markers in the xchrom.snps matrix ordered in the same manner as markers in xchrom.snps.
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).
A vector indicating whether each subject is a case or a control.
A vector indicating whether each subject is male or female.
Greg Jenkins
Data was simulated using the hapsim R package (http://CRAN.R-project.org/package=hapsim).
Giovanni Montana (2012). hapsim: Haplotype Data Simulation. R package version 0.3. http://CRAN.R-project.org/package=hapsim
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)
|
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.