Learn R Programming

mr.pivw (version 0.1.1)

BF_distr: Generate bootstrap samples for the bootstrapping Fieller's confidence interval

Description

This function is used to generate bootstrap samples for the bootstrapping Fieller's confidence interval.

Usage

BF_distr(data,beta_hat,tau2,lambda,n_boot=1000,seed_boot=1)

Value

z_b

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

Arguments

data

A matrix or data frame consists of four columns: the 1st (2nd) column contains the estimated genetic effects on the outcome (exposure); the 3rd (4th) column contains the estimated standard errors of the estimated genetic effects on the outcome (exposure).

beta_hat

The estimated causal effect.

tau2

The estimated variance of the horizontal pleiotropy.

lambda

The penalty parameter in the pIVW estimator. The penalty parameter plays a role in the bias-variance trade-off of the estimator.

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.