egger.bounds: Calculates confidence intervals for the MR-Egger method

View source: R/mr_egger-methods.R

egger.boundsR Documentation

Calculates confidence intervals for the MR-Egger method

Description

Internal function for calculating confidence intervals for the MR-Egger method.

Usage

egger.bounds(type, dist, .theta, .thetase, df = 0, .rse, .alpha)

Arguments

type

"l" for lower, "u" for upper.

dist

"normal" for normal distribution, "t-dist" for t-distribution.

.theta

Causal estimate.

.thetase

Standard error of estimate.

df

Degrees of freedom (for t-distribution).

.rse

Residual standard error.

.alpha

Significance level.

Details

The slight complication of this function is that when the estimate of the residual standard error (RSE) is less than one, the t-distribution confidence interval is calculated as either the confidence interval using a normal deviate and setting the RSE to 1, or a t-distribution deviate and using the estimated RSE. The wider of the two intervals is reported. This ensures that under-dispersion is not doubly penalized, while also making sure that the estimate is no more precise than that from a fixed-effect analysis.

None.

Value

Numeric value of confidence interval limit.

Examples

egger.bounds(type = "l", dist = "normal", .theta = 0, .thetase = 1, df = 0, .rse = 1, .alpha = 0.05)


MendelianRandomization documentation built on Aug. 9, 2023, 1:05 a.m.