Class PartnershipAlignment

java.lang.Object
simpaths.model.PartnershipAlignment
All Implemented Interfaces:
IEvaluation

public class PartnershipAlignment extends Object implements IEvaluation
PartnershipAlignment adjusts the probability of individuals forming a union to match the simulated proportion of the population in a partnership to values observed in the data. It modifies the intercept of the "considerCohabitation" probit model. To find the value by which the intercept should be adjusted, it uses a search routine. The routine adjusts probabilities, and performs union matching separate from the actual simulation. If the projected share of the population in a partnership differs from the desired target by more than a specified threshold, the adjustment is repeated. Importantly, the adjustment needs to be only found once. Modified intercepts can then be used in subsequent simulations.
  • Constructor Details

    • PartnershipAlignment

      public PartnershipAlignment(Set<Person> persons)
  • Method Details

    • evaluate

      public double evaluate(double[] args)
      Evaluates the discrepancy between the simulated and target aggregate share of partnered persons and adjusts partnerships if necessary. This method compares the adjustment parameter 'args[0]' with the current 'partnershipAdjustment'. If the absolute difference exceeds a small threshold (1.0E-5), it triggers the adjustment of partnerships. The error is then calculated as the difference between the target and the actual aggregate share of partnered persons. This error value is returned and serves as the stopping condition in root search routines.
      Specified by:
      evaluate in interface IEvaluation
      Parameters:
      args - An array of parameters, where args[0] represents the adjustment parameter.
      Returns:
      The error in the target aggregate share of partnered persons after potential adjustments.