Description Usage Arguments Details Author(s)
These functions can be used to access information stored in trendbreaker
objects. See details.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## S3 method for class 'trendbreaker'
get_model(x, ...)
## S3 method for class 'trendbreaker'
get_formula(x, ...)
## S3 method for class 'trendbreaker'
get_response(x, ...)
## S3 method for class 'trendbreaker'
get_k(x, ...)
## S3 method for class 'trendbreaker'
get_results(x, ...)
## S3 method for class 'trendbreaker'
get_outliers(x, ...)
## S3 method for class 'trendbreaker'
predict(object, newdata, alpha = 0.05, ...)
|
x |
an |
... |
further arguments passed to other methods |
object |
an |
newdata |
a |
alpha |
the alpha threshold to be used for prediction intervals, defaulting to 0.05, i.e. 95% prediction intervals are derived |
The following accessors are available:
get_model()
: fitted model capturing the temporal trend in the data as an
trendbreaker_model_fit
object
get_k()
: number of recent days excluded from the temporal trend
get_formula()
: formula of the retained fitted model
get_response()
: response variable of the model
get_results()
: main data.frame
containing the original data, the
predicted values with lower and upper bounds for the prediction interval,
a logical
variable outlier
which is TRUE
for data points falling
outside the prediction interval, and classification
of outliers as a
factor
.
get_outliers()
: returns data points (as rows of get_results(x)
corresponding to outliers.
predict()
: function to make model predictions from the fitted model in
the trendbreaker
object; accepts two arguments newdata
, a mandatory
input containing data for which predictions are derived, and alpha
, the
threshold used for prediction intervals, defaulting to 0.05.
Thibaut Jombart, Dirk Schumacher and Tim Taylor.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.