Skip to content

Introduce lag of hours worked variable#172

Merged
andrewbaxter439 merged 13 commits intosimpaths:developfrom
pbronka:bug-fix-update-initial-population
Jun 2, 2025
Merged

Introduce lag of hours worked variable#172
andrewbaxter439 merged 13 commits intosimpaths:developfrom
pbronka:bug-fix-update-initial-population

Conversation

@pbronka
Copy link
Copy Markdown
Contributor

@pbronka pbronka commented May 20, 2025

As required by the updated labour supply estimates (see discussion: #163), this PR introduces the lag(1) of the hours worked variable (lhw).

This PR includes:

Uncommenting previously commented-out code in the do-files, enabling them to run as intended.

Introducing a new variable, l1_lhw, which is a lagged version of lhw, along with some very simple imputation rules. I am happy to accept further commits to refine this or to introduce a more robust imputation procedure.

TODO:

Modify the data parser in the simulation to accommodate this new variable.

Consider whether l1_lhw should be replaced with the current value of lhw if a null value is returned.

Verify whether this change affects the labour supply predictions produced by the model.

@pbronka
Copy link
Copy Markdown
Contributor Author

pbronka commented May 22, 2025

Stuck with this until #173 is resolved

@pbronka
Copy link
Copy Markdown
Contributor Author

pbronka commented May 27, 2025

This should now work, except for the integrations tests which need to be updated if we are happy.

@pbronka pbronka requested a review from andrewbaxter439 May 27, 2025 14:29
@pbronka pbronka marked this pull request as ready for review May 27, 2025 14:30
@andrewbaxter439
Copy link
Copy Markdown
Collaborator

will check this out and see about updating statistics 👍

@andrewbaxter439 andrewbaxter439 added the enhancement New feature or request label May 30, 2025
Copy link
Copy Markdown
Collaborator

@andrewbaxter439 andrewbaxter439 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, with new Statistics files in should be ready to merge

* Working directory
global dir_work "C:\MyFiles\99 DEV ENV\JAS-MINE\data work\initial_populations"
*global dir_work "C:\MyFiles\99 DEV ENV\JAS-MINE\data work\initial_populations"
global dir_work "C:\Users\Patryk\Documents\SP_prep_pop"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tiny side comment - at some point would it be helpful to make these more generic somehow? Either leaving as active directory where Stata is launched or prompting user to enter directory relative to do files where the process can find the data? I've tried to run it mostly as relative from a working directory when I start Stata to keep my own file paths out of the files (and they wouldn't work for anyone else!)

}

private List<Household> loadStaringPopulation() {
private List<Household> loadStartingPopulation() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay! 🏁

@andrewbaxter439 andrewbaxter439 merged commit cfb181a into simpaths:develop Jun 2, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants