one {onlineforecast} | R Documentation |
Create ones for model input intercept
Description
Returns a data.frame of ones which can be used in forecast model inputs
Usage
one()
Details
The function returns ones which can be used to generate ones, e.g. to be used as a intercept for a model.
See vignettes 'setup-data' and 'setup-and-use-model'.
Value
A data.frame of ones
Examples
# A model
model <- forecastmodel$new()
# Use the function in the input definition
model$add_inputs(mu = "one()")
# Set the forecast horizons
model$kseq <- 1:4
# During the transformation stage the one will be generated for the horizons
model$transform_data(subset(Dbuilding, 1:7))
[Package onlineforecast version 1.0.2 Index]