I paste below some code to create an excel file to take the estimated mode from a failed estimation run, and then re-start the estimation using the estimated mode as the new initial values.
After the excel file is produced, just copy and paste the contents into the estimated_params_init section in the mod file.
Cheers
Reuben
load([M_.fname '_mode']);
xlswrite([M_.fname 'PosteriorMode.xlsx'], cellstr(repmat('stderr',estim_params_.nvx,1)), 'PosteriorMode','A1');
xlswrite([M_.fname 'PosteriorMode.xlsx'], parameter_names, 'PosteriorMode','B1');
xlswrite([M_.fname 'PosteriorMode.xlsx'], repmat(',',estim_params_.nvx +estim_params_.np,1), 'PosteriorMode','C1');
xlswrite([M_.fname 'PosteriorMode.xlsx'], xparam1, 'PosteriorMode','D1');
xlswrite([M_.fname 'PosteriorMode.xlsx'], repmat(';',estim_params_.nvx +estim_params_.np,1), 'PosteriorMode','E1');