PolyGenius
Contents

associate$mr

Mendelian-randomization entry point for a PolyGeniusStudy

associate$mr() reserves the Mendelian-randomization surface. It validates data and its arguments and then always aborts: no estimator backend is implemented. The signature is published so that calling code and documentation can be written against a stable shape.

Usage

associate$mr(
  data,
  exposure,
  outcome,
  instruments = c("prs", "variants"),
  method = c("ivw", "egger", "median"),
  covariates = NULL,
  weights = NULL,
  output = c("summary", "models"),
  ...
)

Arguments

ArgumentDescription
dataA PolyGeniusStudy.
exposureUnquoted exposure expression, resolved from data. Required.
outcomeUnquoted outcome expression, resolved from data. Required.
instrumentsOne of "prs" (default), "variants". Instrument type the call would use.
methodOne of "ivw" (default), "egger", "median". MR estimator the call would use.
covariatesUnquoted adjustment expression, or NULL (default). Captured and discarded.
weightsUnquoted expression or numeric vector, or NULL (default). Captured and discarded.
outputOne of "summary" (default), "models". Captured and discarded.
...Reserved for future MR backends. Captured and discarded.

Value

Never returns. Always raises a not-yet-implemented error after validating the requested interface.

Details

Validation runs in order: data must be a PolyGeniusStudy; exposure and outcome must both be supplied and non-NULL; instruments, method and output are matched against their choices. covariates, weights and ... are accepted and discarded. The abort message echoes the resolved instruments, method and output so a caller can confirm the interface the call would have requested.

See Also

Aliases: associate-mr, associate.mr, associate$mr