% setup.m: global parameter values for the retirement problem
%          John Rust, Georgetown University, Fall 2012


global work_disutility_age search_cost_age lsigma u_scale crra_coef unemp_prob Npeople firstage lastage theta;


    lsigma=1;                     % logit scale parameter

    work_disutility_age=0.002;    % coefficient of disuility of work as a function of age^2

    search_cost_age=0.01;         % coefficient of search cost for a retired/unemployed person to return
                                  % to work as a function of age^2

    u_scale=1;                    % scale parameter on the utility of income

    crra_coef=0.5;                % curvature parameter on the utility of income

    unemp_prob=0.05;              % probability of involuntary unemployment

    Npeople=500;

    firstage=20;

    lastage=80;

    optimizer=3;                  % enter 1 to use fminunc (unconstrained quasi-newton minimizer
                                  % enter 2 to use fminsearch (Nelder-Mead 'Amoeba' non-smooth function minimizer)
                                  % enter 3 to use fmincon (constrained optimization with constraints on the parameters
                                  %         given by theta_lb and theta_ub)

    theta_init=0;                 % enter 0 for no initialization from a previous run: uses as starting theta the
                                  %         true values of the structural parameters given below 
                                  % enter 1 to load theta_estimated from a previous run of estimate.m as starting values

    theta=zeros(3,1);

    theta(1)=work_disutility_age;
    theta(2)=search_cost_age;
%    theta(3)=u_scale;
    theta(3)=crra_coef;

    theta_true=theta;

    save('theta_true','theta_true');

    theta_lb=[0 0 0]';
    theta_ub=[0.1 0.1 1]';

