Learn R Programming

MendelianRandomization (version 0.10.0)

weighted.median: Weighted median function

Description

Internal function for calculating weighted median estimate (or simple median estimate if weights are all equal).

Usage

weighted.median(theta, weights)

Value

Causal estimate.

Arguments

theta

Ratio causal estimates for each genetic variant considered individually.

weights

Weights.

Details

None.

Examples

Run this code
weighted.median(theta = chdlodds/ldlc, weights = abs(chdloddsse/ldlc))

Run the code above in your browser using DataLab