statsmodels.gam.generalized_additive_model.LogitGam

class statsmodels.gam.generalized_additive_model.LogitGam(endog, smoother, alpha, *args, **kwargs)[source]

Generalized Additive model for discrete Logit

This subclasses discrete_model Logit.

Warning: not all inherited methods might take correctly account of the penalization

not verified yet.

Attributes
endog_names

Names of endogenous variables.

exog_names

Names of exogenous variables.

Methods

cdf(X)

The logistic cumulative distribution function

cov_params_func_l1(likelihood_model, xopt, …)

Computes cov_params on a reduced parameter space corresponding to the nonzero parameters resulting from the l1 regularized fit.

fit([method, trim])

minimize negative penalized log-likelihood

fit_regularized([start_params, method, …])

Fit the model using a regularized maximum likelihood.

from_formula(formula, data[, subset, drop_cols])

Create a Model from a formula and dataframe.

hessian(params[, pen_weight])

Hessian of model at params

hessian_numdiff(params[, pen_weight])

hessian based on finite difference derivative

information(params)

Fisher information matrix of model.

initialize()

Initialize is called by statsmodels.model.LikelihoodModel.__init__ and should contain any preprocessing that needs to be done for a model.

loglike(params[, pen_weight])

Log-likelihood of model at params

loglikeobs(params[, pen_weight])

Log-likelihood of model observations at params

pdf(X)

The logistic probability density function

predict(params[, exog, linear])

Predict response variable of a model given exogenous variables.

score(params[, pen_weight])

Gradient of model at params

score_numdiff(params[, pen_weight, method])

score based on finite difference derivative

score_obs(params[, pen_weight])

Gradient of model observations at params

Methods

cdf(X)

The logistic cumulative distribution function

cov_params_func_l1(likelihood_model, xopt, …)

Computes cov_params on a reduced parameter space corresponding to the nonzero parameters resulting from the l1 regularized fit.

fit([method, trim])

minimize negative penalized log-likelihood

fit_regularized([start_params, method, …])

Fit the model using a regularized maximum likelihood.

from_formula(formula, data[, subset, drop_cols])

Create a Model from a formula and dataframe.

hessian(params[, pen_weight])

Hessian of model at params

hessian_numdiff(params[, pen_weight])

hessian based on finite difference derivative

information(params)

Fisher information matrix of model.

initialize()

Initialize is called by statsmodels.model.LikelihoodModel.__init__ and should contain any preprocessing that needs to be done for a model.

loglike(params[, pen_weight])

Log-likelihood of model at params

loglikeobs(params[, pen_weight])

Log-likelihood of model observations at params

pdf(X)

The logistic probability density function

predict(params[, exog, linear])

Predict response variable of a model given exogenous variables.

score(params[, pen_weight])

Gradient of model at params

score_numdiff(params[, pen_weight, method])

score based on finite difference derivative

score_obs(params[, pen_weight])

Gradient of model observations at params

Properties

endog_names

Names of endogenous variables.

exog_names

Names of exogenous variables.