gapit_model_selection: Select the best number of PCs using BIC.

Description Usage Arguments Value Examples

View source: R/GAPIT_PC_selection.R

Description

If you choose Model.Selection = TRUE in GAPIT, you will get BIC.Model.Selection output files. If you have many traits, it can be tedious to manually go through each output file and select the number of principle components that maximizes BIC. This function automates that process for many traits in some filepath. It returns a data frame containing the trait names in a filepath and the best number of PC's, a.k.a. the number that maximizes the BIC for that trait.

Usage

1
gapit_model_selection(path, saveoutput = FALSE)

Arguments

path

File path to the csv Result files that GAPIT has created, a character string or file.path().

saveoutput

Should the output of this function be saved to disc? Recommended to be set to TRUE, but the default is FALSE.

Value

A tbl_df table of traits with the best number of PC's as determined by the maximum BIC.

Examples

1
2
## Not run: gapit_model_selection(path = "./inst/extdata", saveoutput = TRUE)
## Not run: gapit_model_selection(path = "./inst/extdata")

Alice-MacQueen/CDBNgenomics documentation built on Aug. 18, 2020, 4:39 p.m.