Trains model on train data given the target vector.
pred_model.Rd
The function will use GWAS to find the casual effect of each SNP. It will then calculate the PRS. The final output is list containing the model from GWAS. This can be used to predict the phenotypes of test data.
Arguments
- train_data
List generated from gen_sim.
- y
The target vector. Could either be estimated liabilities from LTFH or phenotypes.
- thr
Threshold for p-value to be used in calculating PRS.
- ncores
Amount of cores to be used.
- LogReg
Boolean indicating if logistic regression should be used to estimate the casual effect.