Derive Distributions for Risky + Safe Asets + Interpolated Distribution (Analytical)
back to Fan's Dynamic Assets Repository Table of Content.
Contents
- FF_IWKZ_DS finds the stationary asset distributions
- Default
- Parse Parameters
- Start Profiler and Timer
- A. Get Size of Endogenous and Exogenous State
- B. Solve for Index
- C. Expand Index so Matches Full States Index Dimension
- D. Transition Probabilities from (M by M) to (NxM) by M
- E. Fill mt_pol_idx_mesh_idx to mt_full_trans_mat SPARSE
- F. Stationary Distribution Method A, Eigenvector Approach
- G. Stationary Vector to Stationary Matrix in Original Dimensions
- End Time and Profiler
- f(y), f(c), f(a), f(k): Generate Key Distributional Statistics for Each outcome
function [result_map] = ff_iwkz_ds_vecsv(varargin)
FF_IWKZ_DS finds the stationary asset distributions
Building on the Two Assets Two-Step Interpolated Dynamic Programming Problem ff_iwkz_vf_vecsv, here we solve for the asset distribution. This version of the program is semi-analytical.
This is the two-stage with interpolation version of ff_akz_ds_vecsv. See that file for additional descriptions and comparisons. These two functions are nearly identical
The code here works when we are looking for the distribution of f(a,z), where a'(a,z,z'), meaning that the a next period is determined by a last period and some shock last period as well as shock this period. a here is cash-on-hand. This contrasts with ff_az_ds_vecsv, which works for a'(a,z), a' can not be a function of z'.
@example
% Get Default Parameters it_param_set = 6; [param_map, support_map] = ffs_az_set_default_param(it_param_set); % Change Keys in param_map param_map('it_w_n') = 750; param_map('it_ak_n') = param_map('it_w_n'); param_map('it_z_n') = 11; param_map('fl_a_max') = 100; param_map('fl_w') = 1.3; % Change Keys support_map support_map('bl_display') = false; support_map('bl_post') = true; support_map('bl_display_final') = false; % Call Program with external parameters that override defaults ff_iwkz_ds_vecsv(param_map, support_map);
@include
@seealso
- derive distribution f(y'(y,z)) one asset loop: ff_az_ds
- derive distribution f(y'({x,y},z)) two assets loop: ff_akz_ds
- derive distribution f(y'({x,y},z, z')) two assets loop: ff_iwkz_ds
- derive distribution f(y'({y},z)) or f(y'({x,y},z)) vectorized: ff_az_ds_vec
- derive distribution f(y'({y},z, z')) or f(y'({x,y},z, z')) vectorized: ff_iwkz_ds_vec
- derive distribution f(y'({y},z)) or f(y'({x,y},z)) semi-analytical: ff_az_ds_vecsv
- derive distribution f(y'({y},z, z')) or f(y'({x,y},z, z')) semi-analytical: ff_iwkz_ds_vecsv
Default
Program can be externally invoked with az, abz or various other programs. By default, program invokes using az model programs:
- it_subset = 5 is basic invoke quick test
- it_subset = 6 is invoke full test
- it_subset = 7 is profiling invoke
- it_subset = 8 is matlab publish
- it_subset = 9 is invoke operational (only final stats) and coh graph
if (~isempty(varargin)) % if invoked from outside override fully [param_map, support_map, armt_map, func_map, result_map] = varargin{:}; else % default invoke close all; it_param_set = 8; st_akz_or_iwkz = 'iwkz'; % 1. Generate Parameters [param_map, support_map] = ffs_akz_set_default_param(it_param_set); % Note: param_map and support_map can be adjusted here or outside to override defaults % param_map('it_w_n') = 50; % param_map('it_z_n') = 15; param_map('st_analytical_stationary_type') = 'eigenvector'; % 2. Generate function and grids [armt_map, func_map] = ffs_akz_get_funcgrid(param_map, support_map); % 1 for override % 3. Solve value and policy function using ff_iwkz_vf_vecsv if (strcmp(st_akz_or_iwkz, 'iwkz')) [result_map] = ff_iwkz_vf_vecsv(param_map, support_map, armt_map, func_map); end end
---------------------------------------- ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Begin: Show all key and value pairs from container CONTAINER NAME: SUPPORT_MAP ---------------------------------------- Map with properties: Count: 42 KeyType: char ValueType: any xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ---------------------------------------- ---------------------------------------- pos = 1 ; key = bl_display ; val = false pos = 2 ; key = bl_display_defparam ; val = true pos = 3 ; key = bl_display_dist ; val = false pos = 4 ; key = bl_display_evf ; val = false pos = 5 ; key = bl_display_final ; val = false pos = 6 ; key = bl_display_final_dist ; val = true pos = 7 ; key = bl_display_final_dist_detail ; val = true pos = 8 ; key = bl_display_funcgrids ; val = false pos = 9 ; key = bl_graph ; val = true pos = 10 ; key = bl_graph_coh_t_coh ; val = true pos = 11 ; key = bl_graph_evf ; val = false pos = 12 ; key = bl_graph_funcgrids ; val = false pos = 13 ; key = bl_graph_onebyones ; val = true pos = 14 ; key = bl_graph_pol_lvl ; val = false pos = 15 ; key = bl_graph_pol_pct ; val = false pos = 16 ; key = bl_graph_val ; val = false pos = 17 ; key = bl_img_save ; val = false pos = 18 ; key = bl_mat ; val = false pos = 19 ; key = bl_post ; val = true pos = 20 ; key = bl_profile ; val = false pos = 21 ; key = bl_profile_dist ; val = false pos = 22 ; key = bl_time ; val = false pos = 23 ; key = it_display_every ; val = 20 pos = 24 ; key = it_display_final_colmax ; val = 12 pos = 25 ; key = it_display_final_rowmax ; val = 100 pos = 26 ; key = it_display_summmat_colmax ; val = 7 pos = 27 ; key = it_display_summmat_rowmax ; val = 7 pos = 28 ; key = st_img_name_main ; val = ff_iwkz_vf_vecsv_default pos = 29 ; key = st_img_path ; val = C:/Users/fan/CodeDynaAsset//m_akz//solve/img/ pos = 30 ; key = st_img_prefix ; val = pos = 31 ; key = st_img_suffix ; val = _p8.png pos = 32 ; key = st_mat_name_main ; val = ff_iwkz_vf_vecsv_default pos = 33 ; key = st_mat_path ; val = C:/Users/fan/CodeDynaAsset//m_akz//solve/mat/ pos = 34 ; key = st_mat_prefix ; val = pos = 35 ; key = st_mat_suffix ; val = _p8 pos = 36 ; key = st_mat_test_path ; val = C:/Users/fan/CodeDynaAsset//m_akz//test/ff_iwkz_ds_vecsv/mat/ pos = 37 ; key = st_matimg_path_root ; val = C:/Users/fan/CodeDynaAsset//m_akz/ pos = 38 ; key = st_profile_name_main ; val = ff_iwkz_vf_vecsv_default pos = 39 ; key = st_profile_path ; val = C:/Users/fan/CodeDynaAsset//m_akz//solve/profile/ pos = 40 ; key = st_profile_prefix ; val = pos = 41 ; key = st_profile_suffix ; val = _p8 pos = 42 ; key = st_title_prefix ; val = ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Scalars in Container and Sizes and Basic Statistics xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx i idx value __ ___ _____ bl_display 1 1 0 bl_display_defparam 2 2 1 bl_display_dist 3 3 0 bl_display_evf 4 4 0 bl_display_final 5 5 0 bl_display_final_dist 6 6 1 bl_display_final_dist_detail 7 7 1 bl_display_funcgrids 8 8 0 bl_graph 9 9 1 bl_graph_coh_t_coh 10 10 1 bl_graph_evf 11 11 0 bl_graph_funcgrids 12 12 0 bl_graph_onebyones 13 13 1 bl_graph_pol_lvl 14 14 0 bl_graph_pol_pct 15 15 0 bl_graph_val 16 16 0 bl_img_save 17 17 0 bl_mat 18 18 0 bl_post 19 19 1 bl_profile 20 20 0 bl_profile_dist 21 21 0 bl_time 22 22 0 it_display_every 23 23 20 it_display_final_colmax 24 24 12 it_display_final_rowmax 25 25 100 it_display_summmat_colmax 26 26 7 it_display_summmat_rowmax 27 27 7 ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Strings in Container and Sizes and Basic Statistics xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx i idx __ ___ st_img_name_main 1 28 st_img_path 2 29 st_img_prefix 3 30 st_img_suffix 4 31 st_mat_name_main 5 32 st_mat_path 6 33 st_mat_prefix 7 34 st_mat_suffix 8 35 st_mat_test_path 9 36 st_matimg_path_root 10 37 st_profile_name_main 11 38 st_profile_path 12 39 st_profile_prefix 13 40 st_profile_suffix 14 41 st_title_prefix 15 42 ---------------------------------------- ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Begin: Show all key and value pairs from container CONTAINER NAME: ARMT_MAP ---------------------------------------- Map with properties: Count: 17 KeyType: char ValueType: any xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ---------------------------------------- ---------------------------------------- pos = 1 ; key = ar_a_meshk ;rown= 568 ,coln= 1 ar_a_meshk :mu= 28.8604 ,sd= 16.4498 ,min= 0.44365 ,max= 57.2772 zi_1_c1 _______ zi_1_R1 0.44365 zi_2_R2 0.54388 zi_3_R3 0.64412 zi_284_r284 28.81 zi_566_r566 57.077 zi_567_r567 57.177 zi_568_r568 57.277 pos = 2 ; key = ar_a_mw_wth_na ;rown= 2500 ,coln= 1 ar_a_mw_wth_na :mu= NaN ,sd= NaN ,min= 0 ,max= 50 zi_1_c1 _______ zi_1_R1 0 zi_2_R2 NaN zi_3_R3 NaN zi_1250_r1250 NaN zi_2498_r2498 2.0408 zi_2499_r2499 1.0204 zi_2500_r2500 0 pos = 3 ; key = ar_interp_c_grid ;rown= 1 ,coln= 572761 ar_interp_c_grid :mu= 28.6391 ,sd= 16.5342 ,min= 0.001 ,max= 57.2772 zi_1_C1 zi_2_C2 zi_3_C3 zi_286381_c286381 zi_572759_c572759 zi_572760_c572760 zi_572761_c572761 _______ _______ _______ _________________ _________________ _________________ _________________ zi_1_r1 0.001 0.0011 0.0012 28.639 57.277 57.277 57.277 pos = 4 ; key = ar_interp_coh_grid ;rown= 1 ,coln= 568 ar_interp_coh_grid :mu= 28.8604 ,sd= 16.4498 ,min= 0.44365 ,max= 57.2772 zi_1_C1 zi_2_C2 zi_3_C3 zi_284_c284 zi_566_c566 zi_567_c567 zi_568_c568 _______ _______ _______ ___________ ___________ ___________ ___________ zi_1_r1 0.44365 0.54388 0.64412 28.81 57.077 57.177 57.277 pos = 5 ; key = ar_k ;rown= 1 ,coln= 50 ar_k :mu= 25 ,sd= 14.8749 ,min= 0 ,max= 50 zi_1_C1 zi_2_C2 zi_3_C3 zi_25_c25 zi_48_c48 zi_49_c49 zi_50_c50 _______ _______ _______ _________ _________ _________ _________ zi_1_r1 0 1.0204 2.0408 24.49 47.959 48.98 50 pos = 6 ; key = ar_k_mesha ;rown= 568 ,coln= 1 ar_k_mesha :mu= 0 ,sd= 0 ,min= 0 ,max= 0 zi_1_c1 _______ zi_1_R1 0 zi_2_R2 0 zi_3_R3 0 zi_284_r284 0 zi_566_r566 0 zi_567_r567 0 zi_568_r568 0 pos = 7 ; key = ar_k_mw_wth_na ;rown= 2500 ,coln= 1 ar_k_mw_wth_na :mu= NaN ,sd= NaN ,min= 0 ,max= 50 zi_1_c1 _______ zi_1_R1 0 zi_2_R2 NaN zi_3_R3 NaN zi_1250_r1250 NaN zi_2498_r2498 47.959 zi_2499_r2499 48.98 zi_2500_r2500 50 pos = 8 ; key = ar_stationary ;rown= 1 ,coln= 15 ar_stationary :mu= 0.066667 ,sd= 0.060897 ,min= 0.0027089 ,max= 0.16757 zi_1_C1 zi_2_C2 zi_3_C3 zi_8_C8 zi_13_c13 zi_14_c14 zi_15_c15 _________ _________ ________ _______ _________ _________ _________ zi_1_r1 0.0027089 0.0069499 0.018507 0.16757 0.018507 0.0069499 0.0027089 pos = 9 ; key = ar_w ;rown= 1 ,coln= 50 ar_w :mu= 25 ,sd= 14.8749 ,min= 0 ,max= 50 zi_1_C1 zi_2_C2 zi_3_C3 zi_25_c25 zi_48_c48 zi_49_c49 zi_50_c50 _______ _______ _______ _________ _________ _________ _________ zi_1_r1 0 1.0204 2.0408 24.49 47.959 48.98 50 pos = 10 ; key = ar_z ;rown= 1 ,coln= 15 ar_z :mu= 1.1347 ,sd= 0.69878 ,min= 0.34741 ,max= 2.567 zi_1_C1 zi_2_C2 zi_3_C3 zi_8_C8 zi_13_c13 zi_14_c14 zi_15_c15 _______ _______ _______ _______ _________ _________ _________ zi_1_r1 0.34741 0.40076 0.4623 0.94436 1.9291 2.2253 2.567 pos = 11 ; key = it_ameshk_n ; val = 568 pos = 12 ; key = mt_coh_wkb ;rown= 568 ,coln= 15 mt_coh_wkb :mu= 28.8604 ,sd= 16.4363 ,min= 0.44365 ,max= 57.2772 zi_1_C1 zi_2_C2 zi_3_C3 zi_8_C8 zi_13_c13 zi_14_c14 zi_15_c15 _______ _______ _______ _______ _________ _________ _________ zi_1_R1 0.44365 0.44365 0.44365 0.44365 0.44365 0.44365 0.44365 zi_2_R2 0.54388 0.54388 0.54388 0.54388 0.54388 0.54388 0.54388 zi_3_R3 0.64412 0.64412 0.64412 0.64412 0.64412 0.64412 0.64412 zi_284_r284 28.81 28.81 28.81 28.81 28.81 28.81 28.81 zi_566_r566 57.077 57.077 57.077 57.077 57.077 57.077 57.077 zi_567_r567 57.177 57.177 57.177 57.177 57.177 57.177 57.177 zi_568_r568 57.277 57.277 57.277 57.277 57.277 57.277 57.277 pos = 13 ; key = mt_interp_coh_grid_mesh_z ;rown= 568 ,coln= 15 mt_interp_coh_grid_mesh_z :mu= 28.8604 ,sd= 16.4363 ,min= 0.44365 ,max= 57.2772 zi_1_C1 zi_2_C2 zi_3_C3 zi_8_C8 zi_13_c13 zi_14_c14 zi_15_c15 _______ _______ _______ _______ _________ _________ _________ zi_1_R1 0.44365 0.44365 0.44365 0.44365 0.44365 0.44365 0.44365 zi_2_R2 0.54388 0.54388 0.54388 0.54388 0.54388 0.54388 0.54388 zi_3_R3 0.64412 0.64412 0.64412 0.64412 0.64412 0.64412 0.64412 zi_284_r284 28.81 28.81 28.81 28.81 28.81 28.81 28.81 zi_566_r566 57.077 57.077 57.077 57.077 57.077 57.077 57.077 zi_567_r567 57.177 57.177 57.177 57.177 57.177 57.177 57.177 zi_568_r568 57.277 57.277 57.277 57.277 57.277 57.277 57.277 pos = 14 ; key = mt_k_wth_na ;rown= 50 ,coln= 50 mt_k_wth_na :mu= NaN ,sd= NaN ,min= 0 ,max= 50 zi_1_C1 zi_2_C2 zi_3_C3 zi_25_c25 zi_48_c48 zi_49_c49 zi_50_c50 _______ _______ _______ _________ _________ _________ _________ zi_1_R1 0 0 0 0 0 0 0 zi_2_R2 NaN 1.0204 1.0204 1.0204 1.0204 1.0204 1.0204 zi_3_R3 NaN NaN 2.0408 2.0408 2.0408 2.0408 2.0408 zi_25_r25 NaN NaN NaN 24.49 24.49 24.49 24.49 zi_48_r48 NaN NaN NaN NaN 47.959 47.959 47.959 zi_49_r49 NaN NaN NaN NaN NaN 48.98 48.98 zi_50_r50 NaN NaN NaN NaN NaN NaN 50 pos = 15 ; key = mt_z_mesh_coh_interp_grid ;rown= 568 ,coln= 15 mt_z_mesh_coh_interp_grid :mu= 1.1347 ,sd= 0.67512 ,min= 0.34741 ,max= 2.567 zi_1_C1 zi_2_C2 zi_3_C3 zi_8_C8 zi_13_c13 zi_14_c14 zi_15_c15 _______ _______ _______ _______ _________ _________ _________ zi_1_R1 0.34741 0.40076 0.4623 0.94436 1.9291 2.2253 2.567 zi_2_R2 0.34741 0.40076 0.4623 0.94436 1.9291 2.2253 2.567 zi_3_R3 0.34741 0.40076 0.4623 0.94436 1.9291 2.2253 2.567 zi_284_r284 0.34741 0.40076 0.4623 0.94436 1.9291 2.2253 2.567 zi_566_r566 0.34741 0.40076 0.4623 0.94436 1.9291 2.2253 2.567 zi_567_r567 0.34741 0.40076 0.4623 0.94436 1.9291 2.2253 2.567 zi_568_r568 0.34741 0.40076 0.4623 0.94436 1.9291 2.2253 2.567 pos = 16 ; key = mt_z_mesh_coh_wkb ;rown= 1275 ,coln= 15 mt_z_mesh_coh_wkb :mu= 1.1347 ,sd= 0.6751 ,min= 0.34741 ,max= 2.567 zi_1_C1 zi_2_C2 zi_3_C3 zi_8_C8 zi_13_c13 zi_14_c14 zi_15_c15 _______ _______ _______ _______ _________ _________ _________ zi_1_R1 0.34741 0.40076 0.4623 0.94436 1.9291 2.2253 2.567 zi_2_R2 0.34741 0.40076 0.4623 0.94436 1.9291 2.2253 2.567 zi_3_R3 0.34741 0.40076 0.4623 0.94436 1.9291 2.2253 2.567 zi_638_R638 0.34741 0.40076 0.4623 0.94436 1.9291 2.2253 2.567 zi_1273_r1273 0.34741 0.40076 0.4623 0.94436 1.9291 2.2253 2.567 zi_1274_r1274 0.34741 0.40076 0.4623 0.94436 1.9291 2.2253 2.567 zi_1275_r1275 0.34741 0.40076 0.4623 0.94436 1.9291 2.2253 2.567 pos = 17 ; key = mt_z_trans ;rown= 15 ,coln= 15 mt_z_trans :mu= 0.066667 ,sd= 0.095337 ,min= 0 ,max= 0.27902 zi_1_C1 zi_2_C2 zi_3_C3 zi_8_C8 zi_13_c13 zi_14_c14 zi_15_c15 __________ __________ __________ __________ __________ __________ __________ zi_1_R1 0.26016 0.26831 0.25551 0.00012823 2.7001e-13 1.1102e-15 0 zi_2_R2 0.11232 0.19622 0.2763 0.00098855 1.5289e-11 9.3592e-14 3.3307e-16 zi_3_R3 0.037073 0.10492 0.2185 0.0055558 6.2811e-10 5.7438e-12 3.1863e-14 zi_8_R8 1.7181e-06 4.1008e-05 0.00061112 0.27902 0.00061112 4.1008e-05 1.7181e-06 zi_13_r13 3.1909e-14 5.7438e-12 6.2811e-10 0.0055558 0.2185 0.10492 0.037073 zi_14_r14 3.474e-16 9.3597e-14 1.5289e-11 0.00098855 0.2763 0.19622 0.11232 zi_15_r15 2.7412e-18 1.1057e-15 2.6998e-13 0.00012823 0.25551 0.26831 0.26016 ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Matrix in Container and Sizes and Basic Statistics xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx i idx rowN colN mean std min max __ ___ ____ __________ ________ ________ _________ _______ ar_a_meshk 1 1 568 1 28.86 16.45 0.44365 57.277 ar_a_mw_wth_na 2 2 2500 1 NaN NaN 0 50 ar_interp_c_grid 3 3 1 5.7276e+05 28.639 16.534 0.001 57.277 ar_interp_coh_grid 4 4 1 568 28.86 16.45 0.44365 57.277 ar_k 5 5 1 50 25 14.875 0 50 ar_k_mesha 6 6 568 1 0 0 0 0 ar_k_mw_wth_na 7 7 2500 1 NaN NaN 0 50 ar_stationary 8 8 1 15 0.066667 0.060897 0.0027089 0.16757 ar_w 9 9 1 50 25 14.875 0 50 ar_z 10 10 1 15 1.1347 0.69878 0.34741 2.567 mt_coh_wkb 11 12 568 15 28.86 16.436 0.44365 57.277 mt_interp_coh_grid_mesh_z 12 13 568 15 28.86 16.436 0.44365 57.277 mt_k_wth_na 13 14 50 50 NaN NaN 0 50 mt_z_mesh_coh_interp_grid 14 15 568 15 1.1347 0.67512 0.34741 2.567 mt_z_mesh_coh_wkb 15 16 1275 15 1.1347 0.6751 0.34741 2.567 mt_z_trans 16 17 15 15 0.066667 0.095337 0 0.27902 ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Scalars in Container and Sizes and Basic Statistics xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx i idx value _ ___ _____ it_ameshk_n 1 11 568 ---------------------------------------- ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Begin: Show all key and value pairs from container CONTAINER NAME: PARAM_MAP ---------------------------------------- Map with properties: Count: 32 KeyType: char ValueType: any xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ---------------------------------------- ---------------------------------------- pos = 1 ; key = bl_default ; val = 0 pos = 2 ; key = fl_Amean ; val = 1 pos = 3 ; key = fl_alpha ; val = 0.36 pos = 4 ; key = fl_b_bd ; val = 0 pos = 5 ; key = fl_beta ; val = 0.94 pos = 6 ; key = fl_c_min ; val = 0.001 pos = 7 ; key = fl_coh_interp_grid_gap ; val = 0.1 pos = 8 ; key = fl_crra ; val = 1.5 pos = 9 ; key = fl_default_aprime ; val = 0 pos = 10 ; key = fl_delta ; val = 0.08 pos = 11 ; key = fl_k_min ; val = 0 pos = 12 ; key = fl_nan_replace ; val = -9999 pos = 13 ; key = fl_r_borr ; val = 0.025 pos = 14 ; key = fl_r_save ; val = 0.025 pos = 15 ; key = fl_tol_dist ; val = 1e-05 pos = 16 ; key = fl_tol_pol ; val = 1e-05 pos = 17 ; key = fl_tol_val ; val = 1e-05 pos = 18 ; key = fl_w ; val = 0.44365 pos = 19 ; key = fl_w_max ; val = 50 pos = 20 ; key = fl_z_mu ; val = 0 pos = 21 ; key = fl_z_rho ; val = 0.8 pos = 22 ; key = fl_z_sig ; val = 0.2 pos = 23 ; key = it_ak_n ; val = 50 pos = 24 ; key = it_c_interp_grid_gap ; val = 0.0001 pos = 25 ; key = it_maxiter_dist ; val = 1000 pos = 26 ; key = it_maxiter_val ; val = 250 pos = 27 ; key = it_tol_pol_nochange ; val = 25 pos = 28 ; key = it_trans_power_dist ; val = 1000 pos = 29 ; key = it_w_n ; val = 50 pos = 30 ; key = it_z_n ; val = 15 pos = 31 ; key = st_analytical_stationary_type ; val = eigenvector pos = 32 ; key = st_model ; val = akz_wkz_iwkz ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Scalars in Container and Sizes and Basic Statistics xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx i idx value __ ___ _______ bl_default 1 1 0 fl_Amean 2 2 1 fl_alpha 3 3 0.36 fl_b_bd 4 4 0 fl_beta 5 5 0.94 fl_c_min 6 6 0.001 fl_coh_interp_grid_gap 7 7 0.1 fl_crra 8 8 1.5 fl_default_aprime 9 9 0 fl_delta 10 10 0.08 fl_k_min 11 11 0 fl_nan_replace 12 12 -9999 fl_r_borr 13 13 0.025 fl_r_save 14 14 0.025 fl_tol_dist 15 15 1e-05 fl_tol_pol 16 16 1e-05 fl_tol_val 17 17 1e-05 fl_w 18 18 0.44365 fl_w_max 19 19 50 fl_z_mu 20 20 0 fl_z_rho 21 21 0.8 fl_z_sig 22 22 0.2 it_ak_n 23 23 50 it_c_interp_grid_gap 24 24 0.0001 it_maxiter_dist 25 25 1000 it_maxiter_val 26 26 250 it_tol_pol_nochange 27 27 25 it_trans_power_dist 28 28 1000 it_w_n 29 29 50 it_z_n 30 30 15 ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Strings in Container and Sizes and Basic Statistics xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx i idx _ ___ st_analytical_stationary_type 1 31 st_model 2 32 ---------------------------------------- ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Begin: Show all key and value pairs from container CONTAINER NAME: FUNC_MAP ---------------------------------------- Map with properties: Count: 7 KeyType: char ValueType: any xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ---------------------------------------- ---------------------------------------- pos = 1 ; key = f_coh ; val = @(z,b,k)(f_prod(z,k)+k*(1-fl_delta)+fl_w+b.*(1+fl_r_save).*(b>0)+b.*(1+fl_r_borr).*(b<=0)) pos = 2 ; key = f_cons ; val = @(coh,bprime,kprime)(coh-kprime-bprime) pos = 3 ; key = f_inc ; val = @(z,b,k)(f_prod(z,k)-(fl_delta)*k+fl_w+b.*(fl_r_save).*(b>0)+b.*(fl_r_borr).*(b<=0)) pos = 4 ; key = f_prod ; val = @(z,k)((fl_Amean.*(z)).*(k.^(fl_alpha))) pos = 5 ; key = f_util_crra ; val = @(c)(((c).^(1-fl_crra)-1)./(1-fl_crra)) pos = 6 ; key = f_util_log ; val = @(c)log(c) pos = 7 ; key = f_util_standin ; val = @(z,b,k)f_util_log(f_coh(z,b,k).*(f_coh(z,b,k)>0)+fl_c_min.*(f_coh(z,b,k)<=0)) ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Scalars in Container and Sizes and Basic Statistics xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx i idx xFunction _ ___ _________ f_coh 1 1 1 f_cons 2 2 2 f_inc 3 3 3 f_prod 4 4 4 f_util_crra 5 5 5 f_util_log 6 6 6 f_util_standin 7 7 7 ---------------------------------------- ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Begin: Show all key and value pairs from container CONTAINER NAME: RESULT_MAP ---------------------------------------- Map with properties: Count: 11 KeyType: char ValueType: any xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ---------------------------------------- ---------------------------------------- pos = 1 ; key = ar_pol_diff_norm ;rown= 110 ,coln= 1 ar_pol_diff_norm :mu= 34.0952 ,sd= 167.118 ,min= 0 ,max= 1643.1596 zi_1_c1 _______ zi_1_R1 184.61 zi_2_R2 1643.2 zi_3_R3 546.99 zi_55_R55 1.0204 zi_108_r108 0 zi_109_r109 0 zi_110_r110 0 pos = 2 ; key = ar_st_pol_names ; val = cl_mt_coh cl_mt_pol_a cl_mt_pol_k cl_mt_pol_c pos = 3 ; key = ar_val_diff_norm ;rown= 110 ,coln= 1 ar_val_diff_norm :mu= 10.7296 ,sd= 23.3812 ,min= 0.041929 ,max= 142.9489 zi_1_c1 ________ zi_1_R1 142.95 zi_2_R2 111 zi_3_R3 92.611 zi_55_R55 1.2869 zi_108_r108 0.047454 zi_109_r109 0.044606 zi_110_r110 0.041929 pos = 4 ; key = cl_mt_coh ;rown= 568 ,coln= 15 cl_mt_coh :mu= 28.8604 ,sd= 16.4363 ,min= 0.44365 ,max= 57.2772 zi_1_C1 zi_2_C2 zi_3_C3 zi_8_C8 zi_13_c13 zi_14_c14 zi_15_c15 _______ _______ _______ _______ _________ _________ _________ zi_1_R1 0.44365 0.44365 0.44365 0.44365 0.44365 0.44365 0.44365 zi_2_R2 0.54388 0.54388 0.54388 0.54388 0.54388 0.54388 0.54388 zi_3_R3 0.64412 0.64412 0.64412 0.64412 0.64412 0.64412 0.64412 zi_284_r284 28.81 28.81 28.81 28.81 28.81 28.81 28.81 zi_566_r566 57.077 57.077 57.077 57.077 57.077 57.077 57.077 zi_567_r567 57.177 57.177 57.177 57.177 57.177 57.177 57.177 zi_568_r568 57.277 57.277 57.277 57.277 57.277 57.277 57.277 pos = 5 ; key = cl_mt_cons ;rown= 568 ,coln= 15 cl_mt_cons :mu= 3.6107 ,sd= 1.3536 ,min= 0.024653 ,max= 7.2772 zi_1_C1 zi_2_C2 zi_3_C3 zi_8_C8 zi_13_c13 zi_14_c14 zi_15_c15 _______ _______ _______ _______ _________ _________ _________ zi_1_R1 0.44365 0.44365 0.44365 0.44365 0.44365 0.44365 0.44365 zi_2_R2 0.54388 0.54388 0.54388 0.54388 0.54388 0.54388 0.54388 zi_3_R3 0.64412 0.64412 0.64412 0.64412 0.64412 0.64412 0.64412 zi_284_r284 3.3001 3.3001 3.3001 3.3001 4.3205 4.3205 4.3205 zi_566_r566 7.0767 7.0767 7.0767 7.0767 7.0767 7.0767 7.0767 zi_567_r567 7.1769 7.1769 7.1769 7.1769 7.1769 7.1769 7.1769 zi_568_r568 7.2772 7.2772 7.2772 7.2772 7.2772 7.2772 7.2772 pos = 6 ; key = cl_mt_pol_a ;rown= 568 ,coln= 15 cl_mt_pol_a :mu= 18.0175 ,sd= 14.6604 ,min= 0 ,max= 47.9592 zi_1_C1 zi_2_C2 zi_3_C3 zi_8_C8 zi_13_c13 zi_14_c14 zi_15_c15 _______ _______ _______ _______ _________ _________ _________ zi_1_R1 0 0 0 0 0 0 0 zi_2_R2 0 0 0 0 0 0 0 zi_3_R3 0 0 0 0 0 0 0 zi_284_r284 23.469 23.469 22.449 19.388 9.1837 6.1224 3.0612 zi_566_r566 47.959 47.959 46.939 43.878 34.694 31.633 28.571 zi_567_r567 47.959 47.959 46.939 43.878 34.694 31.633 28.571 zi_568_r568 47.959 47.959 46.939 43.878 34.694 31.633 28.571 pos = 7 ; key = cl_mt_pol_c ;rown= 568 ,coln= 15 cl_mt_pol_c :mu= 3.6107 ,sd= 1.3536 ,min= 0.024653 ,max= 7.2772 zi_1_C1 zi_2_C2 zi_3_C3 zi_8_C8 zi_13_c13 zi_14_c14 zi_15_c15 _______ _______ _______ _______ _________ _________ _________ zi_1_R1 0.44365 0.44365 0.44365 0.44365 0.44365 0.44365 0.44365 zi_2_R2 0.54388 0.54388 0.54388 0.54388 0.54388 0.54388 0.54388 zi_3_R3 0.64412 0.64412 0.64412 0.64412 0.64412 0.64412 0.64412 zi_284_r284 3.3001 3.3001 3.3001 3.3001 4.3205 4.3205 4.3205 zi_566_r566 7.0767 7.0767 7.0767 7.0767 7.0767 7.0767 7.0767 zi_567_r567 7.1769 7.1769 7.1769 7.1769 7.1769 7.1769 7.1769 zi_568_r568 7.2772 7.2772 7.2772 7.2772 7.2772 7.2772 7.2772 pos = 8 ; key = cl_mt_pol_k ;rown= 568 ,coln= 15 cl_mt_pol_k :mu= 7.2322 ,sd= 5.5189 ,min= 0 ,max= 22.449 zi_1_C1 zi_2_C2 zi_3_C3 zi_8_C8 zi_13_c13 zi_14_c14 zi_15_c15 _______ _______ _______ _______ _________ _________ _________ zi_1_R1 0 0 0 0 0 0 0 zi_2_R2 0 0 0 0 0 0 0 zi_3_R3 0 0 0 0 0 0 0 zi_284_r284 2.0408 2.0408 3.0612 6.1224 15.306 18.367 21.429 zi_566_r566 2.0408 2.0408 3.0612 6.1224 15.306 18.367 21.429 zi_567_r567 2.0408 2.0408 3.0612 6.1224 15.306 18.367 21.429 zi_568_r568 2.0408 2.0408 3.0612 6.1224 15.306 18.367 21.429 pos = 9 ; key = mt_pol_idx ;rown= 568 ,coln= 15 mt_pol_idx :mu= 25.7447 ,sd= 14.8708 ,min= 1 ,max= 50 zi_1_C1 zi_2_C2 zi_3_C3 zi_8_C8 zi_13_c13 zi_14_c14 zi_15_c15 _______ _______ _______ _______ _________ _________ _________ zi_1_R1 1 1 1 1 1 1 1 zi_2_R2 1 1 1 1 1 1 1 zi_3_R3 1 1 1 1 1 1 1 zi_284_r284 26 26 26 26 25 25 25 zi_566_r566 50 50 50 50 50 50 50 zi_567_r567 50 50 50 50 50 50 50 zi_568_r568 50 50 50 50 50 50 50 pos = 10 ; key = mt_pol_perc_change ;rown= 110 ,coln= 15 mt_pol_perc_change :mu= 0.054135 ,sd= 0.15854 ,min= 0 ,max= 1 zi_1_C1 zi_2_C2 zi_3_C3 zi_8_C8 zi_13_c13 zi_14_c14 zi_15_c15 _______ _______ _______ __________ __________ __________ _________ zi_1_R1 1 1 1 1 1 1 1 zi_2_R2 0.9419 0.94102 0.92165 0.86092 0.67958 0.6206 0.55986 zi_3_R3 0.64789 0.64789 0.51408 0.57746 0.5713 0.53169 0.54577 zi_55_R55 0 0 0 0.00088028 0.00088028 0.00088028 0 zi_108_r108 0 0 0 0 0 0 0 zi_109_r109 0 0 0 0 0 0 0 zi_110_r110 0 0 0 0 0 0 0 pos = 11 ; key = mt_val ;rown= 568 ,coln= 15 mt_val :mu= 11.9863 ,sd= 4.2293 ,min= -16.6941 ,max= 16.6028 zi_1_C1 zi_2_C2 zi_3_C3 zi_8_C8 zi_13_c13 zi_14_c14 zi_15_c15 _______ _______ _______ _______ _________ _________ _________ zi_1_R1 -16.694 -16.694 -16.694 -16.694 -16.694 -16.694 -16.694 zi_2_R2 -16.403 -16.403 -16.403 -16.403 -16.403 -16.403 -16.403 zi_3_R3 -16.183 -16.183 -16.183 -16.183 -16.183 -16.183 -16.183 zi_284_r284 12.123 12.198 12.284 12.85 13.689 13.889 14.084 zi_566_r566 15.412 15.455 15.505 15.841 16.35 16.473 16.592 zi_567_r567 15.417 15.46 15.51 15.847 16.355 16.478 16.598 zi_568_r568 15.422 15.465 15.516 15.852 16.361 16.483 16.603 ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Matrix in Container and Sizes and Basic Statistics xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx i idx rowN colN mean std min max __ ___ ____ ____ ________ _______ ________ ______ ar_pol_diff_norm 1 1 110 1 34.095 167.12 0 1643.2 ar_val_diff_norm 2 3 110 1 10.73 23.381 0.041929 142.95 cl_mt_coh 3 4 568 15 28.86 16.436 0.44365 57.277 cl_mt_cons 4 5 568 15 3.6107 1.3536 0.024653 7.2772 cl_mt_pol_a 5 6 568 15 18.018 14.66 0 47.959 cl_mt_pol_c 6 7 568 15 3.6107 1.3536 0.024653 7.2772 cl_mt_pol_k 7 8 568 15 7.2322 5.5189 0 22.449 mt_pol_idx 8 9 568 15 25.745 14.871 1 50 mt_pol_perc_change 9 10 110 15 0.054135 0.15854 0 1 mt_val 10 11 568 15 11.986 4.2293 -16.694 16.603 ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Strings in Container and Sizes and Basic Statistics xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx i idx _ ___ ar_st_pol_names 1 2
Parse Parameters
% append function name st_func_name = 'ff_iwkz_ds_vecsv'; support_map('st_profile_name_main') = [st_func_name support_map('st_profile_name_main')]; support_map('st_mat_name_main') = [st_func_name support_map('st_mat_name_main')]; support_map('st_img_name_main') = [st_func_name support_map('st_img_name_main')]; % result_map % ar_st_pol_names is from section _Process Optimal Choices_ in the value % function code. params_group = values(result_map, {'cl_mt_pol_a', 'cl_mt_pol_k'}); [cl_mt_pol_a, cl_mt_pol_k] = params_group{:}; [mt_pol_a, mt_pol_k] = deal(cl_mt_pol_a{1}, cl_mt_pol_k{1}); % Get Model Name params_group = values(param_map, {'st_model'}); [st_model] = params_group{:}; % param_map params_group = values(param_map, {'it_z_n'}); [it_z_n] = params_group{:}; % func_map params_group = values(func_map, {'f_coh'}); [f_coh] = params_group{:}; % armt_map params_group = values(armt_map, {'mt_z_trans', 'ar_interp_coh_grid'}); [mt_z_trans, ar_interp_coh_grid] = params_group{:}; if (ismember(st_model, ["ipwkbzr"])) params_group = values(armt_map, {'ar_z_r_borr_mesh_wage_w1r2', 'ar_z_wage_mesh_r_borr_w1r2'}); [ar_z_r_borr_mesh_wage_w1r2, ar_z_wage_mesh_r_borr_w1r2] = params_group{:}; params_group = values(param_map, {'it_z_wage_n', 'fl_z_r_borr_n'}); [it_z_wage_n, fl_z_r_borr_n] = params_group{:}; elseif (ismember(st_model, ["ipwkbzr_fibs"])) params_group = values(armt_map, {'ar_z_r_infbr_mesh_wage_w1r2', 'ar_z_wage_mesh_r_infbr_w1r2'}); [ar_z_r_borr_mesh_wage_w1r2, ar_z_wage_mesh_r_borr_w1r2] = params_group{:}; params_group = values(param_map, {'it_z_wage_n', 'fl_z_r_infbr_n'}); [it_z_wage_n, fl_z_r_borr_n] = params_group{:}; else params_group = values(armt_map, {'ar_z'}); [ar_z] = params_group{:}; end % param_map params_group = values(param_map, {'st_analytical_stationary_type'}); [st_analytical_stationary_type] = params_group{:}; % support_map params_group = values(support_map, {'bl_profile_dist', 'st_profile_path', ... 'st_profile_prefix', 'st_profile_name_main', 'st_profile_suffix',... 'bl_time'}); [bl_profile_dist, st_profile_path, ... st_profile_prefix, st_profile_name_main, st_profile_suffix, ... bl_time] = params_group{:};
Start Profiler and Timer
% Start Profile if (bl_profile_dist) close all; profile off; profile on; end % Start Timer if (bl_time) tic; end
A. Get Size of Endogenous and Exogenous State
it_endostates_n = length(ar_interp_coh_grid); it_exostates_n = it_z_n;
B. Solve for Index
The model is solved by interpolating over cash-on-hand. The optimal choices do not map to specific points on the cash-on-hand grid. Find the index of the cash-on-hand vector that is the closest to the coh'(a'(coh,z),k'(coh,z),z').
Since we have z_n elements of shocks, and coh_n elements of the cash-on-hand grid, there are (coh_n x z_n) possible combinations of states at period t. In period t+1, there are (coh_n x z_n) by (z_n) possible/reachable cash-on-hand points. We find the index of all these reachable coh' points on the interpolation cash-on-hand grid.
% 1. *mt_coh_prime* is (coh_n x z_n) by (z_n) % coh'(z', a'(coh,z), k'(coh,z)) if (ismember(st_model, ["ipwkbzr"])) mt_coh_prime = f_coh(ar_z_r_borr_mesh_wage_w1r2, ar_z_wage_mesh_r_borr_w1r2, ... mt_pol_a(:), mt_pol_k(:)); elseif (ismember(st_model, ["ipwkbzr_fibs"])) % mt_pol_a includes interest rates mt_coh_prime = f_coh(ar_z_wage_mesh_r_borr_w1r2, mt_pol_a(:), mt_pol_k(:)); else mt_coh_prime = f_coh(ar_z, mt_pol_a(:), mt_pol_k(:)); end % 2. *mt_coh_prime_on_grid_idx* is (coh_n x z_n) by (z_n): % index for coh'(a,k,z') % to reduce potential size, loop over future states mt_coh_prime_on_grid_idx = zeros(size(mt_coh_prime)); for it_zprime_ctr=1:size(mt_coh_prime, 2) ar_coh_prime = mt_coh_prime(:,it_zprime_ctr); [~, ar_coh_prime_on_grid_idx] = min(abs(ar_coh_prime(:)' - ar_interp_coh_grid')); mt_coh_prime_on_grid_idx(:,it_zprime_ctr) = ar_coh_prime_on_grid_idx; end
C. Expand Index so Matches Full States Index Dimension
The index above matches the index in the cash-on-hand grid, but now, the state space is cash-on-hand jointly with shocks, that is the full states markov's states. So if there are two shocks and two cash-on-hand grid points, the cash-on-hand grid points would have been [1,2] and [1,2], but depending on which z' they match up to, they would now be [1,2] if matching to the first z', and [3,4] if matching to the second z'.
% mt_pol_idx_mesh_max is (NxM) by M, mt_pol_idx is N by M
mt_pol_idx_mesh_max = mt_coh_prime_on_grid_idx + (0:1:(it_exostates_n-1))*it_endostates_n;
D. Transition Probabilities from (M by M) to (NxM) by M
Probability comes from the shock transition matrix, which is now duplicated for all cash-on-hand grid elements
mt_trans_prob = reshape(repmat(mt_z_trans(:)', ...
[it_endostates_n, 1]), [it_endostates_n*it_exostates_n, it_exostates_n]);
E. Fill mt_pol_idx_mesh_idx to mt_full_trans_mat SPARSE
Try to always use sparse matrix, unless grid sizes very small, keeping non-sparse code here for comparison. Sparse matrix is important for allowing the code to be fast and memory efficient. Otherwise this method is much slower than iterative method.
i = mt_pol_idx_mesh_max(:); j = repmat((1:1:it_endostates_n*it_exostates_n),[1,it_exostates_n])'; v = mt_trans_prob(:); m = it_endostates_n*it_exostates_n; n = it_endostates_n*it_exostates_n; mt_full_trans_mat = sparse(i, j, v, m, n);
F. Stationary Distribution Method A, Eigenvector Approach
Given that markov chain we have constructured for all state-space elements, we can now find the stationary distribution using standard eigenvector approach. See ff_az_ds_vecsv for additional methods using the full states markov structure.
if (strcmp(st_analytical_stationary_type, 'eigenvector')) [V, ~] = eigs(mt_full_trans_mat,1,1); ar_stationary = V/sum(V); end
G. Stationary Vector to Stationary Matrix in Original Dimensions
mt_dist_akz = reshape(ar_stationary, size(mt_pol_a));
End Time and Profiler
% End Timer if (bl_time) toc; end % End Profile if (bl_profile_dist) profile off profile viewer st_file_name = [st_profile_prefix st_profile_name_main st_profile_suffix]; profsave(profile('info'), strcat(st_profile_path, st_file_name)); end
f(y), f(c), f(a), f(k): Generate Key Distributional Statistics for Each outcome
Having derived f({a,k},z) the probability mass function of the joint discrete random variables, we now obtain distributional statistics. Note that we know f({a,k},z), and we also know relevant policy functions a'(a,z), c(a,z), or other policy functions. We can simulate any choices that are a function of the random variables (a,z), using f({a,k},z). We call function ff_az_ds_post_stats which uses fft_disc_rand_var_stats and fft_disc_rand_var_mass2outcomes to compute various statistics of interest.
result_map = ff_az_ds_post_stats(support_map, result_map, mt_dist_akz);
---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Summary Statistics for: cl_mt_coh xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ---------------------------------------- fl_choice_mean 6.6968 fl_choice_sd 3.0965 fl_choice_coefofvar 0.4624 fl_choice_prob_zero 0 fl_choice_prob_below_zero 0 fl_choice_prob_above_zero 1.0000 fl_choice_prob_max -4.2385e-34 tb_disc_cumu cl_mt_cohDiscreteVal cl_mt_cohDiscreteValProbMass CDF cumsumFrac ____________________ ____________________________ __________ __________ 0.44365 5.4509e-18 5.4509e-16 3.6111e-19 0.54388 -2.6675e-34 5.4509e-16 3.6111e-19 0.64412 -1.6778e-34 5.4509e-16 3.6111e-19 0.74435 -1.3819e-34 5.4509e-16 3.6111e-19 0.84459 -2.3365e-34 5.4509e-16 3.6111e-19 0.94483 -1.4991e-34 5.4509e-16 3.6111e-19 1.0451 1.8589e-34 5.4509e-16 3.6111e-19 1.1453 2.1398e-35 5.4509e-16 3.6111e-19 1.2455 -4.7011e-34 5.4509e-16 3.6111e-19 1.3458 2.4055e-34 5.4509e-16 3.6111e-19 cl_mt_cohDiscreteVal cl_mt_cohDiscreteValProbMass CDF cumsumFrac ____________________ ____________________________ ___ __________ 56.375 -5.9086e-34 100 1 56.475 5.2935e-34 100 1 56.576 -2.932e-34 100 1 56.676 5.2582e-34 100 1 56.776 -1.4173e-34 100 1 56.876 6.6323e-34 100 1 56.976 3.9401e-13 100 1 57.077 1.01e-12 100 1 57.177 5.9271e-12 100 1 57.277 -4.2385e-34 100 1 tb_prob_drv percentiles cl_mt_cohDiscreteValPercentileValues fracOfSumHeldBelowThisPercentile ___________ ____________________________________ ________________________________ 0.1 2.7491 0.00065678 1 2.9495 0.0043457 5 3.3505 0.030196 10 3.9519 0.055725 15 4.1524 0.086451 20 4.4531 0.14113 25 4.6535 0.16918 35 5.255 0.22995 50 5.9566 0.38108 65 6.8587 0.50599 75 7.7608 0.60578 80 8.262 0.65219 85 9.2644 0.72335 90 10.668 0.79519 95 13.174 0.88529 99 17.985 0.97001 99.9 24.701 0.99643 ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Summary Statistics for: cl_mt_pol_a xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ---------------------------------------- fl_choice_mean 0.3082 fl_choice_sd 1.1367 fl_choice_coefofvar 3.6883 fl_choice_prob_zero 0.8819 fl_choice_prob_below_zero 0 fl_choice_prob_above_zero 0.1181 fl_choice_prob_max 6.0168e-34 tb_disc_cumu cl_mt_pol_aDiscreteVal cl_mt_pol_aDiscreteValProbMass CDF cumsumFrac ______________________ ______________________________ ______ __________ 0 0.88187 88.187 0 1.0204 0.0051657 88.703 0.017104 1.0204 0.029596 91.663 0.1151 1.0204 0.0039021 92.053 0.12802 1.0204 0.013572 93.41 0.17296 1.0204 2.1369e-05 93.413 0.17303 2.0408 5.0706e-05 93.418 0.17336 2.0408 0.0079292 94.21 0.22587 2.0408 0.0016431 94.375 0.23675 2.0408 0.014185 95.793 0.33069 cl_mt_pol_aDiscreteVal cl_mt_pol_aDiscreteValProbMass CDF cumsumFrac ______________________ ______________________________ ___ __________ 41.837 1.247e-13 100 1 42.857 5.4021e-16 100 1 42.857 4.4814e-18 100 1 43.878 4.8055e-19 100 1 44.898 1.968e-34 100 1 44.898 1.3127e-33 100 1 45.918 -4.2988e-34 100 1 45.918 5.9117e-34 100 1 46.939 4.3874e-34 100 1 47.959 6.0168e-34 100 1 tb_prob_drv percentiles cl_mt_pol_aDiscreteValPercentileValues fracOfSumHeldBelowThisPercentile ___________ ______________________________________ ________________________________ 0.1 0 0 1 0 0 5 0 0 10 0 0 15 0 0 20 0 0 25 0 0 35 0 0 50 0 0 65 0 0 75 0 0 80 0 0 85 0 0 90 1.0204 0.1151 95 2.0408 0.33069 99 6.1224 0.75824 99.9 11.224 0.96027 ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Summary Statistics for: cl_mt_pol_k xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ---------------------------------------- fl_choice_mean 4.5735 fl_choice_sd 2.1263 fl_choice_coefofvar 0.4649 fl_choice_prob_zero 5.4509e-18 fl_choice_prob_below_zero 0 fl_choice_prob_above_zero 1.0000 fl_choice_prob_max 9.0980e-08 tb_disc_cumu cl_mt_pol_kDiscreteVal cl_mt_pol_kDiscreteValProbMass CDF cumsumFrac ______________________ ______________________________ __________ ___________ 0 5.4509e-18 5.4509e-16 0 1.0204 -7.8473e-33 5.4509e-16 -1.7509e-33 2.0408 1.3502e-11 1.3502e-09 6.0248e-12 2.0408 7.9496e-05 0.0079496 3.5474e-05 2.0408 0.10203 10.211 0.045564 2.0408 0.00011819 10.223 0.045617 2.0408 1.4951e-07 10.223 0.045617 3.0612 0.00048166 10.271 0.045939 3.0612 0.24865 35.136 0.21237 3.0612 0.00084307 35.22 0.21293 cl_mt_pol_kDiscreteVal cl_mt_pol_kDiscreteValProbMass CDF cumsumFrac ______________________ ______________________________ ______ __________ 14.286 0.0010755 99.685 0.98872 15.306 0.0018975 99.875 0.99507 15.306 1.4015e-06 99.875 0.99507 16.327 0.00031298 99.906 0.99619 17.347 0.00027046 99.933 0.99721 18.367 0.0004737 99.98 0.99912 19.388 5.4151e-05 99.986 0.99935 20.408 4.4213e-05 99.99 0.99954 21.429 9.7423e-05 100 1 22.449 9.098e-08 100 1 tb_prob_drv percentiles cl_mt_pol_kDiscreteValPercentileValues fracOfSumHeldBelowThisPercentile ___________ ______________________________________ ________________________________ 0.1 2.0408 0.045564 1 2.0408 0.045564 5 2.0408 0.045564 10 2.0408 0.045564 15 3.0612 0.21237 20 3.0612 0.21237 25 3.0612 0.21237 35 3.0612 0.21237 50 4.0816 0.45182 65 5.102 0.64443 75 5.102 0.64443 80 6.1224 0.75776 85 6.1224 0.75776 90 7.1429 0.81513 95 9.1837 0.91772 99 12.245 0.97392 99.9 16.327 0.99619 ---------------------------------------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Summary Statistics for: cl_mt_pol_c xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ---------------------------------------- fl_choice_mean 1.8152 fl_choice_sd 0.5437 fl_choice_coefofvar 0.2995 fl_choice_prob_zero 0 fl_choice_prob_below_zero 0 fl_choice_prob_above_zero 1.0000 fl_choice_prob_max -4.5848e-34 tb_disc_cumu cl_mt_pol_cDiscreteVal cl_mt_pol_cDiscreteValProbMass CDF cumsumFrac ______________________ ______________________________ ___________ ___________ 0.024653 1.8589e-34 1.8589e-32 2.5246e-36 0.12489 2.1398e-35 2.0729e-32 3.9968e-36 0.22512 -4.7011e-34 -2.6282e-32 -5.4307e-35 0.32536 2.4055e-34 -2.2266e-33 -1.1189e-35 0.42559 -6.5653e-34 -6.7879e-32 -1.6512e-34 0.44365 5.4509e-18 5.4509e-16 1.3323e-18 0.50778 3.1755e-34 5.4509e-16 1.3323e-18 0.52583 -2.793e-34 5.4509e-16 1.3323e-18 0.54388 -2.6675e-34 5.4509e-16 1.3323e-18 0.60801 -3.8165e-34 5.4509e-16 1.3323e-18 cl_mt_pol_cDiscreteVal cl_mt_pol_cDiscreteValProbMass CDF cumsumFrac ______________________ ______________________________ ___ __________ 6.8762 1.6084e-36 100 1 6.8762 6.6163e-34 100 1 6.9764 1.9727e-34 100 1 6.9764 3.9401e-13 100 1 7.0767 1.01e-12 100 1 7.0767 -1.7443e-34 100 1 7.1769 4.767e-34 100 1 7.1769 5.9271e-12 100 1 7.2772 3.4628e-35 100 1 7.2772 -4.5848e-34 100 1 tb_prob_drv percentiles cl_mt_pol_cDiscreteValPercentileValues fracOfSumHeldBelowThisPercentile ___________ ______________________________________ ________________________________ 0.1 0.70825 0.00062426 1 0.89066 0.0060645 5 1.0911 0.042786 10 1.1733 0.062734 15 1.2736 0.095819 20 1.3097 0.13573 25 1.3918 0.18755 35 1.5382 0.24577 50 1.7567 0.39762 65 1.9571 0.53712 75 2.1757 0.68536 80 2.2579 0.72509 85 2.4222 0.78061 90 2.5405 0.84159 95 2.8151 0.91478 99 3.2982 0.9804 99.9 3.9295 0.99769 OriginalVariableNames cl_mt_coh cl_mt_pol_a cl_mt_pol_k cl_mt_pol_c _____________________ ___________ ___________ ___________ ___________ 'mean' 6.6968 0.30818 4.5735 1.8152 'sd' 3.0965 1.1367 2.1263 0.5437 'coefofvar' 0.46239 3.6883 0.46491 0.29953 'min' 0.44365 0 0 0.024653 'max' 57.277 47.959 22.449 7.2772 'pYis0' 0 0.88187 5.4509e-18 0 'pYls0' 0 0 0 0 'pYgr0' 1 0.11813 1 1 'pYisMINY' 5.4509e-18 0.88187 5.4509e-18 1.8589e-34 'pYisMAXY' -4.2385e-34 6.0168e-34 9.098e-08 -4.5848e-34 'p0_1' 2.7491 0 2.0408 0.70825 'p1' 2.9495 0 2.0408 0.89066 'p5' 3.3505 0 2.0408 1.0911 'p10' 3.9519 0 2.0408 1.1733 'p15' 4.1524 0 3.0612 1.2736 'p20' 4.4531 0 3.0612 1.3097 'p25' 4.6535 0 3.0612 1.3918 'p35' 5.255 0 3.0612 1.5382 'p50' 5.9566 0 4.0816 1.7567 'p65' 6.8587 0 5.102 1.9571 'p75' 7.7608 0 5.102 2.1757 'p80' 8.262 0 6.1224 2.2579 'p85' 9.2644 0 6.1224 2.4222 'p90' 10.668 1.0204 7.1429 2.5405 'p95' 13.174 2.0408 9.1837 2.8151 'p99' 17.985 6.1224 12.245 3.2982 'p99_9' 24.701 11.224 16.327 3.9295 'fl_cov_cl_mt_coh' 9.5885 2.1883 6.0226 1.3775 'fl_cor_cl_mt_coh' 1 0.62174 0.91473 0.8182 'fl_cov_cl_mt_pol_a' 2.1883 1.292 0.65804 0.23833 'fl_cor_cl_mt_pol_a' 0.62174 1 0.27227 0.38564 'fl_cov_cl_mt_pol_k' 6.0226 0.65804 4.521 0.84358 'fl_cor_cl_mt_pol_k' 0.91473 0.27227 1 0.7297 'fl_cov_cl_mt_pol_c' 1.3775 0.23833 0.84358 0.29561 'fl_cor_cl_mt_pol_c' 0.8182 0.38564 0.7297 1 'fracByP0_1' 0.00065678 0 0.045564 0.00062426 'fracByP1' 0.0043457 0 0.045564 0.0060645 'fracByP5' 0.030196 0 0.045564 0.042786 'fracByP10' 0.055725 0 0.045564 0.062734 'fracByP15' 0.086451 0 0.21237 0.095819 'fracByP20' 0.14113 0 0.21237 0.13573 'fracByP25' 0.16918 0 0.21237 0.18755 'fracByP35' 0.22995 0 0.21237 0.24577 'fracByP50' 0.38108 0 0.45182 0.39762 'fracByP65' 0.50599 0 0.64443 0.53712 'fracByP75' 0.60578 0 0.64443 0.68536 'fracByP80' 0.65219 0 0.75776 0.72509 'fracByP85' 0.72335 0 0.75776 0.78061 'fracByP90' 0.79519 0.1151 0.81513 0.84159 'fracByP95' 0.88529 0.33069 0.91772 0.91478 'fracByP99' 0.97001 0.75824 0.97392 0.9804 'fracByP99_9' 0.99643 0.96027 0.99619 0.99769
end
ans = Map with properties: Count: 13 KeyType: char ValueType: any