stacked_prs | R Documentation |
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.
stacked_prs(
prs_grid,
y,
nfolds = 10,
family = "binomial",
plot_error = TRUE,
seed = NULL,
...
)
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(). |
A list containing the model, the stacked PRS, and the non-zero model coefficients.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.