statsmodels.stats.power.NormalIndPower.plot_power¶
method

NormalIndPower.
plot_power
(dep_var='nobs', nobs=None, effect_size=None, alpha=0.05, ax=None, title=None, plt_kwds=None, **kwds)¶ plot power with number of observations or effect size on xaxis
 Parameters
 dep_varstring in [‘nobs’, ‘effect_size’, ‘alpha’]
This specifies which variable is used for the horizontal axis. If dep_var=’nobs’ (default), then one curve is created for each value of
effect_size
. If dep_var=’effect_size’ or alpha, then one curve is created for each value ofnobs
. nobsscalar or array_like
specifies the values of the number of observations in the plot
 effect_sizescalar or array_like
specifies the values of the effect_size in the plot
 alphafloat or array_like
The significance level (type I error) used in the power calculation. Can only be more than a scalar, if
dep_var='alpha'
 axNone or axis instance
If ax is None, than a matplotlib figure is created. If ax is a matplotlib axis instance, then it is reused, and the plot elements are created with it.
 titlestring
title for the axis. Use an empty string,
''
, to avoid a title. plt_kwdsNone or dict
not used yet
 kwdsoptional keywords for power function
These remaining keyword arguments are used as arguments to the power function. Many power function support
alternative
as a keyword argument, twosample test supportratio
.
 Returns
 figmatplotlib figure instance
Notes
This works only for classes where the
power
method haseffect_size
,nobs
andalpha
as the first three arguments. If the second argument isnobs1
, then the number of observations in the plot are those for the first sample. TODO: fix this for FTestPower and GofChisquarePowerTODO: maybe add line variable, if we want more than nobs and effectsize