stats.sandwich_covariance.cov_hac()

statsmodels.stats.sandwich_covariance.cov_hac statsmodels.stats.sandwich_covariance.cov_hac(results, nlags=None, weights_func=, use_correction=True) heteroscedasticity and autocorrelation robust covariance matrix (Newey-West) Assumes we have a single time series with zero axis consecutive, equal spaced time periods Parameters: results : result instance result of a regression, uses results.model.exog and results.resid TODO: this should use wexog instead nlags : int or None highest lag to

stats.sandwich_covariance.cov_cluster_2groups()

statsmodels.stats.sandwich_covariance.cov_cluster_2groups statsmodels.stats.sandwich_covariance.cov_cluster_2groups(results, group, group2=None, use_correction=True) [source] cluster robust covariance matrix for two groups/clusters Parameters: results : result instance result of a regression, uses results.model.exog and results.resid TODO: this should use wexog instead use_correction : bool If true (default), then the small sample correction factor is used. Returns: cov_both : ndarray

stats.sandwich_covariance.cov_cluster()

statsmodels.stats.sandwich_covariance.cov_cluster statsmodels.stats.sandwich_covariance.cov_cluster(results, group, use_correction=True) [source] cluster robust covariance matrix Calculates sandwich covariance matrix for a single cluster, i.e. grouped variables. Parameters: results : result instance result of a regression, uses results.model.exog and results.resid TODO: this should use wexog instead use_correction : bool If true (default), then the small sample correction factor is used.

stats.proportion.samplesize_confint_proportion()

statsmodels.stats.proportion.samplesize_confint_proportion statsmodels.stats.proportion.samplesize_confint_proportion(proportion, half_length, alpha=0.05, method='normal') [source] find sample size to get desired confidence interval length Parameters: proportion : float in (0, 1) proportion or quantile half_length : float in (0, 1) desired half length of the confidence interval alpha : float in (0, 1) significance level, default 0.05, coverage of the two-sided interval is (approximatel

stats.proportion.proportion_effectsize()

statsmodels.stats.proportion.proportion_effectsize statsmodels.stats.proportion.proportion_effectsize(prop1, prop2, method='normal') [source] effect size for a test comparing two proportions for use in power function Parameters: prop1, prop2: float or array_like : Returns: es : float or ndarray effect size for (transformed) prop1 - prop2 Notes only method=?normal? is implemented to match pwr.p2.test see http://www.statmethods.net/stats/power.html Effect size for normal is defined as 2

stats.proportion.proportion_confint()

statsmodels.stats.proportion.proportion_confint statsmodels.stats.proportion.proportion_confint(count, nobs, alpha=0.05, method='normal') [source] confidence interval for a binomial proportion Parameters: count : int or array number of successes nobs : int total number of trials alpha : float in (0, 1) significance level, default 0.05 method : string in [?normal?] method to use for confidence interval, currently available methods : normal : asymptotic normal approximation agresti_

stats.proportion.proportions_ztost()

statsmodels.stats.proportion.proportions_ztost statsmodels.stats.proportion.proportions_ztost(count, nobs, low, upp, prop_var='sample') [source] Equivalence test based on normal distribution Parameters: count : integer or array_like the number of successes in nobs trials. If this is array_like, then the assumption is that this represents the number of successes for each independent sample nobs : integer the number of trials or observations, with the same length as count. low, upp : floa

stats.proportion.proportions_ztest()

statsmodels.stats.proportion.proportions_ztest statsmodels.stats.proportion.proportions_ztest(count, nobs, value=None, alternative='two-sided', prop_var=False) [source] test for proportions based on normal (z) test Parameters: count : integer or array_like the number of successes in nobs trials. If this is array_like, then the assumption is that this represents the number of successes for each independent sample nobs : integer the number of trials or observations, with the same length as

stats.proportion.proportions_chisquare_pairscontrol()

statsmodels.stats.proportion.proportions_chisquare_pairscontrol statsmodels.stats.proportion.proportions_chisquare_pairscontrol(count, nobs, value=None, multitest_method='hs', alternative='two-sided') [source] chisquare test of proportions for pairs of k samples compared to control Performs a chisquare test for proportions for pairwise comparisons with a control (Dunnet?s test). The control is assumed to be the first element of count and nobs. The alternative is two-sided, larger or smaller.

stats.proportion.proportions_chisquare_allpairs()

statsmodels.stats.proportion.proportions_chisquare_allpairs statsmodels.stats.proportion.proportions_chisquare_allpairs(count, nobs, multitest_method='hs') [source] chisquare test of proportions for all pairs of k samples Performs a chisquare test for proportions for all pairwise comparisons. The alternative is two-sided Parameters: count : integer or array_like the number of successes in nobs trials. nobs : integer the number of trials or observations. prop : float, optional The proba