respy.tests.test_solve
test_check_solution(model_or_seed)
test_check_solution
Test solution of a random model.
test_state_space_restrictions_by_traversing_forward(model)
test_state_space_restrictions_by_traversing_forward
Test for inadmissible states in the state space.
test_invariance_of_solution(model_or_seed)
test_invariance_of_solution
Test for the invariance of the solution.
test_create_state_space_vs_specialized_kw94(model)
test_create_state_space_vs_specialized_kw94
Test whether create state space reproduces invariant features of the kw94
test_create_state_space_vs_specialized_kw97(model)
test_create_state_space_vs_specialized_kw97
State space reproduces invariant features of the kw97 state space.
test_explicitly_nonpec_choice_rewards_of_kw_94_one()
test_explicitly_nonpec_choice_rewards_of_kw_94_one
Test values of non-pecuniary rewards for Keane & Wolpin 1994.
test_explicitly_nonpec_choice_rewards_of_kw_94_two()
test_explicitly_nonpec_choice_rewards_of_kw_94_two
test_dense_choice_cores()
test_dense_choice_cores
Check whether continuation values are equal for paths where the restrictions do not
test_invariance_of_wage_calc()
test_invariance_of_wage_calc
The model reproduces invariant properties of wage outcomes.
test_child_indices()
test_child_indices
Testing existence of properties for calculation of child indices!
test_wage_nonpecs()
test_wage_nonpecs
Replace constants in reward functions with constants due to observables.
respy.tests.test_solve.
The test is motivated by the addition of another restriction in https://github.com/OpenSourceEconomics/respy/pull/145. To ensure that similar errors do not happen again, this test takes all states of the first period and finds all their child states. Taking only the child states their children are found and so on. At last, the set of visited states is compared against the total set of states.
The test can only applied to some models. Most models would need custom options["core_state_space_filters"] to remove inaccessible states from the state space.
options["core_state_space_filters"]
We run solve two times and check whether all attributes of the state space match.
Test whether create state space reproduces invariant features of the kw94 state space!
Check whether continuation values are equal for paths where the restrictions do not make any difference. We check continuation values at states where one choice leads to a remaining decision tree that is equivalent to the unrestricted problem and one where this is not the case!
respy.tests.test_simulate
respy.tests.utils