trend {itsmr} | R Documentation |
Estimate trend component
Description
Estimate trend component
Usage
trend(x, p)
Arguments
x |
Time series data |
p |
Polynomial order (1 linear, 2 quadratic, etc.) |
Value
Returns a vector the same length as x
.
Subtract from x
to obtain residuals.
The returned vector is the least squares fit of a polynomial to the data.
See Also
Examples
y = trend(uspop,2)
plotc(uspop,y)
[Package itsmr version 1.10 Index]