lae

Filename: lae.py

Authors: Thomas J. Sargent, John Stachurski,

Computes a sequence of marginal densities for a continuous state space Markov chain \(X_t\) where the transition probabilities can be represented as densities. The estimate of the marginal density of \(X_t\) is

rac{1}{n} sum_{i=0}^n p(X_{t-1}^i, y)

This is a density in y.

References

http://quant-econ.net/py/stationary_densities.html

class quantecon.lae.LAE(p, X)[source]

Bases: object

An instance is a representation of a look ahead estimator associated with a given stochastic kernel p and a vector of observations X.

Parameters:

p : function

The stochastic kernel. A function p(x, y) that is vectorized in both x and y

X : array_like(float)

A vector containing observations

Examples

>>> psi = LAE(p, X)
>>> y = np.linspace(0, 1, 100)
>>> psi(y)  # Evaluate look ahead estimate at grid of points y

Attributes

p, X (see Parameters)

Methods

__call__(y) A vectorized function that returns the value of the look ahead estimate at the values in the array y.