penalised.weights.delta: Calculates p-values for penalization of weights with...

View source: R/mr_ivw-methods.R

penalised.weights.deltaR Documentation

Calculates p-values for penalization of weights with second-order weights

Description

Internal function for calculating penalized weights in conjunction with r.weights with weights equal to "delta".

These weights are used in either the mr_ivw or mr_egger functions when penalized = TRUE, or in the mr_median function when method = "penalized".

Usage

penalised.weights.delta(.Bx, .Bxse, .By, .Byse, .psi)

Arguments

.Bx

Beta-coefficient for genetic association with the risk factor.

.Bxse

Standard error of genetic association with the risk factor.

.By

Beta-coefficient for genetic association with the outcome.

.Byse

Standard error of genetic association with the outcome.

.psi

The correlation between the genetic associations with the exposure and the association with the outcome for each variant resulting from sample overlap.

Details

None.

Value

P-values corresponding to heterogeneity test for each genetic variant in turn (based on a chi-squared-1 distribution).

Examples

penalised.weights.delta(ldlc, ldlcse, chdlodds, chdloddsse, 0)


MendelianRandomization documentation built on May 29, 2024, 11:36 a.m.