Learn R Programming

EstemPMM (version 0.1.1)

pmm2_algorithm: Universal PMM2 algorithm for all model types

Description

Universal PMM2 algorithm for all model types

Usage

pmm2_algorithm(
  b_init,
  X,
  y,
  m2,
  m3,
  m4,
  max_iter = 50,
  tol = 1e-06,
  regularize = TRUE,
  reg_lambda = 1e-08,
  verbose = FALSE,
  poly_terms = NULL
)

Value

List with estimation results

Arguments

b_init

Initial parameter estimates

X

Design matrix

y

Response vector

m2, m3, m4

Central moments

max_iter

Maximum number of iterations

tol

Tolerance for convergence

regularize

Whether to add regularization

reg_lambda

Regularization parameter

verbose

Whether to print progress information

poly_terms

Pre-computed polynomial coefficients (list with elements A, B, C); allows passing custom values for special scenarios, otherwise they are computed from moments