efficient_risk_function: The double-robust one-step efficient empirical risk function...

View source: R/minimizers_and_risk_functions.R

efficient_risk_functionR Documentation

The double-robust one-step efficient empirical risk function for the log relative risk. Note this risk function is non-convex.

Description

The double-robust one-step efficient empirical risk function for the log relative risk. Note this risk function is non-convex.

Usage

efficient_risk_function(
  theta,
  A,
  Y,
  EY1W,
  EY0W,
  pA1W,
  weights,
  efficient_loss_function,
  debug = FALSE,
  return_loss = FALSE,
  V = NULL,
  oracle = FALSE
)

Arguments

A

A binary vector specifying the treatment assignment. The values should be in 0,1.

Y

A numeric vector of binary or nonnegative observations of the outcome variable.

EY1W

A numeric vector containing initial cross-fitted estimates of E[Y|A=1,W] for all observations.

EY0W

A numeric vector containing initial cross-fitted estimates of E[Y|A=0,W] for all observations.

pA1W

A numeric vector containing initial cross-fitted estimates of P(A=1|W) for all observations.

weights

A numeric vector of observation weights. If no special weighting desired, supply a vector of 1's.

debug

...

return_loss

Boolean for whether to return loss function values or the risk value (i.e. average of the losses)

ERM

A vector or matrix of log relative risk (LRR) estimates whose risk is to be evaluated using the one-step efficient double-robust risk function.

W

A matrix of covariate observations


Larsvanderlaan/npcausalML documentation built on July 30, 2023, 4:32 p.m.