| MR_2SLS | R Documentation |
Perform Two-Stage Least Squares (2SLS) Mendelian Randomization analysis.
MR_2SLS(
infile,
outcome,
outcome_name,
prs_cols_match,
regexpr_pattern,
standardise = TRUE,
digits = 3,
.progress = TRUE
)
infile |
The input file containing the data. |
outcome |
The outcome variable. |
outcome_name |
The name of the outcome variable. |
prs_cols_match |
The columns to match for PRS. |
regexpr_pattern |
The regular expression pattern to use for matching. |
standardise |
Whether to standardise the prs data, Default: TRUE |
digits |
The number of decimal places to round to, Default: 3 |
.progress |
Whether to show progress, Default: TRUE |
This function performs a Two-Stage Least Squares (2SLS) Mendelian Randomization analysis.
A list containing the results of the 2SLS analysis.
Zhen Lu luzh29@mail2.sysu.edu.cn
Siyang Liu liusy99@mail.sysu.edu.cn
fread, as.data.table, setattr, setDT
select, reexports
map
str_extract
nearPD
cov.shrink
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.