I have found the error reported below when running the following line:
sim_panel = SimPanelValues_FHorz_Case1(jequaloneDist,Policy,FnsToEval,Params,[],n_d,n_a,n_z,N_j,d_grid,a_grid,z_grid,pi_z_J,simoptions);
Error using gpuArray/reshape
Number of elements must not change. Use [] as one of the size inputs to automatically calculate
the appropriate size for that dimension.
Error in KronPolicyIndexes_FHorz_Case1 (line 11)
Policy=reshape(Policy,[size(Policy,1),N_a,N_z,N_j]);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in SimPanelValues_FHorz_Case1 (line 78)
PolicyIndexes=KronPolicyIndexes_FHorz_Case1(Policy, n_d, n_a, n_z, N_j,simoptions); % Create it here as want it both here and inside SimPanelIndexes_FHorz_Case1 (which will recognise that it is already in this form)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
My model has this “action space“: (d,aprime,a,semiz1,semiz2,semiz3,z)
I have to calculate some statistics such as the average change in wage conditional on unemployment spells of different duration and is complicated/I don’t know to do this with the agents distribution