- class statsmodels.base.model.Model(endog, exog=None, **kwargs)¶
A (predictive) statistical model. Intended to be subclassed not used.
A 1-d endogenous response variable. The dependent variable.
A nobs x k array where nobs is the number of observations and k is the number of regressors. An intercept is not included by default and should be added by the user. See
Available options are ‘none’, ‘drop’, and ‘raise’. If ‘none’, no nan checking is done. If ‘drop’, any observations with nans are dropped. If ‘raise’, an error is raised. Default is ‘none’.
Indicates whether the RHS includes a user-supplied constant. If True, a constant is not checked for and k_constant is set to 1 and all result statistics are calculated as if a constant is present. If False, a constant is not checked for and k_constant is set to 0.
Extra arguments that are used to set model properties when using the formula interface.
endog and exog are references to any data provided. So if the data is already stored in numpy arrays and it is changed then endog and exog will change as well.
Fit a model to data.
from_formula(formula, data[, subset, drop_cols])
Create a Model from a formula and dataframe.
After a model has been fit predict returns the fitted values.
Names of endogenous variables.
Names of exogenous variables.