Skip to content

Instantly share code, notes, and snippets.

@hrishioa
Created March 20, 2018 20:28
Show Gist options
  • Save hrishioa/c56d5b17c3cabde2bc247392f7caaf4a to your computer and use it in GitHub Desktop.
Save hrishioa/c56d5b17c3cabde2bc247392f7caaf4a to your computer and use it in GitHub Desktop.
formula = 'time ~ C(alerttone) + C(blind) + C(alerttone):C(blind)'
model = ols(formula, alltimingdfs).fit()
aov_table = statsmodels.stats.anova.anova_lm(model, typ=2)
print(aov_table)
sum_sq df F PR(>F)
C(alerttone) 2.705937e+08 1.0 2.113892 1.462746e-01
C(blind) 4.655261e+10 1.0 363.671469 1.340934e-69
C(alerttone):C(blind) 2.129870e+08 1.0 1.663866 1.973740e-01
Residual 1.308235e+11 1022.0 NaN NaN
data
formula = 'error ~ C(AlertTone) + C(Blind) + C(AlertTone):C(Blind)'
model = ols(formula, alldatadfs).fit()
aov_table = statsmodels.stats.anova.anova_lm(model, typ=2)
print(aov_table)
sum_sq df F PR(>F)
C(AlertTone) 0.002026 1.0 0.472130 4.921597e-01
C(Blind) 0.297824 1.0 69.403544 2.465048e-16
C(AlertTone):C(Blind) 0.000190 1.0 0.044347 8.332495e-01
Residual 4.540085 1058.0 NaN NaN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment