Last chance! 50% off unlimited learning
Sale ends in
Estimate trend component
trend(x, p)
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.
Time series data
Polynomial order (1 linear, 2 quadratic, etc.)
season
y = trend(uspop,2)
plotc(uspop,y)
Run the code above in your browser using DataLab