statsmodels.tsa.deterministic.CalendarTimeTrend.from_string¶
-
classmethod CalendarTimeTrend.from_string(freq, trend, base_period=
None
)[source]¶ Create a TimeTrend from a string description.
Provided for compatibility with common string names.
- Parameters:¶
- freq
str
A string convertible to a pandas frequency.
- trend{“n”, “c”, “t”, “ct”, “ctt”}
The string representation of the time trend. The terms are:
“n”: No trend terms
“c”: A constant only
“t”: Linear time trend only
“ct”: A constant and a time trend
“ctt”: A constant, a time trend and a quadratic time trend
- base_period{
str
,pd.Timestamp
},default
None
The base period to use when computing the time stamps. This value is treated as 1 and so all other time indices are defined as the number of periods since or before this time stamp. If not provided, defaults to pandas base period for a PeriodIndex.
- freq
- Returns:¶
TimeTrend
The TimeTrend instance.
Last update:
Dec 11, 2024