indexevent: Adjust association statistics for index event bias

indexeventR Documentation

Adjust association statistics for index event bias

Description

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.

Usage

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
)

Arguments

xbeta

Vector of effects on the index trait

xse

Vector of standard errors of xbeta

ybeta

Vector of effects on the subsequent trait

yse

Vector of standard errors of ybeta

weighted

If true (default), regression of ybeta on xbeta is weighted by the inverse of yse^2.

prune

Vector containing the indices of an approximately independent subset of the predictors in xbeta and ybeta. If unspecified, all predictors will be used.

method

Method to adjust for regression dilution (weak instruments) in the regression of ybeta[prune] on xbeta[prune]. "CWLS" (default) applies Corrected Weighted Least Squares from Cai et al (2022). "Hedges-Olkin" applies the correction from Dudbridge et al (2019), equivalent to CWLS for unweighted regression. "Simex" applies a more time-consuming correction which may be more accurate than CWLS.

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

Details

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.

Value

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

Author(s)

Frank Dudbridge

References

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


DudbridgeLab/indexevent documentation built on Sept. 15, 2024, 2:25 a.m.