Skip to content

Question about the storage of policy functions in the solution structure #232

@Zhanwenqing

Description

@Zhanwenqing

Dear Prof. Maih,
I am trying to understand how the policy functions are stored after solving the model.

After calling

m = solve(m);

I noticed that the function print_solution displays the solution. From the code, it seems that the policy function coefficients are retrieved through something like

sol.(stud)(ids,:,ireg)

Could you please clarify whether the policy functions are indeed stored in sol.(stud)(ids,:,ireg) and how the dimensions of this object correspond to the endogenous variables, state variables, and regimes?

In particular, I would like to understand:

Whether sol.(stud)(ids,:,ireg) contains the reduced-form policy function matrices.

Whether there is a recommended way to programmatically extract the policy function matrices for further analysis.

Thank you very much for your help.

Zhan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions