statsmodels.stats.robust_compare.TrimmedMean¶
- class statsmodels.stats.robust_compare.TrimmedMean(data, fraction, is_sorted=False, axis=0)[source]¶
class for trimmed and winsorized one sample statistics
axis is None, i.e. ravelling, is not supported
- Parameters:¶
- dataarray_like
The data, observations to analyze.
- fraction
floatin(0, 0.5) The fraction of observations to trim at each tail. The number of observations trimmed at each tail is
int(fraction * nobs)- is_sortedbool
Indicator if data is already sorted. By default the data is sorted along
axis.- axis
int The axis of reduce operations. By default axis=0, that is observations are along the zero dimension, i.e. rows if 2-dim.
- Attributes:¶
data_trimmednumpy array of trimmed and sorted data
data_winsorizedwinsorized data
mean_trimmedmean of trimmed data
mean_winsorizedmean of winsorized data
std_mean_trimmedstandard error of trimmed mean
std_mean_winsorizedstandard error of winsorized mean
var_winsorizedvariance of winsorized data
Methods
reset_fraction(frac)create a TrimmedMean instance with a new trimming fraction
ttest_mean([value, transform, alternative])One sample t-test for trimmed or Winsorized mean
Properties
numpy array of trimmed and sorted data
winsorized data
mean of trimmed data
mean of winsorized data
standard error of trimmed mean
standard error of winsorized mean
variance of winsorized data