The call to function LifeCycleProfiles_FHorz_Case1_PType returned this error:
Unrecognized function or variable 'tempStats2'.
Error in LifeCycleProfiles_FHorz_Case1_PType (line 1127)
AgeConditionalStats.(CondlRestnFnNames{rr}).(FnsToEvalNames{ff}).Mean(jj)=tempStats2.Mean;
If I remove the field conditionalrestrictions from simoptions, then the function runs fine.
By the way, EvalFnOnAgentDist_AllStats_FHorz_Case1_PType works fine even with conditional restrictions, but there is a weird display on the screen:
Parameter values for the current permanent type
Parameters_temp =
struct with fields:
inp_dir: 'C:\Users\aledi\Dropbox\1 - RESEARCH PROJECTS\18_health_search\shared_all\Codes\v15\inputs'
J: 76
age_entry: 25
age_exit: 100
agej: [76×1 double]
age_actual: [76×1 double]
Jr: 41
mewj: [76×1 double]
beta: 0.9800
r: 0.0400
sigma: 2
kappa1: 1.2500
uc_level: 0.0100
tau0: 0.1700
tau1: 0.0620
pen: 0.2500
pen_j: 0.2500
n_a: 200
n_d: 5
n_z: 7
a_min: 0
a_max: 600
a_curvature: 3
n_theta_e: 2
n_theta_h: 2
n_theta_y: 2
lambda0_e0: 0.8500
lambda1_e0: 0.0450
lambda2_e0: -5.5000e-04
lambda0_e1: 1.0500
lambda1_e1: 0.0500
lambda2_e1: -6.0000e-04
wp_h0_e0: 0.2000
wp_h0_e1: 0.1500
theta_y_vals: [2×1 double]
omega_bar_e0: 0.7000
omega_bar_e1: 0.8500
delta_h0_e0: [76×1 double]
delta_h1_e0: [76×1 double]
delta_h0_e1: [76×1 double]
delta_h1_e1: [76×1 double]
kappa_h0_j: [76×1 double]
kappa_h1_j: [76×1 double]
rho_z: 0.9850
sigma_eps_z: 0.1483
p0: 0.1500
ptype_probs: 0.2973
theta_e_val: 1
theta_h_val: 1
theta_y_val: 0.1200
N_semiz: 42