dcegm.pre_processing.model_functions.process_model_functions¶
Functions¶
|
Create wrapped functions from user supplied functions. |
|
|
|
|
Module Contents¶
- dcegm.pre_processing.model_functions.process_model_functions.process_model_functions_and_extract_info(model_config: Dict, model_specs: Dict, state_space_functions: Dict[str, Callable], utility_functions: Dict[str, Callable], utility_functions_final_period: Dict[str, Callable], budget_constraint: Callable, stochastic_states_transitions: Dict[str, Callable] | None = None, shock_functions: Dict[str, Callable] | None = None)¶
Create wrapped functions from user supplied functions.
- Parameters:
options (Dict[str, int]) – Options dictionary.
map_state_variables_to_index (Dict[str, int]) – Dictionary mapping state variables to their index in the state vector.
user_utility_functions (Dict[str, callable]) – Dictionary of three user-supplied functions for computation of: (i) utility (ii) inverse marginal utility (iii) next period marginal utility
user_budget_constraint (callable) – Callable budget constraint.
exogenous_transition_function (callable) – User-supplied function returning for each state a transition matrix vector.
- Returns:
compute_utility (callable): Function for computation of agent’s utility.
- compute_marginal_utility (callable): User-defined function to compute the
agent’s marginal utility. The input
`params`is already partialled in.
- compute_inverse_marginal_utility (Callable): Function for calculating the
inverse marginal utility, which takes the marginal utility as only input.
- compute_value (callable): Function for calculating the value from consumption
level, discrete choice and expected value. The inputs
`discount_rate`and`compute_utility`are already partialled in.
- compute_next_wealth_matrices (callable): User-defined function to compute the
agent’s wealth matrices of the next period (t + 1). The inputs
`savings_grid`,`income_shocks`,`params`and`options`are already partialled in.
- compute_upper_envelope (Callable): Function for calculating the upper envelope
of the policy and value function. If the number of discrete choices is 1, this function is a dummy function that returns the policy and value function as is, without performing a fast upper envelope scan.
- transition_function (Callable): Partialled transition function that returns
transition probabilities for each state.
- Return type:
tuple
- dcegm.pre_processing.model_functions.process_model_functions.process_state_space_functions(state_space_functions, model_config, model_specs, continuous_state_name)¶
- dcegm.pre_processing.model_functions.process_model_functions.process_sparsity_condition(state_space_functions, model_specs)¶
- dcegm.pre_processing.model_functions.process_model_functions.process_second_continuous_update_function(continuous_state_name, state_space_functions, model_specs)¶