ga_modelselection_pcs: ga_modelselection_pcs

Description Usage Arguments Details Value

View source: R/GA_function_pc.R

Description

Performs GA model selection to identify the best model when principal components are involved

Usage

1
ga_modelselection_pcs(Y,X,significant,number_cores,principal_components,maxiterations,runs_til_stop,kinship = FALSE)

Arguments

Y

The phenotype response on the reduced scale (aggregating phenotype by ecotype/taxa), this should be a matrix with 1 column.

X

The SNP matrix on the reduced scale (aggregating phenotype by ecotype/taxa).

significant

A vector of 0 and 1's where the 1's indicate what SNP's were found to be significant in the preselection function.

number_cores

Number of cores to be passed on to the genetic algorithm to increase computational speed.

principal_components

The principal component matrix on the reduced scale (aggregating phenotype by ecotype/taxa).

maxiterations

This is the maximum number of iterations the Genetic Search algorithm will run.

runs_til_stop

This is the numebr of consectutive iterations where the BIC is not improved before the genetic algorithm is stopped.

kinship

Default is set at FALSE. If kinship model is desired, input a kinship matrix and this will search models with the kinship component.

Details

This function will print out lines correpsonding to the convergence of the genetic search algorithm.

Value

A named matrix where the names corespond to the significant SNP's. This will usually out a matrix with a singular row, where the values of this row is 0 or 1 where 1 indicates significance in the final model and 0 indicates non significance in the final model. Sometimes this will output a matrix with mulitple columns. This is because there is a SNP or multiple SNPs that when added to the model create rank deficiency issues in the model. Naturally rank deficient columns are forced out but the genetic algoritm is not smart enough to sort these.


GWAS.BAYES documentation built on Nov. 8, 2020, 7:47 p.m.