Learn R Programming

EstemPMM (version 0.1.1)

ma_pmm2: Fit an MA model using PMM2 (wrapper)

Description

Fit an MA model using PMM2 (wrapper)

Usage

ma_pmm2(
  x,
  order = 1,
  method = "pmm2",
  max_iter = 50,
  tol = 1e-06,
  include.mean = TRUE,
  initial = NULL,
  na.action = na.fail,
  regularize = TRUE,
  reg_lambda = 1e-08,
  verbose = FALSE
)

Value

An S4 object of class MAPMM2 containing moving-average coefficients, residual innovations, central moments, model order, intercept, original series, and convergence diagnostics.

Arguments

x

Numeric vector of time series data

order

Model order specification: - For AR models: a single integer (AR order) - For MA models: a single integer (MA order) - For ARMA models: vector c(p, q) (AR and MA orders) - For ARIMA models: vector c(p, d, q) (AR, differencing, and MA orders)

method

String: estimation method, one of "pmm2" (default), "css", "ml", "yw", "ols"

max_iter

Integer: maximum number of iterations for the algorithm

tol

Numeric: tolerance for convergence

include.mean

Logical: whether to include a mean (intercept) term

initial

List or vector of initial parameter estimates (optional)

na.action

Function for handling missing values, default is na.fail

regularize

Logical, add small values to diagonal for numerical stability

reg_lambda

Regularization parameter (if regularize=TRUE)

verbose

Logical: whether to print progress information