|
190 | 190 | if isfield(simoptions, 'initialdist')
|
191 | 191 | StationaryDistKron=reshape(simoptions.initialdist,[N_a*N_z,1]);
|
192 | 192 | else
|
193 |
| - if simoptions.experienceasset==1 |
194 |
| - % There is not simulation command yet, so just have to do the |
195 |
| - % bare bones for the moment. I need to create a simulation command. |
196 |
| - |
197 |
| - % Just use a poor initial guesses |
198 |
| - StationaryDistKron=zeros(N_a,N_z); |
199 |
| - z_stat=ones(N_z,1)/N_z; |
200 |
| - for jj=1:10 |
201 |
| - z_stat=pi_z'*z_stat; |
202 |
| - end |
203 |
| - StationaryDistKron(ceil(N_a/2),:)=z_stat'; |
204 |
| - StationaryDistKron=reshape(StationaryDistKron,[N_a*N_z,1]); |
205 |
| - else |
206 |
| - % % Just use a poor initial guesses |
207 |
| - % StationaryDistKron=zeros(N_a,N_z); |
208 |
| - % z_stat=ones(N_z,1)/N_z; |
209 |
| - % for jj=1:10 |
210 |
| - % z_stat=pi_z'*z_stat; |
211 |
| - % end |
212 |
| - % StationaryDistKron(ceil(N_a/2),:)=z_stat'; |
213 |
| - % StationaryDistKron=reshape(StationaryDistKron,[N_a*N_z,1]); |
214 |
| - |
215 |
| - % Simulate an initial guess, as that makes it a bit faster |
216 |
| - StationaryDistKron=StationaryDist_Case1_Simulation_raw(PolicyKron,N_d,N_a,N_z,pi_z, simoptions); % create a better initial guess (this tends to give a better runtime-accuracy frontier than just iterating from poor initial guess) |
| 193 | + % Just use a poor initial guesses |
| 194 | + StationaryDistKron=zeros(N_a,N_z); |
| 195 | + z_stat=ones(N_z,1)/N_z; |
| 196 | + for jj=1:10 |
| 197 | + z_stat=pi_z'*z_stat; |
217 | 198 | end
|
| 199 | + StationaryDistKron(ceil(N_a/2),:)=z_stat'; |
| 200 | + StationaryDistKron=reshape(StationaryDistKron,[N_a*N_z,1]); |
| 201 | + % Note for self: Tan improvement divides into 2 steps, first is |
| 202 | + % policy, second is pi_z. Can't you then go a step further and |
| 203 | + % divide whole thing to just do 'only second step' until dist over z fully |
| 204 | + % converges, and after than 'only do first step' until get full |
| 205 | + % convergence? |
| 206 | + % This initial guess is kind of trying to partially exploit this |
| 207 | + % idea. |
218 | 208 | end
|
219 | 209 | end
|
220 | 210 |
|
|
0 commit comments