Discretization of AR(1) Processes

Discretize AR(1) process following Tauchen (1986) < http://www.sciencedirect.com/science/article/pii/0165176586901680>. A discrete Markov chain that approximates in the sense of weak convergence a continuous-valued univariate Autoregressive process of first order is generated. It is a popular method used in economics and in finance.


Rtauchen

Build Status CRAN_Status_Badge

RTauchen uses Tauchen's (1986) method for discretizing AR(1) processes by choosing a finite set of points and transition probabilities, so the resulting finite-state Markov Chain mimics the original process. This method is computationally faster and numerically more stable than other methods (for example, Gaussian quadrature). This method is very popular in computational macroeconomics (See for example Deaton (1989), Sargent and Ljungqvist (2012) and Aiyagari (1994)).

Installation

# CRAN install
install.packages("Rtauchen")

# Github installation
# install.packages("devtools")
devtools::install_github("davidzarruk/Rtauchen")

Example 1

This example computes the transition probability matrix of the finite-state Markov chain approximation of an AR(1) process with: n = 5 (points in the Markov chain), ssigma = 0.02, lambda = 0.95, m = 3

results = Rtauchen(5, 0.02, 0.98, 3)

results
#               [,1]         [,2]         [,3]         [,4]         [,5]
# [1,]  9.997372e-01 2.627787e-04 0.000000e+00 0.000000e+00 0.000000e+00
# [2,]  4.433929e-05 9.998073e-01 1.483662e-04 0.000000e+00 0.000000e+00
# [3,]  6.080528e-30 8.198697e-05 9.998360e-01 8.198697e-05 0.000000e+00
# [4,]  2.785418e-78 3.349819e-29 1.483662e-04 9.998073e-01 4.433929e-05
# [5,] 3.015878e-150 4.649139e-77 1.804292e-28 2.627787e-04 9.997372e-01

Example 2

This example computes the grid of points of the finite-state Markov chain approximation of an AR(1) process with: n = 5 (points in the Markov chain), ssigma = 0.02, lambda = 0.95, m = 3

results = Tgrid(5, 0.02, 0.98, 3)

results
# [1] -0.3015113 -0.1507557  0.0000000  0.1507557  0.3015113

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("Rtauchen")

1.0 by David Zarruk Valencia, 10 years ago


https://github.com/davidzarruk/Rtauchen


Browse source code at https://github.com/cran/Rtauchen


Authors: David Zarruk Valencia & Rodrigo Azuero Melo


Documentation:   PDF Manual  


GPL (>= 2) license


Imports stats


Imported by sgmodel.


See at CRAN