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.

family
link

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_constrained(constraints[, start_params])

fit_constraint that returns a results instance

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.

get_distribution(params[, exog, offset])

Get frozen instance of distribution based on predicted parameters.

hessian(params[, pen_weight])

Hessian of model at params

hessian_factor(params)

Logit model Hessian factor

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, which, linear, offset])

Predict response variable of a model given exogenous variables.

score(params[, pen_weight])

Gradient of model at params

score_factor(params)

Logit model derivative of the log-likelihood with respect to linpred.

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.

family

link


Last update: Oct 03, 2024