incline.pspline_trend¶
- incline.pspline_trend(df, column_value='value', time_column=None, lam=None, **kwargs)[source]¶
Estimate the trend with a penalized smoothing spline.
With
lamfixed this is a linear smoother and standard errors are exact. Leavinglamas None selects it by generalized cross-validation, which makes the fit data-dependent and routes uncertainty to the bootstrap.- Parameters:
df (pd.DataFrame) – Time series data.
column_value (str) – Column holding the values.
time_column (str | None) – Numeric time column.
lam (float | None) – Roughness penalty.
**kwargs (Any) – Uncertainty options; see
estimate().
- Returns:
The input frame plus the estimate columns.
- Return type:
pd.DataFrame