truncpoly: Creates a modified b-spline basis (piecewise polynomial).

Description Usage Arguments Value

View source: R/forecasting_helpers.R

Description

The modified basis splines are used to capture any long term trends per geographic group.

Usage

1
truncpoly(x = NULL, degree = 6, maxobs = NULL, minobs = NULL)

Arguments

x

Vector of weekly observation dates.

degree

Degree passed to splines::bs().

maxobs

Date of the last known value.

minobs

Date of the first known value.

Value

A modified b-spline basis with the last basis splines reversed and the second to last basis spline function removed (to reduce the edge effects of using splines).


EcoGRAPH/epidemiar documentation built on Nov. 13, 2020, 5:31 p.m.