WaldBNEM: Wald Test via Expectation Maximization.

View source: R/Wald-EM.R

WaldBNEMR Documentation

Wald Test via Expectation Maximization.

Description

Performs a Wald test of the null hypothesis that a subset of the regression parameters for the target outcome are zero.

Usage

WaldBNEM(
  t,
  s,
  X,
  Z,
  is_zero,
  init = NULL,
  maxit = 100,
  eps = 1e-08,
  report = FALSE
)

Arguments

t

Target outcome vector.

s

Surrogate outcome vector.

X

Target model matrix.

Z

Surrogate model matrix.

is_zero

Logical vector, with as many entries as columns in the target model matrix, indicating which columns have coefficient zero under the null.

init

Optional list of initial parameters for fitting the null model, with one or more of the components: a0, b0, S0.

maxit

Maximum number of parameter updates.

eps

Minimum acceptable improvement in log likelihood.

report

Report model fitting progress? Default is FALSE.

Value

A numeric vector containing the Wald statistic, the degrees of freedom, and a p-value.


zrmacc/BNEM documentation built on March 31, 2024, 12:20 a.m.