lae
- class quantecon.LAE(p, X)[source]
Bases:
objectAn instance is a representation of a look ahead estimator associated with a given stochastic kernel p and a vector of observations X.
- Parameters:
- pfunction
The stochastic kernel. A function p(x, y) that is vectorized in both x and y
- Xarray_like(float)
A vector containing observations
- Attributes:
- p, Xsee Parameters
Methods
__call__(y)A vectorized function that returns the value of the look ahead estimate at the values in the array y.
Examples
>>> import numpy as np >>> from quantecon import LAE >>> from scipy.stats import lognorm >>> p = lambda x, y: lognorm.pdf(y / x, 1) >>> X = np.exp(np.random.randn(100)) >>> psi = LAE(p, X) >>> y = np.linspace(0.1, 3, 100) >>> psi(y).shape # Evaluate look ahead estimate at grid of points y (100,)