Skip to content

Experimental/lifetime draws#221

Merged
andrewbaxter439 merged 16 commits intodevelopfrom
experimental/lifetime_draws
Sep 23, 2025
Merged

Experimental/lifetime draws#221
andrewbaxter439 merged 16 commits intodevelopfrom
experimental/lifetime_draws

Conversation

@andrewbaxter439
Copy link
Copy Markdown
Collaborator

What

Why

  • aiming to stabilise employment transition rates

@andrewbaxter439 andrewbaxter439 requested a review from Copilot July 28, 2025 10:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements an experimental lifetime draws mechanism to improve employment transition rate stability in the labor supply model. The main purpose is to add probability-based persistence for labor supply random draws rather than generating completely new random values each period.

Key changes:

  • Introduces employment and unemployment persistence probabilities to control how often labor innovations persist from previous periods
  • Adds new labor supply regression variables for education-work hour combinations
  • Updates model parameters including starting year range and column counts for regression matrices

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.

File Description
Innovations.java Adds new constructor to support single-draw double innovations for the persistence mechanism
BenefitUnit.java Implements labor innovation persistence logic and adds new regression variables for education-work combinations
Parameters.java Updates persistence probability constants, year ranges, and regression matrix column counts
Comments suppressed due to low confidence (1)

@andrewbaxter439
Copy link
Copy Markdown
Collaborator Author

Explanation:

Probabilities of 'persisting' a previous labour supply innovation are set in Parameters.java at the top:

    // Determine probability of yearly labour supply matches persisting from previous year
    public static double labour_innovation_employment_persistence_probability = 0.9;
    public static double labour_innovation_unemployment_persistence_probability = 0.5;

It then runs a new method with this to determine whether to assign a new labour innovation value or persist the previous one:

   private double getLabourInnovation(double persistenceProbability) {

        double newLabourInnovation = innovations.getDoubleDraw(5);

        // persistenceRandomDraw - random value to determine if we keep old innovation
        double persistenceRandomDraw = innovations.getDoubleDraw(6);

        int currentYear = model.getYear();

        // Initialize on first call
        if (lastLabourInnov == null || lastYear == null) {
            lastLabourInnov = newLabourInnovation;
            lastYear = currentYear;
            return newLabourInnovation;
        }

        double labourInnov;
        if (persistenceRandomDraw < persistenceProbability) {
            labourInnov = lastLabourInnov;
        } else {
            labourInnov = newLabourInnovation;
        }

        // Store values for next period
        lastLabourInnov = labourInnov;
        lastYear = currentYear;

        return labourInnov;



        }

These allow differing 'churns' for those entering/exiting employment.

@andrewbaxter439
Copy link
Copy Markdown
Collaborator Author

andrewbaxter439 commented Aug 5, 2025

  • Change to "not in employment" rather than "unemployment"

@andrewbaxter439
Copy link
Copy Markdown
Collaborator Author

@matteorichiardi thats it working with terms updated to note "not in employment" rather than "unemployed". Seems ready to merge then can do further tweaks as new labour supply estimates come along?

@andrewbaxter439
Copy link
Copy Markdown
Collaborator Author

Hi @justin-ven and @matteorichiardi - have noted you as 'reviewers' but just to sense check from last few weeks' discussion whether this is now ready to merge in?

@andrewbaxter439 andrewbaxter439 merged commit b3a39c6 into develop Sep 23, 2025
5 checks passed
@andrewbaxter439 andrewbaxter439 deleted the experimental/lifetime_draws branch January 21, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add probability of re-sampling random draw from labour transitions to stabilise employment transitions

2 participants