CUE_vec_J_bin: Newton Raphson Steps for plmed fitting

Description Usage Arguments Value

View source: R/CUE_vec_J_bin.R

Description

CUE_vec_J_bin Generates newton raphson steps for the plmed fitting functions.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
CUE_vec_J_bin(
  par,
  X,
  M,
  Y,
  Z,
  Xfam = binomial(),
  method = "G",
  weights = rep(1, N),
  med_prop = NULL,
  Sig = NULL
)

Arguments

par

vector containing beta and augmented nuisance parameters, optionally with a lagrange multiplier the final componenet.

X

Vector of exposures

M

Vector of mediators

Y

Vector of outcomes

Z

Design matrix of confounder models

method

The method to be used. See ‘Details’.

med_prop

Hypothesised mediation proportion for constrained optimisation. Requires method 'CUE' or 'Two-step'.

Sig

Constant covariance matrix must be prespecified when using 'Two-step' method.

Value

A list containing the newton-raphson step for use with newton_raph as well as variance and score estimates.


ohines/plmed documentation built on Jan. 9, 2021, 11:59 a.m.