make_time_basis: Make time basis matrix

Description Usage Arguments Value

Description

makes a matrix of polynomial (in date) and natural spline (in day of year) basis functions + interaction terms for set of dates. Dates are scaled to be between (0,1) before defining splines.

Usage

1
make_time_basis(dates, df.lf, df.hf, b.formula = ~b.lf + b.hf + b.lf:b.hf)

Arguments

dates

vector of dates of each observation

df.lf

natural spline degrees of freedom on date

df.hf

periodic basis spline degrees of freedom on the day of the year

b.formula

formula for natural spline basis and periodic basis splines. Must be written in terms of b.lf and b.hf

Value

matrix of basis functions with all linear and interaction terms evaluated at every date passed to function.


gbstat/tailqr documentation built on May 8, 2019, 5:42 p.m.