We now consider aggregate model and add change in A and Q and make them
fluctuate according to some random process.
We approximate the continuous random model:
![]()
by switching model with infinite many states in order:
![]()
.
.
.
where
![]()
![]()
![]()
.
.
.
for many states.
We calculate each policy function for each A and Q as it is set like:
independently for each i and calculate the next index number.
We consider some random process of A and Q as
![]()
and
![]()
where
and
are error terms
with mean zero.
We implement column-by-column calculation:
from j=1 to
n
when we calculate each index vector. We then smooth out the points on the gird by one
of the following:
0:linear interpolation
1:polynomial
2:LOESS
3:LOWESS
4:Kernel regression
5:Smoothing natural spline
6:NURBS
7:Bezier Curve
locally by index numbers around the evaluated points only. We also implement
collocation method independently without forming a procedure.
We set K[ind[indn]] and K[indn] rather than K1=K[ind] and K.
All we have to do is change the functional setting of fc. It is optional to change
from small to large letters.