Dear Robert,
I am running Hopenhayn1992 and Hopenhayn&Rogerson1993 while studying with Chris Edmonds’ notes, and encountered errors in both. I couldn’t really figure out why, and it doesn’t seem to be the same problem as in previous posts. I must be missing something… Could you please help me fix this?
Error in Hopenhayn1992
Hopenhayn1992
vfoptions =
struct with fields:
endogenousexit: 1
keeppolicyonexit: 1
ReturnToExitFn: @(a_val,s_val)0
ReturnToExitFnParamNames: {}
Error using gpuArray/subsasgn
Assignment has more non-singleton rhs dimensions than non-singleton subscripts.
Error in ValueFnIter_Case1_EndogExit_Par2_raw (line 40)
ExitPolicy(:,z_c)=((ReturnToExitMatrix_z-Vtemp)>0); % Assumes that when indifferent you do not exit.
Error in ValueFnIter_Case1_EndogExit (line 98)
[VKron, Policy,ExitPolicy]=ValueFnIter_Case1_EndogExit_Par2_raw(V0Kron, n_d,n_a,n_z, pi_z, DiscountFactorParamsVec, ReturnMatrix, ReturnToExitMatrix, vfoptions.howards,
vfoptions.maxhowards,vfoptions.tolerance, vfoptions.keeppolicyonexit);
Error in ValueFnIter_Case1 (line 168)
[V, Policy,ExitPolicy]=ValueFnIter_Case1_EndogExit(V0, n_d,n_a,n_z,d_grid,a_grid,z_grid, pi_z, ReturnFn, Parameters, DiscountFactorParamNames, ReturnFnParamNames, vfoptions);
Error in Hopenhayn1992 (line 91)
[V,Policy,ExitPolicy]=ValueFnIter_Case1(n_d,n_a,n_z,d_grid,a_grid,z_grid, pi_z, ReturnFn, Params, DiscountFactorParamNames, ReturnFnParamNames, vfoptions);
Error in HopenhaynRogerson1993_Example
HopenhaynRogerson1993_Example
simoptions =
struct with fields:
agententryandexit: 1
endogenousexit: 1
Starting parallel pool (parpool) using the ‘local’ profile …
Connected to the parallel pool (number of workers: 6).
simoptions =
struct with fields:
DistOfNewAgents: {'upsilon'}
MassOfNewAgents: {'Ne'}
CondlProbOfSurvival: {'zeta'}
endogenousexit: 0
Not enough input arguments.
Error in EvalFnOnAgentDist_AggVars_Case1 (line 18)
AggVars=EvalFnOnAgentDist_AggVars_Case1_Mass(StationaryDist.pdf,StationaryDist.mass, PolicyIndexes, FnsToEvaluate, Parameters, FnsToEvaluateParamNames, EntryExitParamNames, n_d, n_a, n_z, d_grid,
a_grid, z_grid, Parallel,simoptions);
Error in HopenhaynRogerson1993_Example (line 155)
AggVars=EvalFnOnAgentDist_AggVars_Case1(StationaryDist, Policy, FnsToEvaluate, Params, FnsToEvaluateParamNames, n_d, n_a, n_z, d_grid, a_grid, z_grid, simoptions,EntryExitParamNames);
Thank you
You will need to update VFI Toolkit to the latest.