Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negative choice set eliminates option(s) completely under some cirumstances and induces missing data columns #388

Open
amageh opened this issue Nov 5, 2020 · 1 comment
Labels

Comments

@amageh
Copy link
Member

amageh commented Nov 5, 2020

  • respy version used, if any: 2.0.0
  • Python version, if any: any
  • Operating System: any

Describe the bug

The bug concerns the negative choice sets. The observed behavior is the following: restricting work choices based on minimum experience requirements in other choice alternatives sometimes eliminates the choice for which the negative choice set is specified. Not sure whether I am just not specifying things correctly, but some parts seem weird to me:

Behavior

In the example models kw_94_* setting options["negative_choice_set"] = {'b': ['exp_edu < 12']} seems to partially eliminate option b. The option is never chosen and more importantly, the simulated dataset then only contains columns Experience_B, Shock_Reward_B, Meas_Error_Wage_B.

The following columns will be missing: Nonpecuniary_Reward_B, Wage_B , Flow_Utility_B, Value_Function_B, Continuation_Value_B.

Some additional info:

  • In the above example, edu is also never chosen, but it is not missing data columns.
  • This occurs for all kw_94_* example data sets and for both working options when exp_edu < 12 is set as the negative choice condition.
  • It also sometimes occurs when the negative choice set is based on the experience in another occupation (for instance for kw_94_one option a when options["negative_choice_set"] = {'a': ['exp_b < 2']}) but not always (e.g. for the same model options["negative_choice_set"] = {'b': ['exp_a < 2']} does not create the issue for b).
  • Eliminating a choice using a covariate like options["negative_choice_set"] = {'b': ['at_least_twelve_exp_edu == False']} also creates the issue.
  • Eliminating the option using periods for example like options["negative_choice_set"] = {'b': ['period < 2']} does not eliminate the data columns in any case I tested.
  • For the home option, the issue doesn't arise.
  • Also tested this for kw_97_basic- same issues.

To reproduce

Steps to reproduce the behavior:

import respy as rp
params, options, df = rp.get_example_model("kw_94_one")
options["negative_choice_set"] = {'b': ['exp_edu < 12']}
simulate = rp.get_simulate_func(params, options)
data = simulate(params)

Then check out data columns and choice patterns.

@amageh amageh added the bug label Nov 5, 2020
@amageh
Copy link
Member Author

amageh commented Nov 5, 2020

@mo2561057 and @SofiaBadini tagging you, since I briefly discussed this with both of you :) Let me know if you have any ideas or additional input on this!

@amageh amageh changed the title Negative choice set eliminates option(s) completly under some cirumstances and induces missing data columns Negative choice set eliminates option(s) completely under some cirumstances and induces missing data columns Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant