gridcast: Automated Bayesian forecasting with YourCast

Description Usage Arguments Value Examples

Description

gridcast generates YourCast forecasts for a range of prior specifications and outputs diagnostics across the different specifications.

Usage

1
2
3
4
5
gridcast(dataobj, Ha.sigma.seq = c(from = 0.01, to = 20, length.out = 5),
  Ha.list = NULL, Ht.sigma.seq = c(from = 0.01, to = 20, length.out = 5),
  Ht.list = NULL, Hat.sigma.seq = NA, Hat.list = NULL, logscale = TRUE,
  time.degree = 1, length.holdout = 5, holdout = NULL,
  mse.age.weight = NA, print.runs = TRUE, ...)

Arguments

dataobj

Object of class 'yourprep'

Ha.sigma.seq

Three element numeric vector. The first two elements give the range of Ha.sigma values to search over. The 3rd element gives the number of values to sample from the range. If do not want to use age smoothing, set as NA and leave Ha.list as NULL.

Ha.list

Vector. A vector of additional values of Ha.sigma to include in the grid search.Default: NULL.

Ht.sigma.seq

Three element numeric vector. The first two elements give the range of Ht.sigma values to search over. The 3rd element gives the number of values to sample from the range. If do not want to use time smoothing, set as NA and leave Ht.list as NULL.

Ht.list

Vector. A vector of additional values of Ht.sigma to include in the grid search. Default: NULL.

Hat.sigma.seq

Three element numeric vector. The first two elements give the range of Hat.sigma values to search over. The 3rd element gives the number of values to sample from the range. If do not want to use trend smoothing, set as NA and leave Hat.list as NULL.

Hat.list

Vector. A vector of additional values of Hat.sigma to include in the grid search. Default: NULL.

logscale

Logical. Should sigma values be evenly sampled on a log scale and then exponentiated? Default: TRUE.

time.degree

Non-negative integer. Specifies the degree of the baseline polynomial to which time profiles are smoothed. For example, if time.degree=1, then the forecasts cllosest to a straight line are scored highest. If time.degree=0, then forecasts closest to a flat line are scored highest.

length.holdout

Non-negative integer. Specifies the number of time periods that should be omitted from the end of the observed period for validation. If set to 0, then at least one time period must be provided as an argument to holdout.

holdout

Vector specifying additional time periods to withhold for validation. Default: NULL.

mse.age.weight

A scalar or a numeric vector with weights that determine how much the different age groups factor into the calculation of root mean square error of the forecasts in the validation period. If set to 0 or NA, age groups are weighted equally; if set to a nonzero scalar, the weight for age group a is set proportional to a^mse.age.weight; if a vector of length A, the ath element is the weight of age group a. Default: 0.

print.runs

Logical. If TRUE, will print notification for each run of yourcast.

...

Additional arguments passed to yourcast function.

Value

An object of class "gridcast" contains the following components

Examples

1
2
3
4
5
6
7
8
data(netherlands)
ff <- log(brst3/popu3) ~ log(hc) + log(gdp) + log(tobacco3) + log(fat) + time
gridcast(netherlands_data, formula=ff, model="map",
                sample.frame=c(1950,2000,2001,2030), verbose=FALSE)

gridcast(netherlands_data, formula=ff, model="map",
                sample.frame=c(1950,2000,2001,2030), verbose=FALSE,
                Ht.sigma.seq=c(from=0.01, to=100, length.out=5))

IQSS/AutoCast documentation built on May 7, 2019, 6:02 a.m.