API Reference — statsmodels
https://www.statsmodels.org/dev/api.htmlAPI Reference¶. The main statsmodels API is split into models: statsmodels.api: Cross-sectional models and methods.Canonically imported using import statsmodels.api as sm.. statsmodels.tsa.api: Time-series models and methods.Canonically imported using import statsmodels.tsa.api as tsa.. statsmodels.formula.api: A convenience interface for specifying models using formula strings …
statsmodels.tools.tools.add_constant — statsmodels
www.statsmodels.org › stable › generatedstatsmodels.tools.tools. add_constant (data, prepend = True, has_constant = 'skip') [source] ¶ Add a column of ones to an array. Parameters data array_like. A column-ordered design matrix. prepend bool. If true, the constant is in the first column. Else the constant is appended (last column). has_constant str {‘raise’, ‘add’, ‘skip’} Behavior if data already has a constant. The default will return data without adding another constant.