:py:mod:`respy.exogenous_processes` =================================== .. py:module:: respy.exogenous_processes .. autoapi-nested-parse:: Utils for the inclusion of exogenous processes. .. !! processed by numpydoc !! Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: respy.exogenous_processes.compute_transition_probabilities respy.exogenous_processes.weight_continuation_values respy.exogenous_processes.create_transit_choice_set respy.exogenous_processes._get_maximal_choice_set respy.exogenous_processes._get_representation_cols respy.exogenous_processes.create_transition_objects .. py:function:: compute_transition_probabilities(states, transit_keys, optim_paras, dense_key_to_dense_covariates) Get transition probabilities by dense_key. We calculate transition probabilities for one dense key in this function. Therefore we retrieve probabilities for individuals and combine them to get a full transition matrix. :Returns: **df** : :obj:`pandas.core.DataFrame` Rows represent states within a dense key and columns potential dense states in the next period. .. !! processed by numpydoc !! .. py:function:: weight_continuation_values(complex_, options, continuation_values, transit_key_to_choice_set) Weight continuation values by their probability. We weight continuation values for a dense key according to the probablity that she could end up in of these. Exogenous processes only depend upon the state in this period and not the choice thus we can calculate the cont values symetrically across choices. Caution has to be exercised when choice sets are restricted. Another imortant point are states that can only be reached with a change of exogenous process. :Returns: **continuation_values** : :obj:`np.array` (n_states, n_choices) with the weighted continuation values. .. !! processed by numpydoc !! .. py:function:: create_transit_choice_set(dense_key_to_transit_representation, dense_key_to_choice_set) Return max representation choice set of each dense choice core. .. !! processed by numpydoc !! .. py:function:: _get_maximal_choice_set(list_of_choice_sets) .. py:function:: _get_representation_cols(rep_choice_set, choice_set) Return index of array cols. .. !! processed by numpydoc !! .. py:function:: create_transition_objects(dense_covariates, core_key, exogenous_grid, n_exog, dense_covariates_to_dense_index, core_key_and_dense_index_to_dense_key) Create objects necessary for tranistion probabilities. .. !! processed by numpydoc !!