statsmodels.formula.api.ols — statsmodels
www.statsmodels.org › dev › generatedstatsmodels.formula.api.ols. Create a Model from a formula and dataframe. The formula specifying the model. The data for the model. See Notes. An array-like object of booleans, integers, or index values that indicate the subset of df to use in the model. Assumes df is a pandas.DataFrame. Columns to drop from the design matrix.
API Reference — statsmodels
www.statsmodels.org › dev › apiCanonically imported using import statsmodels.formula.api as smf The API focuses on models and the most frequently used statistical test, and tools. Import Paths and Structure explains the design of the two API modules and how importing from the API differs from directly importing from the module where the model is defined.
AttributeError: module 'statsmodels.formula.api' has no ...
stackoverflow.com › questions › 58959975Nov 20, 2019 · import statsmodels.formula.api as sm X = np.append(arr = np.ones((50, 1)).astype(int) , values = X, axis = 1) X_opt = X[:, [0 ,1, 2, 3, 4, 5]] regressor_OLS = sm.OLS ...
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 …