{
  "name": "STL decomposition settings: statsmodels STL versus R stats::stl",
  "description": "Cross-walk of the documented arguments and defaults of the STL (seasonal-trend decomposition by LOESS) implementation in Python statsmodels and in base R stats::stl. Compiled from the statsmodels STL class documentation and the R stats::stl manual page, both read on 2026-11-15; rows list only settings stated in both pages.",
  "page": "https://casrai.org/guides/stl-decomposition",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-12-01T12:10:00Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Setting",
      "unit": "",
      "description": ""
    },
    {
      "name": "statsmodels STL (Python)",
      "unit": "",
      "description": ""
    },
    {
      "name": "R stats::stl",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Setting": "Seasonal window",
      "statsmodels STL (Python)": "seasonal=7 (odd, normally at least 7)",
      "R stats::stl": "s.window has no default; \"periodic\" or an odd span of at least 7"
    },
    {
      "Setting": "Trend window",
      "statsmodels STL (Python)": "trend=None: smallest odd integer > 1.5*period/(1-1.5/seasonal)",
      "R stats::stl": "t.window=NULL"
    },
    {
      "Setting": "Low-pass window",
      "statsmodels STL (Python)": "low_pass=None: smallest odd integer > period (at least 3)",
      "R stats::stl": "l.window=nextodd(period)"
    },
    {
      "Setting": "Seasonal LOESS degree",
      "statsmodels STL (Python)": "seasonal_deg=1 (0 or 1)",
      "R stats::stl": "s.degree=0"
    },
    {
      "Setting": "Trend LOESS degree",
      "statsmodels STL (Python)": "trend_deg=1 (0 or 1)",
      "R stats::stl": "t.degree=1"
    },
    {
      "Setting": "Low-pass LOESS degree",
      "statsmodels STL (Python)": "low_pass_deg=1 (0 or 1)",
      "R stats::stl": "l.degree=t.degree"
    },
    {
      "Setting": "Seasonal jump",
      "statsmodels STL (Python)": "seasonal_jump=1",
      "R stats::stl": "s.jump=ceiling(s.window/10)"
    },
    {
      "Setting": "Robust fitting",
      "statsmodels STL (Python)": "robust=False; True gives the weighted, outlier-resistant version",
      "R stats::stl": "robust=FALSE; inner=2, outer=0 (robust: inner=1, outer=15)"
    },
    {
      "Setting": "Input requirement",
      "statsmodels STL (Python)": "Period inferred from a pandas object with frequency; NumPy arrays need period",
      "R stats::stl": "Univariate ts with frequency > 1"
    }
  ],
  "sources": [
    {
      "title": "statsmodels.tsa.seasonal.STL",
      "url": "https://www.statsmodels.org/stable/generated/statsmodels.tsa.seasonal.STL.html",
      "accessed": "2026-11-15"
    },
    {
      "title": "R stats::stl manual page",
      "url": "https://stat.ethz.ch/R-manual/R-devel/library/stats/html/stl.html",
      "accessed": "2026-11-15"
    }
  ]
}