Skip to contents

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.

Usage

pred_model(train_data, y, thr, ncores = 1, LogReg = FALSE)

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.

Value

List containing output from GWAS and Linear regression of PRS on phenotype of the subject.