DescrStatsW.get_compare()

statsmodels.stats.weightstats.DescrStatsW.get_compare DescrStatsW.get_compare(other, weights=None) [source] return an instance of CompareMeans with self and other Parameters: other : array_like or instance of DescrStatsW If array_like then this creates an instance of DescrStatsW with the given weights. weights : None or array weights are only used if other is not an instance of DescrStatsW Returns: cm : instance of CompareMeans the instance has self attached as d1 and other as d2.

DescrStatsW.asrepeats()

statsmodels.stats.weightstats.DescrStatsW.asrepeats DescrStatsW.asrepeats() [source] get array that has repeats given by floor(weights) observations with weight=0 are dropped

Dates in timeseries models

Dates in timeseries models Link to Notebook GitHub In [1]: from __future__ import print_function import statsmodels.api as sm import numpy as np import pandas as pd Getting started In [2]: data = sm.datasets.sunspots.load() Right now an annual date series must be datetimes at the end of the year. In [3]: from datetime import datetime dates = sm.tsa.datetools.dates_from_range('1700', length=len(data.endog)) Using Pandas Make a pandas TimeSeries

CovStruct.update()

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

CovStruct.summary()

statsmodels.genmod.cov_struct.CovStruct.summary CovStruct.summary() [source] Returns a text summary of the current estimate of the dependence structure.

CovStruct.initialize()

statsmodels.genmod.cov_struct.CovStruct.initialize CovStruct.initialize(model) [source] 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.

CovStruct.covariance_matrix_solve()

statsmodels.genmod.cov_struct.CovStruct.covariance_matrix_solve CovStruct.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 observatio

CovStruct.covariance_matrix()

statsmodels.genmod.cov_struct.CovStruct.covariance_matrix CovStruct.covariance_matrix(endog_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

CountResults.wald_test()

statsmodels.discrete.discrete_model.CountResults.wald_test CountResults.wald_test(r_matrix, cov_p=None, scale=1.0, invcov=None, use_f=None) Compute a Wald-test for a joint linear hypothesis. Parameters: r_matrix : array-like, str, or tuple array : An r x k array where r is the number of restrictions to test and k is the number of regressors. It is assumed that the linear combination is equal to zero. str : The full hypotheses to test can be given as a string. See the examples. tuple : A tu

CountResults.t_test()

statsmodels.discrete.discrete_model.CountResults.t_test CountResults.t_test(r_matrix, cov_p=None, scale=None, use_t=None) Compute a t-test for a each linear hypothesis of the form Rb = q Parameters: r_matrix : array-like, str, tuple array : If an array is given, a p x k 2d array or length k 1d array specifying the linear restrictions. It is assumed that the linear combination is equal to zero. str : The full hypotheses to test can be given as a string. See the examples. tuple : A tuple of