| ts_trend_season {exams.forge} | R Documentation |
Trend and Season Model
Description
Estimate a trend and season model from a ts_data object.
Usage
ts_trend_season(ts, trend = NULL, season = NULL)
ts_ts(ts, trend = NULL, season = NULL)
Arguments
ts |
|
trend |
numeric or logical: if |
season |
numeric or logical |
Value
Returns an extended ts_data object with the following list of elements:
-
tthe time points -
sthe season for the time points -
xtthe time series values -
trendthe fitted trend values -
trend.coeffthe trend coefficients -
trend.linearthe trend type, ifNAthen it is unknown -
seasonthe fitted season values -
season.tthe fitted season values for the time series -
trend.seasonthe fitted values for trend and season -
trend.linearthe trend type, ifNAthen it is unknown -
varthe variance of the residuals -
r.squaretheR^2of the final model
Examples
ts <- ts_data(12, trend.coeff= c(sample(0:10, 1), sample(1+(1:10)/20, 1)))
ts_trend_season(ts)