Probit.fit_regularized()

statsmodels.discrete.discrete_model.Probit.fit_regularized Probit.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) 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 the solution for t

Probit.fit()

statsmodels.discrete.discrete_model.Probit.fit Probit.fit(start_params=None, method='newton', maxiter=35, full_output=1, disp=1, callback=None, **kwargs) [source] 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 Th

probit.deriv2()

statsmodels.genmod.families.links.probit.deriv2 probit.deriv2(p) Second derivative of the link function g??(p) implemented through numerical differentiation

probit.deriv()

statsmodels.genmod.families.links.probit.deriv probit.deriv(p) Derivative of CDF link Parameters: p : array-like mean parameters Returns: g?(p) : array The derivative of CDF transform at p Notes g?(p) = 1./ dbn.pdf(dbn.ppf(p))

Probit.cov_params_func_l1()

statsmodels.discrete.discrete_model.Probit.cov_params_func_l1 Probit.cov_params_func_l1(likelihood_model, xopt, retvals) Computes cov_params on a reduced parameter space corresponding to the nonzero parameters resulting from the l1 regularized fit. Returns a full cov_params matrix, with entries corresponding to zero?d values set to np.nan.

Probit.cdf()

statsmodels.discrete.discrete_model.Probit.cdf Probit.cdf(X) [source] Probit (Normal) cumulative distribution function Parameters: X : array-like The linear predictor of the model (XB). Returns: cdf : ndarray The cdf evaluated at X. Notes This function is just an alias for scipy.stats.norm.cdf

Prediction (out of sample)

Prediction (out of sample) Link to Notebook GitHub In [1]: from __future__ import print_function import numpy as np import statsmodels.api as sm Artificial data In [2]: nsample = 50 sig = 0.25 x1 = np.linspace(0, 20, nsample) X = np.column_stack((x1, np.sin(x1), (x1-5)**2)) X = sm.add_constant(X) beta = [5., 0.5, 0.5, -0.02] y_true = np.dot(X, beta) y = y_true + sig * np.random.normal(size=nsample) Estimation In [3]: olsmod = sm.OLS(y, X) olsres = olsmo

Power.inverse_deriv()

statsmodels.genmod.families.links.Power.inverse_deriv Power.inverse_deriv(z) [source] Derivative of the inverse of the power transform Parameters: z : array-like z is usually the linear predictor for a GLM or GEE model. Returns: The value of the derivative of the inverse of the power transform : function :

Power.inverse()

statsmodels.genmod.families.links.Power.inverse Power.inverse(z) [source] Inverse of the power transform link function Parameters: `z` : array-like Value of the transformed mean parameters at p Returns: `p` : array Mean parameters Notes g^(-1)(z`) = z`**(1/`power)

Power.deriv2()

statsmodels.genmod.families.links.Power.deriv2 Power.deriv2(p) Second derivative of the link function g??(p) implemented through numerical differentiation