Import Paths and Structure

Import Paths and Structure We offer two ways of importing functions and classes from statsmodels: API import for interactive useAllows tab completion Direct import for programsAvoids importing unnecessary modules and commands API Import for interactive use For interactive use the recommended import is: import statsmodels.api as sm Importing statsmodels.api will load most of the public parts of statsmodels. This makes most functions and classes conveniently available within one or two lev

identity.inverse()

statsmodels.genmod.families.links.identity.inverse identity.inverse(z) 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)

identity.deriv2()

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

identity.inverse_deriv()

statsmodels.genmod.families.links.identity.inverse_deriv identity.inverse_deriv(z) 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 :

identity.deriv()

statsmodels.genmod.families.links.identity.deriv identity.deriv(p) Derivative of the power transform Parameters: p : array-like Mean parameters Returns: g?(p) : array Derivative of power transform of p Notes g?(p) = power * p`**(`power - 1)

HuberT.weights()

statsmodels.robust.norms.HuberT.weights HuberT.weights(z) [source] Huber?s t weighting function for the IRLS algorithm The psi function scaled by z Parameters: z : array-like 1d array Returns: weights : array weights(z) = 1 for |z| <= t weights(z) = t/|z| for |z| > t

HuberT.psi_deriv()

statsmodels.robust.norms.HuberT.psi_deriv HuberT.psi_deriv(z) [source] The derivative of Huber?s t psi function Notes Used to estimate the robust covariance matrix.

HuberT.rho()

statsmodels.robust.norms.HuberT.rho HuberT.rho(z) [source] The robust criterion function for Huber?s t. Parameters: z : array-like 1d array Returns: rho : array rho(z) = .5*z**2 for |z| <= t rho(z) = |z|*t - .5*t**2 for |z| > t

HuberT.psi()

statsmodels.robust.norms.HuberT.psi HuberT.psi(z) [source] The psi function for Huber?s t estimator The analytic derivative of rho Parameters: z : array-like 1d array Returns: psi : array psi(z) = z for |z| <= t psi(z) = sign(z)*t for |z| > t

HetGoldfeldQuandt.run()

statsmodels.stats.diagnostic.HetGoldfeldQuandt.run HetGoldfeldQuandt.run(y, x, idx=None, split=None, drop=None, alternative='increasing', attach=True) see class docstring