Labour force inflators

lf_inflator_fy(labour_force = 1, from_fy = NULL, to_fy = NULL,
  useABSConnection = FALSE, allow.projection = TRUE, use.month = 1L,
  forecast.series = c("mean", "upper", "lower", "custom"),
  forecast.level = 95, lf.series = NULL, .lf_indices = NULL,
  accelerate.above = 100000L)

lf_inflator(labour_force = 1, from_date = "2013-06-30", to_date,
  useABSConnection = FALSE)

Arguments

labour_force

A numeric vector.

from_fy, to_fy

(character) a character vector with each element in the form "2012-13" representing the financial years between which the labour force inflator is desired.

If both from_fy and to_fy are NULL (the default), from_fy is set to the previous financial year and to_fy to the current financial year, with a warning. Setting only one is an error.

useABSConnection

Should the function connect with ABS.Stat via an SDMX connection? If FALSE (the default), a pre-prepared index table is used. This is much faster and more reliable (in terms of errors), though of course relies on the package maintainer to keep the tables up-to-date.

If the SDMX connection fails, a message is emitted (not a warning) and the function contines as if useABSConnection = FALSE.

The internal data was updated on 2019-11-15 to 2019-11-01.

allow.projection

Logical. Should projections be allowed?

use.month

An integer (corresponding to the output of data.table::month) representing the month of the series used for the inflation.

forecast.series

Whether to use the forecast mean, or the upper or lower boundaries of the prediction intervals.

forecast.level

The prediction interval to be used if forecast.series is upper or lower.

lf.series

If forecast.series = 'custom', a data.table with two variables, fy_year and r. The variable fy_year consists of all financial years between the last financial year in the (known) labour force series and to_fy inclusive. The variable r consists of rates of labour force growth assumed in each fy_year, which must be 1 in the first year (to connect with the original labour force series).

.lf_indices

(Internal use only.) A data.table sent directly to inflator without any checks.

accelerate.above

An integer setting the threshold for 'acceleration'. When the maximum length of the arguments exceeds this value, calculate each unique value individually then combine. Set to 100,000 as a rule of thumb beyond which calculation speeds benefit dramatically. Can be set to Inf to disable acceleration.

from_date

The date of labour_force.

to_date

Dates as a character vector.

Source

ABS Cat 6202.0 http://www.abs.gov.au/ausstats/abs@.nsf/mf/6202.0?OpenDocument.

Value

The relative labour force between to_date and for_date or to_fy and from_fy, multiplied by labour_force.

Details

lf_inflator is used on dates. The underlying data series is available every month.

Examples

lf_inflator_fy(labour_force = 1, from_fy = "2012-13", to_fy = "2013-14")
#> [1] 1.008034
library(data.table) # Custom 1% growth over 2018-19 -> 2019-20 lf_inflator_fy(from_fy = "2018-19", to_fy = "2019-20", forecast.series = "custom", lf.series = data.table(fy_year = c("2018-19", "2019-20"), r = c(0, 0.01)))
#> [1] 1.01
# NOT RUN { lf_inflator(labour_force = 1, from_date = "2013-06-30", to_date = "2014-06-30") # }