Skip to content

trend (Series)

Estimate time trend in time series data.

Syntax

x = trend(x, ~range, ...)

Input arguments marked with a ~ sign may be omitted.

Input arguments

x [ tseries ]

Input time series.

~range [ numeric | @all | char ]

Range for which the trend will be computed; if omitted or assigned @all, the entire range of the input times series.

Output arguments

x [ tseries ]

Output trend time series.

Options

'Break=' [ numeric | empty ]

Vector of breaking points at which the trend may change its slope.

'Connect=' [ true | false ]

Calculate the trend by connecting the first and the last observations.

'Diff=' [ true | false ]

Estimate the trend on differenced data.

'Log=' [ true | false ]

Logarithmize the input data, de-logarithmize the output data.

'Season=' [ true | false | 2 | 4 | 6 | 12 ]

Include deterministic seasonal factors in the trend.

Description

Examples