Class UkhlsHoursDistribution
java.lang.Object
simpaths.data.UkhlsHoursDistribution
UKHLS distribution of observed weekly hours worked (lhw), by sample type and gender. Labour categories with
DistributionOption.OBSERVED_LHW use it to draw realised hours within their band, so that each hour is drawn
with its observed share within the band.
Loaded from input/ukhls_lhw_distribution.xlsx (see Parameters.USE_UKHLS_LHW_DISTRIBUTION), which has one sheet
per sample type and gender, named e.g. "Couple_female", listing the frequency of each observed weekly hours value.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSample types, mirroring the samples of the labour-supply estimates in BenefitUnit; each names a sheet prefix. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintDraws realised weekly hours in the band [min, max] from the distribution of the given sheet, so that each hour is drawn with probability equal to its observed share within the band (hours never observed are never drawn). u is the person's uniform draw.static UkhlsHoursDistributionLoads the distribution of every sample type and gender from the given Excel file.static StringSheet for the person's current sample type and gender.static StringsheetName(UkhlsHoursDistribution.Sample sample, Gender gender)
-
Field Details
-
FILE_NAME
- See Also:
-
-
Method Details
-
load
Loads the distribution of every sample type and gender from the given Excel file. -
sheetName
-
sheetFor
-
draw
Draws realised weekly hours in the band [min, max] from the distribution of the given sheet, so that each hour is drawn with probability equal to its observed share within the band (hours never observed are never drawn). u is the person's uniform draw. Returns -1 if the band has no observed frequency.
-