start_values: Generate Initial Values for BARMA Model Estimation

View source: R/start_values.R

start_valuesR Documentation

Generate Initial Values for BARMA Model Estimation

Description

This function calculates reasonable starting values for the parameters of various Beta Autoregressive Moving Average (BARMA) models. The method is based on the approach proposed by Ferrari & Cribari-Neto (2004) for beta regression, adapted here for the time series context.

Usage

start_values(y, link, ar = NA, ma = NA, X = NA)

Arguments

y

A numeric time series with values in the open interval (0, 1).

link

A string specifying the link function for the mean, such as '"logit"', '"probit"', or '"cloglog"'.

ar

A numeric vector of autoregressive (AR) lags. Defaults to 'NA' for models without an AR component.

ma

A numeric vector of moving average (MA) lags. Defaults to 'NA' for models without an MA component.

X

An optional numeric matrix or data frame of exogenous variables (regressors).

Details

The function computes initial values by fitting a linear model ('lm.fit') to the link-transformed response variable 'g(y)'. This provides a computationally cheap and stable way to initialize the main optimization algorithm.

The specific procedure depends on the model's structure:

  • For models with autoregressive (AR) terms, the lagged values of the transformed series 'g(y)' are used as predictors to estimate the initial 'alpha' (intercept) and 'varphi' (AR) coefficients.

  • If exogenous variables 'X' are included, they are added as predictors in the linear model to obtain initial 'beta' values.

  • Moving average (MA) coefficients ('theta') are initialized to zero, a standard practice in ARMA model estimation.

  • The initial value for the precision parameter 'phi' is derived from the variance of the residuals of the initial linear fit, following the methodology from Ferrari & Cribari-Neto (2004).

  • For a pure BMA model (no AR or X components), a simpler method is used where 'alpha' is the mean of 'g(y)' and 'phi' is based on the unconditional variance of 'y'.

This function is called internally by the main model fitting function but is exported for standalone use and inspection.

Value

A named numeric vector containing the initial values for the model parameters ('alpha', 'varphi', 'theta', 'phi', 'beta'), ready to be used by an optimization routine. Returns 'NULL' if the model specification is not recognized.

Author(s)

Original code by Fabio M. Bayer (bayer@ufsm.br). Substantially modified and improved by Everton da Costa (everto.cost@gmail.com).

References

Ferrari, S. L. P., & Cribari-Neto, F. (2004). Beta regression for modelling rates and proportions. *Journal of Applied Statistics*, 31(7), 799-818. <doi:10.1080/0266476042000214501>


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