3.11.22. statsmodels.stats.weightstats¶
Ttests and descriptive statistics with weights
Created on 2010-09-18
Author: josef-pktd License: BSD (3-clause)
3.11.22.1. References¶
SPSS manual SAS manual
This follows in large parts the SPSS manual, which is largely the same as the SAS manual with different, simpler notation.
Freq, Weight in SAS seems redundant since they always show up as product, SPSS has only weights.
3.11.22.2. Notes¶
This has potential problems with ddof, I started to follow numpy with ddof=0 by default and users can change it, but this might still mess up the t-tests, since the estimates for the standard deviation will be based on the ddof that the user chooses. - fixed ddof for the meandiff ttest, now matches scipy.stats.ttest_ind
Note: scipy has now a separate, pooled variance option in ttest, but I haven’t compared yet.
3.11.22.3. Functions¶
ttest_ind (x1, x2[, alternative, usevar, ...]) |
ttest independent sample |
ttost_ind (x1, x2, low, upp[, usevar, ...]) |
test of (non-)equivalence for two independent samples |
ttost_paired (x1, x2, low, upp[, transform, ...]) |
test of (non-)equivalence for two dependent, paired sample |
zconfint (x1[, x2, value, alpha, ...]) |
confidence interval based on normal distribution z-test |
ztest (x1[, x2, value, alternative, usevar, ddof]) |
test for mean based on normal distribution, one or two samples |
ztost (x1, low, upp[, x2, usevar, ddof]) |
Equivalence test based on normal distribution |
3.11.22.4. Classes¶
CompareMeans (d1, d2) |
class for two sample comparison |
DescrStatsW (data[, weights, ddof]) |
descriptive statistics and tests with weights for case weights |
OneTimeProperty (func) |
A descriptor to make special properties that become normal attributes. |