def f_threshold_mway_rm(n_subjects, factor_levels, effects='A*B', pvalue=0.05):
 from scipy.stats import f
 (effect_picks, _) = _map_effects(len(factor_levels), effects)
 f_threshold = []
 for (_, df1, df2) in _iter_contrasts(n_subjects, factor_levels, effect_picks):
  f_threshold.append(f(df1, df2).isf(pvalue))
 return (f_threshold if (len(f_threshold) > 1) else f_threshold[0])

def f_threshold_mway_rm ( n_subjects , factor_levels , effects = 'A*B' , pvalue = 0.05 ) : from scipy . stats import f ( effect_picks , _ ) = _map_effects ( len ( factor_levels ) , effects ) f_threshold = [ ] for ( _ , df1 , df2 ) in _iter_contrasts ( n_subjects , factor_levels , effect_picks ) : f_threshold . append ( f ( df1 , df2 ) . isf ( pvalue ) ) return ( f_threshold if ( len ( f_threshold ) > 1 ) else f_threshold [ 0 ] )
compute f-value thesholds for a two-way anova .