Description Usage Arguments Value Examples
View source: R/CIVMR_function.R
This function implement Allele score methods with cross-validation in the way Stephen Burgess suggested in the Allele score methods paper.
1 | allele(MR.data, n_folds = 10)
|
MR.data: |
data frame containing G,X,Z,Y. |
n_folds: |
the number of folds for cross-validation. |
weights: the weights for allele score across folds. Each row is a weight vector corresponding to a specific fold.
allele_score: The cross-validated Allele score, which would be used as the new instruments in MR analysis.
beta_est: the causal effect estimation of β.
1 2 | data(simulation)
allele.score <- allele(simulation,n_folds=10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.