statsmodels.tsa.tsatools.add_trend(x, trend='c', prepend=False, has_constant='skip')
[source]
Adds a trend and/or constant to an array.
Parameters: |
|
---|---|
Returns: |
y – The original data with the additional trend columns. If x is a recarray or pandas Series or DataFrame, then the trend column names are ‘const’, ‘trend’ and ‘trend_squared’. |
Return type: |
array, recarray or DataFrame |
Returns columns as [“ctt”,”ct”,”c”] whenever applicable. There is currently no checking for an existing trend.
See also
© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.tsa.tsatools.add_trend.html