snp_tree: CART for Final SNP Selection

Description Usage Arguments Value

Description

Creates classification and regression trees for final SNP selection using rpart. The function uses the dataset list from the elasticnet function in this package as input and returns a list of trees and the SNPs where the trees split. The trees are pruned using the 1-se rule.

Usage

1
snp_tree(data_list, y)

Arguments

data_list

Object obtained from the elasticnet function.

y

A numeric vector of phenotypes for the data.

Value

snp_tree returns a list for each dataset in data_list. Each of the sublists contains the pruned tree created by rpart, a vector containing the SNPs where the tree splits, and the alpha value associated with the elastic net model used to create the dataset. Each item is called using the list number and name, such as results[[1]]$tree and results[[1]]$snps.

tree

Tree produced by rpart. Tree is pruned using the 1-se rule.

snps

Vector of SNPs where the tree splits.

alpha

Alpha value from the elastic net model used to trim the input data.


jillbo1000/gwas3 documentation built on June 14, 2019, 3:08 a.m.