Binomial.predict()

statsmodels.genmod.families.family.Binomial.predict Binomial.predict(mu) Linear predictors based on given mu values. Parameters: mu : array The mean response variables Returns: lin_pred : array Linear predictors based on the mean response variables. The value of the link function at the given mu.

Binomial.loglike()

statsmodels.genmod.families.family.Binomial.loglike Binomial.loglike(endog, mu, scale=1.0) [source] Loglikelihood function for Binomial exponential family distribution. Parameters: endog : array-like Endogenous response variable mu : array-like Fitted mean response variable scale : float, optional The default is 1. Returns: llf : float The value of the loglikelihood function evaluated at (endog,mu,scale) as defined below. Notes If endog is binary: llf = scale*sum(endog*log(mu/(1-

Binomial.initialize()

statsmodels.genmod.families.family.Binomial.initialize Binomial.initialize(endog) [source] Initialize the response variable. Parameters: endog : array Endogenous response variable Returns: If `endog` is binary, returns `endog` : If `endog` is a 2d array, then the input is assumed to be in the format : (successes, failures) and : successes/(success + failures) is returned. And n is set to : successes + failures. :

Binomial.fitted()

statsmodels.genmod.families.family.Binomial.fitted Binomial.fitted(lin_pred) Fitted values based on linear predictors lin_pred. Parameters: lin_pred : array Values of the linear predictor of the model. dot(X,beta) in a classical linear model. Returns: mu : array The mean response variables given by the inverse of the link function.

Binomial.deviance()

statsmodels.genmod.families.family.Binomial.deviance Binomial.deviance(endog, mu, scale=1.0) [source] Deviance function for either Bernoulli or Binomial data. Parameters: endog : array-like Endogenous response variable (already transformed to a probability if appropriate). mu : array Fitted mean response variable scale : float, optional An optional scale argument Returns: deviance : float The deviance function as defined below Notes If the endogenous variable is binary: deviance

BinaryResults.wald_test()

statsmodels.discrete.discrete_model.BinaryResults.wald_test BinaryResults.wald_test(r_matrix, cov_p=None, scale=1.0, invcov=None, use_f=None) Compute a Wald-test for a joint linear hypothesis. Parameters: r_matrix : array-like, str, or tuple array : An r x k array where r is the number of restrictions to test and k is the number of regressors. It is assumed that the linear combination is equal to zero. str : The full hypotheses to test can be given as a string. See the examples. tuple : A

BinaryResults.t_test()

statsmodels.discrete.discrete_model.BinaryResults.t_test BinaryResults.t_test(r_matrix, cov_p=None, scale=None, use_t=None) Compute a t-test for a each linear hypothesis of the form Rb = q Parameters: r_matrix : array-like, str, tuple array : If an array is given, a p x k 2d array or length k 1d array specifying the linear restrictions. It is assumed that the linear combination is equal to zero. str : The full hypotheses to test can be given as a string. See the examples. tuple : A tuple o

BinaryResults.summary2()

statsmodels.discrete.discrete_model.BinaryResults.summary2 BinaryResults.summary2(yname=None, xname=None, title=None, alpha=0.05, float_format='%.4f') Experimental function to summarize regression results Parameters: xname : List of strings of length equal to the number of parameters Names of the independent variables (optional) yname : string Name of the dependent variable (optional) title : string, optional Title for the top table. If not None, then this replaces the default title a

BinaryResults.summary()

statsmodels.discrete.discrete_model.BinaryResults.summary BinaryResults.summary(yname=None, xname=None, title=None, alpha=0.05, yname_list=None) [source] Summarize the Regression Results Parameters: yname : string, optional Default is y xname : list of strings, optional Default is var_## for ## in p the number of regressors title : string, optional Title for the top table. If not None, then this replaces the default title alpha : float significance level for the confidence intervals

BinaryResults.save()

statsmodels.discrete.discrete_model.BinaryResults.save BinaryResults.save(fname, remove_data=False) save a pickle of this instance Parameters: fname : string or filehandle fname can be a string to a file path or filename, or a filehandle. remove_data : bool If False (default), then the instance is pickled without changes. If True, then all arrays with length nobs are set to None before pickling. See the remove_data method. In some cases not all arrays will be set to None. Notes If remo