OLSInfluence.summary_table()

statsmodels.stats.outliers_influence.OLSInfluence.summary_table OLSInfluence.summary_table(float_fmt='%6.3f') [source] create a summary table with all influence and outlier measures This does currently not distinguish between statistics that can be calculated from the original regression results and for which a leave-one-observation-out loop is needed Returns: res : SimpleTable instance SimpleTable instance with the results, can be printed Notes This also attaches table_data to the insta

OLSResults.compare_f_test()

statsmodels.regression.linear_model.OLSResults.compare_f_test OLSResults.compare_f_test(restricted) use F test to test whether restricted model is correct Parameters: restricted : Result instance The restricted model is assumed to be nested in the current model. The result instance of the restricted model is required to have two attributes, residual sum of squares, ssr, residual degrees of freedom, df_resid. Returns: f_value : float test statistic, F distributed p_value : float p-val

OLSInfluence.summary_frame()

statsmodels.stats.outliers_influence.OLSInfluence.summary_frame OLSInfluence.summary_frame() [source] Creates a DataFrame with all available influence results. Returns: frame : DataFrame A DataFrame with all results. Notes The resultant DataFrame contains six variables in addition to the DFBETAS. These are: cooks_d : Cook?s Distance defined in Influence.cooks_distance standard_resid : Standardized residuals defined in Influence.resid_studentized_internal hat_diag : The diagonal of the

OLSInfluence.get_resid_studentized_external()

statsmodels.stats.outliers_influence.OLSInfluence.get_resid_studentized_external OLSInfluence.get_resid_studentized_external(sigma=None) [source] calculate studentized residuals Parameters: sigma : None or float estimate of the standard deviation of the residuals. If None, then the estimate from the regression results is used. Returns: stzd_resid : ndarray studentized residuals Notes studentized residuals are defined as resid / sigma / np.sqrt(1 - hii) where resid are the residuals

OLS.score()

statsmodels.regression.linear_model.OLS.score OLS.score(params) Score vector of model. The gradient of logL with respect to each parameter.

OLS.whiten()

statsmodels.regression.linear_model.OLS.whiten OLS.whiten(Y) [source] OLS model whitener does nothing: returns Y.

OLS.predict()

statsmodels.regression.linear_model.OLS.predict OLS.predict(params, exog=None) Return linear predicted values from a design matrix. Parameters: params : array-like Parameters of a linear model exog : array-like, optional. Design / exogenous data. Model exog is used if None. Returns: An array of fitted values : Notes If the model has not yet been fit, params is not optional.

OLS.initialize()

statsmodels.regression.linear_model.OLS.initialize OLS.initialize()

OLS.loglike()

statsmodels.regression.linear_model.OLS.loglike OLS.loglike(params) [source] The likelihood function for the clasical OLS model. Parameters: params : array-like The coefficients with which to estimate the log-likelihood. Returns: The concentrated likelihood function evaluated at params. :

OLS.from_formula()

statsmodels.regression.linear_model.OLS.from_formula classmethod OLS.from_formula(formula, data, subset=None, *args, **kwargs) Create a Model from a formula and dataframe. Parameters: formula : str or generic Formula object The formula specifying the model data : array-like The data for the model. See Notes. subset : array-like 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 args : extra a