apaCone.Linear(TimeSeries, FirstIdx, SecondIdx, nForecasts, Sigma1, Sigma2, IsStacked)
=apaCone.Linear(TimeSeries, FirstIdx, SecondIdx, nForecasts, Sigma1, Sigma2, IsStacked)Result
Calculates forecast intervals (cone) for an imposed linear trend through two observations of a time series.
Syntax
TimeSeries: r x 1 data vector containing a time series
FirstIdx: index of the first observation
SecondIdx: index of the second observation
nForecasts: number of out-of-sample forecasts
Sigma1: first confidence level, defined as number of standard deviations away from the mean
Sigma2: second confidence level, defined as number of standard deviations away from the mean
IsStacked: TRUE to return the relative differences between the confidence levels (e.g. for stacked area charts), FALSE to return absolute levels
Remarks
The residual volatility uses the denominator (number of fitted points − 1).
