InverseGaussian.fitted()

statsmodels.genmod.families.family.InverseGaussian.fitted InverseGaussian.fitted(lin_pred) Fitted values based on linear predictors lin_pred. Parameters: lin_pred : array Values of the linear predictor of the model. dot(X,beta) in a classical linear model. Returns: mu : array The mean response variables given by the inverse of the link function.

InverseGaussian.deviance()

statsmodels.genmod.families.family.InverseGaussian.deviance InverseGaussian.deviance(endog, mu, scale=1.0) [source] Inverse Gaussian deviance function Parameters: endog : array-like Endogenous response variable mu : array-like Fitted mean response variable scale : float, optional An optional scale argument Returns: deviance : float Deviance function as defined below Notes deviance = sum((endog=mu)**2/(endog*mu**2))

Interactions and ANOVA

Interactions and ANOVA Link to Notebook GitHub Note: This script is based heavily on Jonathan Taylor's class notes http://www.stanford.edu/class/stats191/interactions.html Download and format data: In [1]: from __future__ import print_function from statsmodels.compat import urlopen import numpy as np np.set_printoptions(precision=4, suppress=True) import statsmodels.api as sm import pandas as pd pd.set_option("display.width", 100) import matplotlib.pyplot as plt from statsmodels.fo

Installation

Installation Using setuptools To obtain the latest released version of statsmodels using setuptools: easy_install -U statsmodels Or follow this link to our PyPI page. Obtaining the Source We do not release very often but the master branch of our source code is usually fine for everyday use. You can get the latest source from our github repository. Or if you have git installed: git clone git://github.com/statsmodels/statsmodels.git If you want to keep up to date with the source on github ju

Input-Output iolib

Input-Output iolib statsmodels offers some functions for input and output. These include a reader for STATA files, a class for generating tables for printing in several formats and two helper functions for pickling. Users can also leverage the powerful input/output functions provided by pandas.io. Among other things, pandas (a statsmodels dependency) allows reading and writing to Excel, CSV, and HDF5 (PyTables). Examples SimpleTable: Basic example Module Reference foreign.StataReader(f

Independence.update()

statsmodels.genmod.cov_struct.Independence.update Independence.update(params) [source] Updates the association parameter values based on the current regression coefficients. Parameters: params : array-like Working values for the regression parameters.

Independence.summary()

statsmodels.genmod.cov_struct.Independence.summary Independence.summary() [source]

Independence.initialize()

statsmodels.genmod.cov_struct.Independence.initialize Independence.initialize(model) Called by GEE, used by implementations that need additional setup prior to running fit. Parameters: model : GEE class A reference to the parent GEE class instance.

Independence.covariance_matrix_solve()

statsmodels.genmod.cov_struct.Independence.covariance_matrix_solve Independence.covariance_matrix_solve(expval, index, stdev, rhs) [source] Solves matrix equations of the form covmat * soln = rhs and returns the values of soln, where covmat is the covariance matrix represented by this class. Parameters: expval: array-like : The expected value of endog for each observed value in the group. index: integer : The group index. stdev : array-like The standard deviation of endog for each obse

Independence.covariance_matrix()

statsmodels.genmod.cov_struct.Independence.covariance_matrix Independence.covariance_matrix(expval, index) [source] Returns the working covariance or correlation matrix for a given cluster of data. Parameters: endog_expval: array-like : The expected values of endog for the cluster for which the covariance or correlation matrix will be returned index: integer : The index of the cluster for which the covariane or correlation matrix will be returned Returns: M: matrix : The covariance o