Frequently Asked Question

Frequently Asked Question What do endog and exog mean? These are shorthand for endogenous and exogenous variables. You might be more comfortable with the common y and X notation in linear models. Sometimes the endogenous variable y is called a dependent variable. Likewise, sometimes the exogenous variables X are called the independent variables. You can read about this in greater detail at endog, exog, what?s that? How does statsmodels handle missing data? Missing data can be handled via the

Formulas: Fitting models using R-style formulas

Formulas: Fitting models using R-style formulas Link to Notebook GitHub Since version 0.5.0, statsmodels allows users to fit statistical models using R-style formulas. Internally, statsmodels uses the patsy package to convert formulas and data to the matrices that are used in model fitting. The formula framework is quite powerful; this tutorial only scratches the surface. A full description of the formula language can be found in the patsy docs: Patsy formula language description Loading m

Fitting models using R-style formulas

Fitting models using R-style formulas Since version 0.5.0, statsmodels allows users to fit statistical models using R-style formulas. Internally, statsmodels uses the patsy package to convert formulas and data to the matrices that are used in model fitting. The formula framework is quite powerful; this tutorial only scratches the surface. A full description of the formula language can be found in the patsy docs: Patsy formula language description Loading modules and functions import statsmode

FEVD.summary()

statsmodels.tsa.vector_ar.var_model.FEVD.summary FEVD.summary() [source]

FEVD.plot()

statsmodels.tsa.vector_ar.var_model.FEVD.plot FEVD.plot(periods=None, figsize=(10, 10), **plot_kwds) [source] Plot graphical display of FEVD Parameters: periods : int, default None Defaults to number originally specified. Can be at most that number

FEVD.cov()

statsmodels.tsa.vector_ar.var_model.FEVD.cov FEVD.cov() [source] Compute asymptotic standard errors

Family.weights()

statsmodels.genmod.families.family.Family.weights Family.weights(mu) [source] Weights for IRLS steps Parameters: mu : array-like The transformed mean response variable in the exponential family Returns: w : array The weights for the IRLS steps Notes w = 1 / (link?(mu)**2 * variance(mu))

Family.starting_mu()

statsmodels.genmod.families.family.Family.starting_mu Family.starting_mu(y) [source] Starting value for mu in the IRLS algorithm. Parameters: y : array The untransformed response variable. Returns: mu_0 : array The first guess on the transformed response variable. Notes Only the Binomial family takes a different initial value.

Family.resid_dev()

statsmodels.genmod.families.family.Family.resid_dev Family.resid_dev(endog, mu, scale=1.0) [source] The deviance residuals Parameters: endog : array The endogenous response variable mu : array The inverse of the link function at the linear predicted values. scale : float, optional An optional argument to divide the residuals by scale Returns: Deviance residuals. : Notes The deviance residuals are defined for each family.

Family.resid_anscombe()

statsmodels.genmod.families.family.Family.resid_anscombe Family.resid_anscombe(endog, mu) [source] The Anscome residuals. See also statsmodels.families.family.Family, for