Lagrangian_p: Objective function taking the form of a Lagrangian

View source: R/objective_functions.R

Lagrangian_pR Documentation

Objective function taking the form of a Lagrangian

Description

Computes the objective function, which balances the risk function R_p and the constraint function S_p using a parameter lambda.

Usage

Lagrangian_p(
  psi,
  X,
  delta_Mu,
  delta_Nu,
  lambda,
  alpha = 0.1,
  beta = 0.05,
  centered = FALSE
)

Arguments

psi

A function that takes an input X and returns a numeric vector with values in the range [-1, 1].

X

A matrix of covariates of size n x d (input data in ⁠[0,1]⁠).

delta_Mu

A function of X that determines the contrast between primary outcomes.

delta_Nu

A function of X that determines the contrast between adverse event outcomes.

lambda

A non-negative numeric scalar controlling the penalty for violating the constraint.

alpha

A numeric scalar representing the constraint tolerance (in ⁠[0,1/2]⁠, 0.1 by default).

beta

A non-negative numeric scalar controlling the sharpness of the probability function (0.05 by default).

centered

A logical value indicating whether to apply centering in sigma_beta (FALSE by default).

Value

A numeric scalar representing the objective function value.


PLUCR documentation built on March 30, 2026, 5:08 p.m.