BinaryModel.predict()

statsmodels.discrete.discrete_model.BinaryModel.predict BinaryModel.predict(params, exog=None, linear=False) [source] Predict response variable of a model given exogenous variables. Parameters: params : array-like Fitted parameters of the model. exog : array-like 1d or 2d array of exogenous values. If not supplied, the whole exog attribute of the model is used. linear : bool, optional If True, returns the linear predictor dot(exog,params). Else, returns the value of the cdf at the line

BinaryResults.conf_int()

statsmodels.discrete.discrete_model.BinaryResults.conf_int BinaryResults.conf_int(alpha=0.05, cols=None, method='default') Returns the confidence interval of the fitted parameters. Parameters: alpha : float, optional The significance level for the confidence interval. ie., The default alpha = .05 returns a 95% confidence interval. cols : array-like, optional cols specifies which confidence intervals to return method : string Not Implemented Yet Method to estimate the confidence_interva

BinaryModel.initialize()

statsmodels.discrete.discrete_model.BinaryModel.initialize BinaryModel.initialize() Initialize is called by statsmodels.model.LikelihoodModel.__init__ and should contain any preprocessing that needs to be done for a model.

BinaryModel.loglike()

statsmodels.discrete.discrete_model.BinaryModel.loglike BinaryModel.loglike(params) Log-likelihood of model.

BinaryModel.pdf()

statsmodels.discrete.discrete_model.BinaryModel.pdf BinaryModel.pdf(X) The probability density (mass) function of the model.

BinaryModel.information()

statsmodels.discrete.discrete_model.BinaryModel.information BinaryModel.information(params) Fisher information matrix of model Returns -Hessian of loglike evaluated at params.

BinaryModel.hessian()

statsmodels.discrete.discrete_model.BinaryModel.hessian BinaryModel.hessian(params) The Hessian matrix of the model

BinaryModel.from_formula()

statsmodels.discrete.discrete_model.BinaryModel.from_formula classmethod BinaryModel.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

BinaryModel.fit()

statsmodels.discrete.discrete_model.BinaryModel.fit BinaryModel.fit(start_params=None, method='newton', maxiter=35, full_output=1, disp=1, callback=None, **kwargs) Fit the model using maximum likelihood. The rest of the docstring is from statsmodels.base.model.LikelihoodModel.fit Fit method for likelihood based models Parameters: start_params : array-like, optional Initial guess of the solution for the loglikelihood maximization. The default is an array of zeros. method : str, optional T

BinaryModel.fit_regularized()

statsmodels.discrete.discrete_model.BinaryModel.fit_regularized BinaryModel.fit_regularized(start_params=None, method='l1', maxiter='defined_by_method', full_output=1, disp=1, callback=None, alpha=0, trim_mode='auto', auto_trim_tol=0.01, size_trim_tol=0.0001, qc_tol=0.03, **kwargs) [source] Fit the model using a regularized maximum likelihood. The regularization method AND the solver used is determined by the argument method. Parameters: start_params : array-like, optional Initial guess of