CIV: Find a unique solution of CIV.

Description Usage Arguments Value Examples

View source: R/CIVMR_function.R

Description

This function find the unique CIV solution.

Usage

1
CIV(MR.data)

Arguments

MR.data:

A data.frame() object containg G,X,Z,Y.

Value

c: solution vector to the constrained maximization problem.

max_value: the maximized correlation value.

CIV: the new instrumentable variable for MR analysis: constrained instrumental variable.

Examples

1
2
3
4
data(simulation)
civ.fit <- CIV(simulation)
#plot the weight c
plot(civ.fit$c)

LaiJiang/CIVMR documentation built on July 16, 2020, 12:45 a.m.