Learn R Programming

MendelianRandomization (version 0.6.0)

egger.bounds: 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)

Value

Numeric value of confidence interval limit.

Arguments

type

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

dist

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

df

Degrees of freedom (for t-distribution).

.rse

Residual standard error.

.alpha

Significance level.

mean

Causal estimate.

se

Standard error of estimate.

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.

Examples

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

Run the code above in your browser using DataLab