BF_dist: Generate bootstrap samples for the bootstrapping Fieller's...

View source: R/mr_pivw-methods.R

BF_distR Documentation

Generate bootstrap samples for the bootstrapping Fieller's confidence interval of the penalized inverse-variance weighted (pIVW) method

Description

Internal function of the penalized inverse-variance weighted (pIVW) method, which generates bootstrap samples for the bootstrapping Fieller's confidence interval.

Usage

BF_dist(
  object,
  beta_hat = 0,
  tau2 = 0,
  lambda = 1,
  n_boot = 1000,
  seed_boot = 1
)

Arguments

object

An MRInput object.

beta_hat

The causal effect estimate.

tau2

The estimated variance of the horizontal pleiotropy.

lambda

The penalty parameter in the pIVW estimator. By default, lambda=1.

n_boot

The sample size of the bootstrap samples. By default, n_boot=1000.

seed_boot

The seed for random sampling in the bootstrap method. By default, seed_boot=1.

Value

z_b

A vector containing the bootstrap samples for the bootstrapping Fieller's confidence interval.


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