statsmodels.stats.power.GofChisquarePower.solve_power¶
-
GofChisquarePower.solve_power(effect_size=
None, nobs=None, alpha=None, power=None, n_bins=2)[source]¶ 求解单样本卡方检验功效的任意一个参数
- for the one sample chisquare-test the keywords are:
效应量, 样本量, 显著性水平, 功效
必须有一个是
None,其他都需要数值。n_bins 需要被定义,默认使用值为2。
注释
该函数使用 scipy.optimize 来寻找满足幂方程的值。它首先使用
brentq进行先验搜索以确定边界。如果这未能找到根,则使用fsolve。如果fsolve也失败,那么对于alpha、power和effect_size,将使用具有固定边界的brentq。然而,仍然可能存在这种情况失败的情况。
Last update:
Oct 16, 2024