mscale_derivative: Compute the Gradient and Hessian of the M-Scale Function

mscale_derivativeR Documentation

Compute the Gradient and Hessian of the M-Scale Function

Description

Compute the derivative (gradient) or the Hessian of the M-scale function evaluated at the point x.

Compute the maximum derivative of the M-scale function with respect to each element over a grid of values.

Compute the maximum element in the gradient and Hessian of the M-scale function with respect to each element over a grid of values.

Usage

mscale_derivative(
  x,
  bdp = 0.25,
  order = 1,
  cc = consistency_const(bdp, "bisquare"),
  opts = mscale_algorithm_options()
)

max_mscale_derivative(
  x,
  grid,
  n_change,
  bdp = 0.25,
  cc = consistency_const(bdp, "bisquare"),
  opts = mscale_algorithm_options()
)

max_mscale_grad_hess(
  x,
  grid,
  n_change,
  bdp = 0.25,
  cc = consistency_const(bdp, "bisquare"),
  opts = mscale_algorithm_options()
)

Arguments

x

numeric values. Missing values are verbosely ignored.

bdp

desired breakdown point (between 0 and 0.5).

order

compute the gradient (order=1) or the gradient and the Hessian (order=2).

cc

cutoff value for the bisquare rho function. By default, chosen to yield a consistent estimate for the Normal distribution.

opts

a list of options for the M-scale estimation algorithm, see mscale_algorithm_options() for details.

grid

a grid of values to replace the first 1 - n_change elements in x.

n_change

the number of elements in x to replace with each value in grid.

Value

a vector of derivatives of the M-scale function, one per element in x.

a vector with 4 elements:

  1. the maximum absolute value of the gradient,

  2. the maximum absolute value of the Hessian elements,

  3. the M-scale associated with 1., and

  4. the M-scale associated with 2.

the maximum absolute derivative over the entire grid.

Functions

  • max_mscale_derivative(): maximum of the gradient

  • max_mscale_grad_hess(): maximum of the gradient and hessian


pense documentation built on Feb. 16, 2023, 9:36 p.m.