indexevent | R Documentation |
Given effect sizes and standard errors for predictors of an index trait and a subsequent trait, this function adjusts the statistics for the subsequent trait for selection bias through the index trait.
indexevent(
xbeta,
xse,
ybeta,
yse,
weighted = T,
prune = NULL,
method = c("CWLS", "Hedges-Olkin", "Simex"),
tol = 1e-06,
B = 10,
lambda = seq(0.25, 5, 0.25),
seed = 2018
)
xbeta |
Vector of effects on the index trait |
xse |
Vector of standard errors of |
ybeta |
Vector of effects on the subsequent trait |
yse |
Vector of standard errors of |
weighted |
If true (default), regression of |
prune |
Vector containing the indices of an approximately independent subset of the predictors in |
method |
Method to adjust for regression dilution (weak instruments) in the regression of |
B |
Number of simulations performed in each stage of the Simex adjustment. |
lambda |
Vector of lambdas for which the Simex simulations are performed. |
seed |
Random number seed for the Simex adjustment |
Effect sizes are on a linear scale, so could be the coefficients from linear regression, or log odds ratios, or log hazard ratios. Effects on the subsequent trait are regressed on the effects on the index trait. By default, the regression is weighted by the inverse variances of the subsequent trait effects. The regression is adjusted for sampling variation in the index trait effects, and the residuals then used to obtain adjusted effect sizes and standard errors for the subsequent trait.
The regression should be performed on a subset of predictors that are independent.
In the context of a genome-wide association study, these would be LD-pruned SNPs.
In terms of the input parameters, the regression command is lm(ybeta[prune]~xbeta[prune],weights=1/yse[prune]^2)
.
The effects in xbeta
and ybeta
should be aligned for the same variables
and the same direction prior to running indexevent
.
The default value of B
is 10 to get a quick result, but higher values are recommended, eg 1000.
An object of class "indexevent" which contains:
ybeta.adj
Adjusted effects on the subsequent trait
yse.adj
Adjusted standard errors of ybeta.adj
ychisq.adj
Chi-square statistics for (ybeta.adj/yse.adj)^2
yp.adj
P-values for ychisq.adj
on 1df
b
Coefficient of the regression of ybeta[prune]
on xbeta[prune]
, after correction for regression dilution
b.se
Standard error of b
b.ci
Lower and upper confidence limits for b
b.raw
Regression coefficient without correction for regression dilution
simex.estimates
Regression coefficients under simulated measurement error
Frank Dudbridge
Cai S, Hartley A, Mahmoud O, Tilling K, Dudbridge F (2022) Adjusting for collider bias in genetic association studies using instrumental variable methods. Genetic Epidemiol 46:303-316
Dudbridge F, Allen RJ, Sheehan NA, Schmidt AF, Lee JC, Jenkins RG, Wain LV, Hingorani AD, Patel RS (2019) Adjustment for index event bias in genome-wide association studies of subsequent events. Nat Commun 10:1561
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.