MR_regression_coefficients_to_moments: Function to extract first-order and second-order estimated...

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Function to extract first-order and second-order estimated moments from summary data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
MR_regression_coefficients_to_moments(
  J,
  beta_XG,
  sigma_XG,
  nobs_XG,
  beta_YG,
  sigma_YG,
  nobs_YG,
  beta_YX,
  EAF = rep(0.5, J),
  n = 2
)

Arguments

J

Integer number of instrumental variables.

beta_XG

Numeric vector of estimated G -> X regression terms.

sigma_XG

Numeric vector of estimated G -> X standard errors.

nobs_XG

Integer sample size in G -> X regression (GWA) study.

beta_YG

Numeric vector of estimated G -> Y regression terms.

sigma_YG

Numeric vector of estimated G -> Y standard errors.

nobs_YG

Integer sample size in G -> Y regression (GWA) study.

beta_YX

Numeric vector of estimated X -> Y regression value.

EAF

Numeric vector of effect allele frequencies

n

Integer number of alleles (trials) for binomial genetic variant.

Value

Numeric matrix of size (J+3)x(J+3) containing the first-order and second-order moments of the (J+2) vector (G, X, Y).

Examples

1
MR_regression_coefficients_to_moments(1, 1, 1e-3, 1000, 1, 1e-3, 1000, 1, 1e-3)

igbucur/MASSIVE documentation built on Oct. 26, 2020, 1:26 a.m.