Learn R Programming

qgarch (version 0.1.0)

qgarch_fit: Fit generalized qgarch(m, n) models

Description

Fits QGARCH-in-mean models using nonlinear minimization of the negative log-likelihood. Four variants are supported: a zero-lambda model, a restricted-lambda model, a free-lambda model, and a threshold model with state-dependent lambda.

Usage

qgarch_fit(
  x,
  model = c("zero", "restricted", "free", "threshold"),
  arch_order = 1L,
  garch_order = 1L,
  threshold_indicator = NULL,
  start = NULL,
  rho = 1,
  steptol = 1e-10,
  typsize = 0.1,
  iterlim = 300L,
  print.level = 0,
  hessian = TRUE,
  vcov_type = c("auto", "sandwich", "hessian", "opg", "none")
)

Value

An object of class "qgarch".

Arguments

x

A numeric vector or one-column data frame containing the observed series. The series must contain only finite, non-missing values.

model

Character string specifying the model variant. Must be one of "zero", "restricted", "free", or "threshold".

arch_order

Positive integer giving the ARCH lag order m.

garch_order

Positive integer giving the GARCH lag order n.

threshold_indicator

Optional threshold indicator used only when model = "threshold". Must have the same length as x. Nonzero values are converted to 1 and zero values to 0.

start

Optional starting values. May be NULL, a numeric vector, or a list of numeric vectors.

rho

Scalar used in the restricted-lambda mapping.

steptol

Step tolerance passed to stats::nlm().

typsize

Typical size passed to stats::nlm(). A single value is repeated to the appropriate length.

iterlim

Maximum number of iterations passed to stats::nlm().

print.level

Print level passed to stats::nlm().

hessian

Logical; should the Hessian be returned by stats::nlm()?

vcov_type

Character string controlling standard-error estimation. One of "auto", "sandwich", "hessian", "opg", or "none". In "auto" mode, Hessian-based standard errors are tried first.