Uses cross validation to train and estimate PRS for each fold
PRS_cross.Rd
The function returns list of the PRS estimated of each fold for each threshold. The function will train on the remaining data and test for each fold. The function uses GWAS to estimate the casual SNP and uses these the find the PRS. The output is a list containing matrices with a column for each threshold. The interpretation of this threshold is that a given effect of a SNP will not be included if the -log10 transformation of the p-value is is smaller than the threshold. e. g. a value of 3 will correspond to the p value being smaller than 0.001.
Arguments
- train_data
List generated from gen_sim.
- y
The target vector. Could either be estimated liabilities from LTFH or phenotypes.
- cross_folds
Number of folds in cross validation.
- ncores
Amount of cores to be used.
- LogReg
Boolean indicating if logistic regression should be used to estimate the casual effect.