hunt | R Documentation |
Estimate collider bias
hunt( dat, snp_col = "SNP", xbeta_col = "BETA.incidence", xse_col = "SE.incidence", xp_col = "Pval.incidence", ybeta_col = "BETA.prognosis", yse_col = "SE.prognosis", yp_col = "Pval.prognosis", xp_thresh = 0.001, init_pi = 0.6, init_sigmaIP = 1e-05, Bootstrapping = TRUE, M = 100, seed = 777, Plot = TRUE, show_adjustments = FALSE )
dat |
Data frame. Must have header with at least the |
snp_col |
Name of column with SNP IDs. |
xbeta_col |
Required name of column with effects on the incidence trait. |
xse_col |
Required name of column with standard errors of |
xp_col |
Name of column with p-value for |
ybeta_col |
Required name of column with unadjusted effects on the prognosis trait. |
yse_col |
Required name of column with standard errors of |
yp_col |
Name of column with p-value for |
xp_thresh |
p-value threshold for SNP-incidence associations. Effects with p-values larger than |
init_pi |
initial value for the weight of the mixture component that represents the cluster of SNPs affecting x only. |
init_sigmaIP |
initial value for the covariance between x and y. |
Bootstrapping |
Logical, if TRUE estimate the standard error of the adjustment factor using the Bootstrap method. |
M |
Number of bootstrap samples drawn to estimate the standard error of the adjustment factor. |
seed |
Random number seed used for drawing the bootstrap samples. |
Plot |
Logical, if TRUE (the default), calling the function should plot the final clusters. |
show_adjustments |
Logical indicating whether to show adjusted effects of the given SNPs in the outputs. |
List of the following:
est: estimated adjusted associations, their standard errors and p-values (only if show_adjustments
is TRUE).
b: The estimated slope (adjustment factor).
bse: Standard error of the estimated slope.
b_CI: 95\
pi: Estimated probability of the mixture component of SNPs affecting only incidence.
entropy: The entropy of the estimated clusters.
plot: Generated plot of the SlopeHunter fitted model.
Fit: a Data frame summarising the fitted model-based clustering with the following columns:
cluster: cluster of the variants defined as follows:
Hunted
= assigned to the cluster of SNPs affecting only incidence.
Pleiotropic
= assigned to the cluster affecting both incidence and prognosis - i.e. variants that affect incidence and have direct effect on prognosis.
pt and p0: membership probabilities of the variants for the hunted and pleiotropic clusters respectively.
associations of variants with x and y, their standard errors and p-values.
iter: Number of the EM algorithm's iterations.
Bts.est: Details on the bootstrap estimate of the standard error of the adjustment factor, if Bootstrapping
is TRUE.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.