In [58]:
%matplotlib inline
import pandas as pd
import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
import seaborn as sns
In [73]:
slide5 = pd.read_csv('/Users/alex/Projects/AtheyLab/Visualize/BoxAndWhisker/data/Wiley_Slide5_c0_114.csv')
slide6_1 = pd.read_csv('/Users/alex/Projects/AtheyLab/Visualize/BoxAndWhisker/data/Wiley_Slide6_1_c0_114.csv')
slide6_2 = pd.read_csv('/Users/alex/Projects/AtheyLab/Visualize/BoxAndWhisker/data/Wiley_Slide6_2_c0_114.csv')
slide7 = pd.read_csv('/Users/alex/Projects/AtheyLab/Visualize/BoxAndWhisker/data/Wiley_Slide7_c0_114.csv')
slide8 = pd.read_csv('/Users/alex/Projects/AtheyLab/Visualize/BoxAndWhisker/data/Wiley_Slide8_c0_114.csv')
#names = ['Acute Vehicle', 'Acute Cortisol', 'Chronic Vehicle', 'Chronic Cortisol']
names = ['AV', 'AC', 'CV', 'CC']
In [74]:
slide5 = slide5.drop('Case', axis = 1)
slide5.describe()
Out[74]:
In [75]:
print('Slide 6_1: ' + str(slide6_1.shape))
print('Slide 6_2: ' + str(slide6_2.shape))
slide6 = slide6_1.append(slide6_2)
slide6 = slide6.drop('Case', axis = 1)
slide6.describe()
Out[75]:
In [76]:
slide7 = slide7.drop('Case', axis = 1)
slide7.describe()
Out[76]:
In [77]:
slide8 = slide8.drop('Case', axis = 1)
slide8.describe()
Out[77]:
In [78]:
volumes = [slide5['Volume'], slide6['Volume'], slide7['Volume'], slide8['Volume']]
sns.boxplot(volumes, color = "pastel", names = names, label = 'Volume');
In [79]:
for vol in volumes:
vol = vol[~((vol - vol.mean()).abs() > 3 * vol.std())]
print(vol.shape)
sns.boxplot(volumes, color="pastel", names = names, label = 'Volume');
Comparing Chronic conditions: Vehicle vs Cortisol
In [94]:
cols = slide5.columns.values
cutoff = 0.05
for col in cols:
pVal = stats.mannwhitneyu(slide7[col], slide8[col], use_continuity = True)[1]
if pVal < cutoff:
print('p-value for ' + col + ': ' + str(pVal))
Comparing Acute conditions: Vehicle vs Cortisol
In [95]:
for col in cols:
pVal = stats.mannwhitneyu(slide5[col], slide6[col], use_continuity = True)[1]
if pVal < cutoff:
print('p-value for ' + col + ': ' + str(pVal))
Comparing Vehicle conditions: Acute vs Chronic
In [96]:
for col in cols:
pVal = stats.mannwhitneyu(slide5[col], slide7[col], use_continuity = True)[1]
if pVal < cutoff:
print('p-value for ' + col + ': ' + str(pVal))
Comparing Cortisol conditions: Acute vs Chronic
In [98]:
for col in cols:
pVal = stats.mannwhitneyu(slide6[col], slide8[col], use_continuity = True)[1]
if pVal < cutoff:
print('p-value for ' + col + ': ' + str(pVal))
In [ ]: