Learn R Programming

ordinalTables (version 1.0.0.3)

McCullagh_newton_raphson_update: Newton-Raphson update.

Description

Using gradient and hessian, it finds the update direction. Then it tries increassingly smaller step sizes until the step*update yields a valid pi matrix.

Usage

McCullagh_newton_raphson_update(
  n,
  gradient,
  hessian,
  psi,
  delta,
  alpha,
  c = 1,
  max_iter = 50,
  verbose = FALSE
)

Value

list containing new parameters psi: matrix of symmetry parameters delta; scalar or vector of asymmetry parameters alpha: vector of asymmetry parameters c: scaling coefficient to ensure pi sums to 1.0

Arguments

n

matrix of observed counts

gradient

gradient vector

hessian

hessian matrix

psi

matrix of symmetry parameters

delta

scalar or vector of asymmetry parameters

alpha

vector of asymmetry parameters

c

scaling factor to ensure pi sums to 1.0. Default is 1.0

max_iter

maximum number of iterations. Default is 50.

verbose

should cycle-by-cycle into be printed out. Default is FALSE, do not print.