Skip to content
R code to estimate a (possibly non-stationary) first-order, Markov chain from a panel of observations.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Non-stationary, non-parametric Markov-chain Approximation in R

Given a panel of observations for a variable y, the program estimates a first-order Markov chain approximation to the stochastic data generating process, as described in the paper "Nonlinear Household Earnings Dynamics, Self-Insurance, and Welfare" by Mariacristina De Nardi, Giulio Fella and Gonzalo Paz-Pardo, Journal of the European Economic Association, (

The estimated Markov chain has a (time/age)-independent number of states but both the points of the state space and the transition matrices are allowed to change with time/age.

The points of the state space are obtained by discretizing the marginal distribution at each age/time into a finite number of bins and assigning to each bin the average or median of observations falling into it. The transitions matrices are obtained as the fraction of observations in each bin at age/time t transiting to each bin at age/time t+1.

The method does not hinge on a parametric specification of the data generating process or require the process to be stationary, though it requires a finite horizon. The dataset should have a large cross-sectional (> 1 million) dimension to keep sampling error under control.

You can’t perform that action at this time.