respy.solve
Everything related to the solution of a structural model.
get_solve_func(params, options)
get_solve_func
Get the solve function.
solve(params, options, state_space)
solve
Solve the model.
_create_choice_rewards(complex_, choice_set, optim_paras, options)
_create_choice_rewards
Create wage and non-pecuniary reward for each state and choice.
_solve_with_backward_induction(state_space, optim_paras, options)
_solve_with_backward_induction
Calculate utilities with backward induction.
_full_solution(wages, nonpecs, continuation_values, period_draws_emax_risk, optim_paras)
_full_solution
Calculate the full solution of the model.
respy.solve.
This function takes a model specification and returns the state space of the model along with components of the solution such as covariates, non-pecuniary rewards, wages, continuation values and expected value functions as attributes of the class.
pandas.DataFrame
DataFrame containing parameter series.
dict
Dictionary containing model attributes which are not optimized.
solve()
Function with partialed arguments.
In particular the function retrieves dense period choice cores with all covariates (they have aready been calculated in the construction of the state space) from disk. Thereafter the function obtains rewards for choices for each state based on the pre calculated covariates.
np.array
Array with dimensions n_states x n_choices. Contains all wages for a particular state choice combination within a dense period choice core.
Array with dimensions n_states x n_choices. Contains all nonpecs for a particular state choice combination within a dense period choice core.
The expected value functions in one period are only computed by interpolation if:
Interpolation is requested.
If there are more states in the period than interpolation points.
If there are at least two interpolation points per dense_index.
StateSpace
State space of the model which is not solved yet.
Parsed model parameters affected by the optimization.
Optimization independent model options.
In contrast to approximate solution, the Monte Carlo integration is done for each state and not only a subset of states.
Array containing expected value function for each state.
respy.simulate
respy.state_space