Description Usage Arguments Value
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.
1 | make_time_basis(dates, df.lf, df.hf, b.formula = ~b.lf + b.hf + b.lf:b.hf)
|
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 |
matrix of basis functions with all linear and interaction terms evaluated at every date passed to function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.