TMB Documentation  v1.9.11
Public Member Functions | List of all members
density::ARk_t< scalartype_ > Class Template Reference

Stationary AR(k) process. More...

#include <density.hpp>

Public Member Functions

vectortype cov (int n)
 Covariance extractor. Run Youle-Walker recursions and return a vector of length n representing the auto-covariance function.
 
scalartype operator() (vectortype x)
 Evaluate the negative log density.
 

Detailed Description

template<class scalartype_>
class density::ARk_t< scalartype_ >

Stationary AR(k) process.

Parameters
phi_Vector of length k with parameters.
Class to evaluate the negative log density of a stationary 
AR(k)-process with parameter vector phi=[phi_1,...,phi_k]:

x[t]=phi_1*x[t-1]+...+phi_k*x[t-k]+eps[t]

where eps[t]~N(0,sigma^2). The parameter sigma^2 is chosen to 
obtain V(x[t])=1 so that the class actually specifies a correlation
model.

Examples: ARk(phi)  <-- simple mean zero variance 1 AR(k) process.

Steady state initial distribution is found by (e.g. k=3)

[gamma(1)]    [gamma(0) gamma(1) gamma(2)]     [phi1]
[ ....   ] =  [gamma(1) gamma(0) gamma(1)]  *  [phi2]
[gamma(3)]    [gamma(2) gamma(1) gamma(0)]     [phi3]

Definition at line 495 of file density.hpp.


The documentation for this class was generated from the following file:
License: GPL v2