File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change 1414
1515
1616def  check_increasing (x , y ):
17-     """Determine whether the relationship between x and y appears to be 
18-     increasing or decreasing based on Spearman correlation. 
17+     """Determine whether y is monotonically correlated with x. 
18+ 
19+     y is found increasing or decreasing with respect to x based on a Spearman 
20+     correlation test. 
1921
2022    Parameters 
2123    ---------- 
@@ -32,10 +34,8 @@ def check_increasing(x, y):
3234
3335    Notes 
3436    ----- 
35-     Determine whether the relationship between x and y appears to be 
36-     increasing or decreasing.  The Spearman correlation coefficient is 
37-     estimated from the data, and the sign of the resulting estimate 
38-     is used as the result. 
37+     The Spearman correlation coefficient is estimated from the data, and the 
38+     sign of the resulting estimate is used as the result. 
3939
4040    In the event that the 95% confidence interval based on Fisher transform 
4141    spans zero, a warning is raised. 
@@ -48,10 +48,7 @@ def check_increasing(x, y):
4848
4949    # Calculate Spearman rho estimate and set return accordingly. 
5050    rho , _  =  spearmanr (x , y )
51-     if  rho  >=  0 :
52-         increasing_bool  =  True 
53-     else :
54-         increasing_bool  =  False 
51+     increasing_bool  =  rho  >=  0 
5552
5653    # Run Fisher transform to get the rho CI, but handle rho=+/-1 
5754    if  rho  not  in - 1.0 , 1.0 ]:
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments