lf_inflator: Labour force inflators

Description Usage Arguments Details Value Author(s) Source Examples

View source: R/lf_inflator.R

Description

Labour force inflators

Usage

1
2
3
4
5
6
7
8
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. The internal data was updated on 2018-08-17 to 2018-07-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.

Details

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

Value

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

Author(s)

Tim Cameron, Matthew Katzen, and Hugh Parsonage

Source

ABS Cat 6202.0 http://www.abs.gov.au/ausstats/[email protected]/mf/6202.0?OpenDocument.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
lf_inflator_fy(labour_force = 1, from_fy = "2012-13", to_fy = "2013-14")

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)))
## Not run: 
lf_inflator(labour_force = 1, from_date = "2013-06-30", to_date = "2014-06-30")

## End(Not run)

grattan documentation built on Oct. 17, 2018, 1:05 a.m.