Description Usage Arguments Value
Given a time series and a specified number of harmonic and polynomial terms, this function builds the dataframe needed for the call to lm(). See serf.fit function for example on how to fit model.
1 2 |
ts |
response vector of numeric values representing the time series to be modeled. By default this is set to 'g.ts' the global time series which MUST be specified by the user before calling this function |
t1 |
is the integer index of the parameter 'ts' where model fitting begins; defaults to 1 |
t2 |
is the integer index of the parameter 'ts' where model fitting ends; defaults to length(ts) |
period |
numeric value; defaults to 52.2 |
trend.poly |
is specified as an integer vector representing the degrees of the polynomial terms to be included; defaults to 1 i.e. single linear trend term |
harmonic |
is also specified as an integer vector representing fractional multiples of the period e.g. 'harmonic=c(1,2)' specifies two harmonic pairs (two sine terms and two cosine terms) of one period and one half-period respectively |
covar |
adds additional covariance factors but this feature not currently implemented; defaults to NULL |
Data frame containing predictors for model fitting and forecasting
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.