likelihood_ratio.par: Computes log likelihood ratio for partial autoregressive...

Description Usage Arguments Value Author(s) References See Also

Description

Computes the log likelihood ratio for the partially autoregressive model.

First, a fit is performed for the specified null model. Then, a fit is performed for the alternative model that the sequence is partially autoregressive. The likelihood scores are computed for both models, and the log likelihood ratio is returned.

Usage

1
2
likelihood_ratio.par(X, robust = FALSE, null_model = c("rw", "ar1"), 
  opt_method = c("css", "kfas", "ss"), nu = par.nu.default())

Arguments

X

The numeric vector or zoo vector to which the partially autoregressive model is being fit.

robust

If TRUE, then errors are assumed to follow a t-distribution with nu degrees of freedom. If FALSE, then errors are assumed to follow a normal distribution. Default: FALSE

null_model

Specifies the null hypothesis:

  • "rw" Pure random walk (e.g., sigma_M = 0)

  • "ar1" Pure autoregressive (e.g., sigma_R = 0)

Default: "rw"

opt_method

The method to be used for calculating the negative log likelihood.

  • "ss" Steady-state Kalman filter with normally distributed errors

  • "css" Steady-state Kalman filter with normally distributed errors, coded in C++

  • "kfas" Traditional Kalman filter of the KFAS package

Default: "css"

nu

If robust is TRUE, this specifies the number of degrees of freedom of the t-distribution. Default: 5

Value

A numeric value representing the log likelihood ratio

Author(s)

Matthew Clegg matthewcleggphd@gmail.com

References

Clegg, Matthew. Modeling Time Series with Both Permanent and Transient Components using the Partially Autoregressive Model. Available at SSRN: http://ssrn.com/abstract=2556957

See Also

fit.par


partialAR documentation built on April 14, 2020, 6:05 p.m.