ScoreBNEM: Score Test via Expectation Maximization.

View source: R/Score-EM.R

ScoreBNEMR Documentation

Score Test via Expectation Maximization.

Description

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

Usage

ScoreBNEM(
  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 entires 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.

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 score statistic, the degrees of freedom, and a p-value.


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