score_vector_barma: Score Vector for the BARMA Model

View source: R/score_vector_barma.R

score_vector_barmaR Documentation

Score Vector for the BARMA Model

Description

Computes the score vector (gradient of the log-likelihood) for the Beta Autoregressive Moving Average (BARMA) model at a given parameter vector. Used internally by barma during optimization via the BFGS algorithm.

Usage

score_vector_barma(
  y,
  ar,
  ma,
  alpha,
  varphi,
  theta,
  phi,
  link,
  xreg = NULL,
  beta = NULL
)

Arguments

y

A time series object (ts) with values strictly in (0, 1).

ar

A numeric vector specifying the autoregressive (AR) lags. Use NA or NULL if no AR component.

ma

A numeric vector specifying the moving average (MA) lags. Use NA or NULL if no MA component.

alpha

The intercept parameter.

varphi

A numeric vector of AR parameters. Use numeric(0) if no AR component.

theta

A numeric vector of MA parameters. Use numeric(0) if no MA component.

phi

The precision parameter (must be positive).

link

A character string specifying the link function. One of "logit", "probit", "cloglog", or "loglog".

xreg

An optional matrix of external regressors.

beta

An optional numeric vector of regression coefficients corresponding to xreg.

Value

A numeric vector of the same length as the parameter vector, giving the partial derivatives of the log-likelihood with respect to each parameter.

See Also

barma, loglik_barma, fim_barma


betaARMA documentation built on March 29, 2026, 5:08 p.m.