Hi Robert,
I am trying to solve a partial equilibrium, life-cycle model of a single agent who is subject to idiosyncratic employment shocks (there are no aggregate shocks). The separation probability is exogenous but the job finding rate depends on search effort. [This is a stripped down version of the joint research project with Haomin]
For users interested in this type of models, two useful references are:
- Rasmus Lentz, 2009. “Optimal Unemployment Insurance in an Estimated Job Search Model with Savings ,” Review of Economic Dynamics, Elsevier for the Society for Economic Dynamics, vol. 12(1), pages 37-57, January
- Haomin Wang, 2019. “Intra-Household Risk Sharing and Job Search over the Business Cycle ,” Review of Economic Dynamics, Elsevier for the Society for Economic Dynamics, vol. 34, pages 165-182, October.
In terms of the toolkit, we have one semi-exogenous shock semiz and no purely exogenous shocks. Therefore I set
n_z=0;
z_grid = ;
pi_z = ;
and then I set
semiz_grid = [1,0]';
vfoptions.n_semiz = n_semiz;
vfoptions.semiz_grid = gpuArray(semiz_grid);
% Define the transition probabilities of the semi-exogenous states
vfoptions.SemiExoStateFn=@(semiz,semizprime,s,delta,lambdaB) LifeCycleModelV3_SemiExoStateFn(semiz,semizprime,s,delta,lambdaB);
The VFI works fine but when I call the distribution I get the error
Then following the suggestion in the error message, I tried to fool the toolkit by adding a fake z variable
n_z=1;
z_grid = 1;
pi_z = 1;
and modifying the functions accordingly (z is never used of course). But then I get another error
vfoptions =
struct with fields:
verbose: 1
n_semiz: 2
semiz_grid: [2×1 gpuArray]
SemiExoStateFn: [function_handle]
parallel: 2
returnmatrix: 2
lowmemory: 0
paroverz: 0
incrementaltype: 0
polindorval: 1
policy_forceintegertype: 0
outputkron: 0
exoticpreferences: 'None'
dynasty: 0
experienceasset: 0
riskyasset: 0
residualasset: 0
Error using ValueFnIter_Case1_FHorz
Have not implemented semi-exogenous shocks without at least two decision variables (one of which is
that which determines the semi-exog transitions)
Error in main (line 123)
[V, Policy]=ValueFnIter_Case1_FHorz(n_d,n_a,n_z,N_j,d_grid,a_grid,z_grid,pi_z,ReturnFn,Params,DiscountFactorParamNames,,vfoptions);
I wanted to generate some life-cycle profiles to test the model, that’s why I tried to compute the stationary distribution. For now I will try to get the profiles via panel simulations