Created
November 24, 2018 20:23
-
-
Save erykml/d208e78319d92993a3af0a5a1144c5fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# power vs. number of observations | |
fig = plt.figure() | |
ax = fig.add_subplot(2,1,1) | |
fig = TTestIndPower().plot_power(dep_var='nobs', | |
nobs= np.arange(2, 200), | |
effect_size=np.array([0.2, 0.5, 0.8]), | |
alpha=0.01, | |
ax=ax, title='Power of t-Test' + '\n' + r'$\alpha = 0.01$') | |
ax.get_legend().remove() | |
ax = fig.add_subplot(2,1,2) | |
fig = TTestIndPower().plot_power(dep_var='nobs', | |
nobs= np.arange(2, 200), | |
effect_size=np.array([0.2, 0.5, 0.8]), | |
alpha=0.05, | |
ax=ax, title=r'$\alpha = 0.05$') | |
fig.subplots_adjust(top = 1.4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment