discretize_AR - fabiankindermann/ce-fortran GitHub Wiki
subroutine discretize_AR(rho, mu, sigma_eps, z, pi, w)
This subroutine calculates the nodes , transition matrix
, and weights
for an approximation of an AR(1) process with normally distributed innovations of the type
We can use the nodes and weights, for example, to calculate unconditional moments as
-
real*8 :: rho
A scalar indicating the autocorrelation coefficient. This input value needs to be an element of the interval
.
-
real*8 :: mu
A scalar indicating the unconditional mean.
-
real*8 :: sigma_eps
A scalar indicating the variance of the innovation term. This input value can not be smaller than zero.
-
real*8 :: z(:)
A one-dimensional array into which the subroutine stores the approximation nodes.
-
real*8 :: pi(:, :)
A two-dimensional array into which the subroutine stores the transition matrix. Note that along each dimension,
pi
needs to have the same length asz
.
-
real*8 :: w(:)
A one-dimensional array into which the subroutine stores the weightsof the unconditional distribution. Note that
w
needs to have the same length asz
.
- For further reading refer to:
- Kopecky, K.A. & Suen, R.M.H. (2010). Finite state Markov-chain approximations to highly persistent processes. Review of Economic Dynamics, 13(3), 701-714.
- Rouwenhorst, K.G. (1995). Asset pricing implications of equilibrium business cycle models. in: Cooley, T.F. (Ed.), Frontiers in Business Cycle Research, Princeton: Princeton University Press, 294-330.
- This routine is used in the following programs:
prog09_03.f90
prog09_04.f90
prog09_05.f90
prog09_06.f90
prog09_07.f90
prog09_08.f90
prog09_09.f90
prog09_10.f90
prog10_01.f90
prog10_02.f90
prog10_03.f90
prog10_01.f90
prog11_02.f90
prog11_03.f90