stacked_prs: Stacked P+T polygenic risk scores by regularized regression

View source: R/stacked_prs.R

stacked_prsR Documentation

Stacked P+T polygenic risk scores by regularized regression

Description

Uses individual-level data to combine ('stack') polygenic risk scores based on different tuning parameter combinations to optimize predictive performance. Based on Privé et al. AJHG 2019.

Usage

stacked_prs(
  prs_grid,
  y,
  nfolds = 10,
  family = "binomial",
  plot_error = TRUE,
  seed = NULL,
  ...
)

Arguments

prs_grid

The element 'result_df' from the list output by prs_grid().

y

The observed outcome (trait).

nfolds

Number of folds to use in k-fold cross-validation within cv.glmnet().

family

The distribution family of the outcome, e.g. binomial, gaussian.

plot_error

If TRUE, plots the error of the stacked PRS by the tuning parameter lambda.

seed

If not NULL, sets a seed prior to running cv.glmnet().

...

Additional arguments to pass to cv.glmnet().

Value

A list containing the model, the stacked PRS, and the non-zero model coefficients.


vincent10kd/polygenic documentation built on Feb. 25, 2024, 10:17 a.m.