loglik.par: Negative log likelihood of a partially autoregressive fit

Description Usage Arguments Value Author(s) References See Also Examples

Description

Negative log likelihood of a partially autoregressive fit

Usage

1
2
3
loglik.par(Y, rho, sigma_M, sigma_R, M0 = 0, R0 = Y[1], 
  calc_method = c("css", "kfas", "ss", "sst", "csst"), 
  nu = par.nu.default())

Arguments

Y

A numeric vector representing the time series to which the partially autoregressive model is being fit.

rho

The coefficient of mean reversion

sigma_M

Standard deviation of the innovations of the mean-reverting process

sigma_R

Standard deviation of the innovations of the random walk process

M0

Initial value of the mean-reverting process

R0

Initial value of the random walk process

calc_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

  • "sst" Steady-state Kalman filter with t-distributed errors

  • "csst" Steady-state Kalman filter with t-distributed errors, coded in C++

Default: "css"

nu

If calc_method is "sst" or "csst", this specifies the number of degrees of freedom of the t-distribution.

Value

Returns the negative log likelihood of fitting the partially autoregressive model with parameters (rho, sigma_M, sigma_R, M0, R0) to the data series Y.

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

Examples

1
2
3
loglik.par(0,0,0,1)  # -> same as -log(dnorm(0))
loglik.par(0,0,1,0)  # -> same as -log(dnorm(0))
loglik.par(0,0,1,1)  # -> same as -log(dnorm(0,0,sqrt(2)))

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