@@ -17,8 +17,8 @@ class bootstrap:
1717 the two groups (x2-x1) is computed.
1818 NaNs are automatically discarded.
1919
20- paired: boolean , default False
21- Whether or not x1 and x2 are paired samples .
20+ repeated_measures: string , default None
21+ The type of the experiment design .
2222
2323 statfunction: callable, default np.mean
2424 The summary statistic called on data.
@@ -47,8 +47,8 @@ class bootstrap:
4747 Whether or not the summary is the difference between two groups.
4848 If False, only x1 was supplied.
4949
50- is_paired: boolean
51- Whether or not the difference reported is between 2 paired groups .
50+ repeated_measures: string
51+ The type of experiment design .
5252
5353 statistic: callable
5454 The function used to compute the summary.
@@ -85,19 +85,19 @@ class bootstrap:
8585
8686 pvalue_2samp_ind_ttest: float
8787 P-value obtained from scipy.stats.ttest_ind.
88- If a single array was given (x1 only), or if `paired ` is True ,
88+ If a single array was given (x1 only), or if `repeated_measures ` is not None ,
8989 returns 'NIL'.
9090 See https://docs.scipy.org/doc/scipy-1.0.0/reference/generated/scipy.stats.ttest_ind.html
9191
9292 pvalue_2samp_related_ttest: float
9393 P-value obtained from scipy.stats.ttest_rel.
94- If a single array was given (x1 only), or if `paired ` is False ,
94+ If a single array was given (x1 only), or if `repeated_measures ` is None ,
9595 returns 'NIL'.
9696 See https://docs.scipy.org/doc/scipy-1.0.0/reference/generated/scipy.stats.ttest_rel.html
9797
9898 pvalue_wilcoxon: float
9999 P-value obtained from scipy.stats.wilcoxon.
100- If a single array was given (x1 only), or if `paired ` is False ,
100+ If a single array was given (x1 only), or if `repeated_measures ` is None ,
101101 returns 'NIL'.
102102 The Wilcoxons signed-rank test is a nonparametric paired test of
103103 the null hypothesis that the related samples x1 and x2 are from
@@ -113,7 +113,7 @@ class bootstrap:
113113
114114 '''
115115 def __init__ (self , x1 , x2 = None ,
116- paired = False ,
116+ repeated_measures = None ,
117117 statfunction = None ,
118118 smoothboot = False ,
119119 alpha_level = 0.05 ,
@@ -146,7 +146,7 @@ def __init__(self, x1, x2=None,
146146 'n_boot' : reps ,
147147 'smooth' : smoothboot }
148148
149- if paired :
149+ if repeated_measures :
150150 # check x2 is not None:
151151 if x2 is None :
152152 raise ValueError ('Please specify x2.' )
@@ -155,17 +155,17 @@ def __init__(self, x1, x2=None,
155155 if len (x1 ) != len (x2 ):
156156 raise ValueError ('x1 and x2 are not the same length.' )
157157
158- if (x2 is None ) or (paired is True ) :
158+ if (x2 is None ) or (repeated_measures ) :
159159
160160 if x2 is None :
161161 tx = x1
162- paired = False
162+ repeated_measures = None
163163 ttest_single = ttest_1samp (x1 , 0 )[1 ]
164164 ttest_2_ind = 'NIL'
165165 ttest_2_paired = 'NIL'
166166 wilcoxonresult = 'NIL'
167167
168- elif paired is True :
168+ elif repeated_measures :
169169 diff = True
170170 tx = x2 - x1
171171 ttest_single = 'NIL'
@@ -188,7 +188,7 @@ def __init__(self, x1, x2=None,
188188 pct_low_high = np .nan_to_num (pct_low_high ).astype ('int' )
189189
190190
191- elif x2 is not None and paired is False :
191+ elif x2 is not None and repeated_measures is None :
192192 diff = True
193193 x2 = pd .Series (x2 ).dropna ()
194194 # Generate statarrays for both arrays.
@@ -228,7 +228,7 @@ def __init__(self, x1, x2=None,
228228 " results may be unstable." )
229229
230230 self .summary = summ_stat
231- self .is_paired = paired
231+ self .repeated_measures = repeated_measures
232232 self .is_difference = diff
233233 self .statistic = str (statfunction )
234234 self .n_reps = reps
@@ -252,7 +252,7 @@ def __init__(self, x1, x2=None,
252252
253253 self .results = {'stat_summary' : self .summary ,
254254 'is_difference' : diff ,
255- 'is_paired ' : paired ,
255+ 'repeated_measures ' : repeated_measures ,
256256 'bca_ci_low' : self .bca_ci_low ,
257257 'bca_ci_high' : self .bca_ci_high ,
258258 'ci' : self .ci
@@ -270,7 +270,7 @@ def __repr__(self):
270270
271271 diff_types = {True : 'paired' , False : 'unpaired' }
272272 if self .is_difference :
273- a = 'The {} {} difference is {}.' .format (diff_types [self .is_paired ],
273+ a = 'The {} {} difference is {}.' .format (diff_types [self .repeated_measures is not None ],
274274 stat , self .summary )
275275 else :
276276 a = 'The {} is {}.' .format (stat , self .summary )
0 commit comments