-
Notifications
You must be signed in to change notification settings - Fork 6
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
Endogenize investments #80
base: main
Are you sure you want to change the base?
Conversation
…. Missing data and constraints.
… yet with investments.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #80 +/- ##
==========================================
+ Coverage 91.43% 91.67% +0.24%
==========================================
Files 40 40
Lines 3070 3244 +174
==========================================
+ Hits 2807 2974 +167
- Misses 263 270 +7 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are endogenous factors not compatible with anchoring? And why not with stages? Especially stages are so orthogonal to everything else (they are just fixed constraints) that I don't think it would be hard.
For example, if you had chosen to implement all the logic for endogenous factors by transforming the user written model dict, the new stages could have been:
new_stagemap = list(np.repeat(old_stagemap, 2))
anchoring (dict): Dictionary with information about anchoring. | ||
See :ref:`anchoring` | ||
has_investments (bool): Whether the model has any investment factors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a big gain from calling everything that is measured with error a latent factor. That is why in skillmodels, investment factors always have been just regular factors. I would call them endogenous factors now, but I would not use the term investments (and definitely not the abbreviation inv
) to distinguish endogenous from exogenous factors.
Endogeneity of investments means that concurrent states influence the choice of investments. Skillmodels currently has no way of including that.
In this PR, we achieve it this by modelling this through transition functions. When investment factors are present, each period is split into two sub-periods. The first sub-period is for states, which can influence investments in the second sub-period.
is_investment
for factors. Addperiods_raw
(in the original data) in addition toperiods
(the doubled-up version used internally by skillmodels)Limitations: