You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wooldridge section 12.6.4 on local asymptotic power for M-estimators.
looks easy to add to t_test and f_test cases (in ContrastResults ?)
just uses normality, either noncentral chisquare or noncentral F test
I would only start with "observed" power, I don't know if effect sizes and sample size calculation would be easy.
Wooldridge refers to
Andrews, Donald W. K. 1989. “Power in Econometric Applications.” Econometrica 57 (5): 1059–90. doi:10.2307/1913623.
which inverts the power function
Looks like equal power (type 2 error) intervals or contours (ellipsoids)
also has direction of largest and direction of smallest power for linear combinations.
Andrews only requires a consistent estimator with asymptotic normality
related: we don't have "observed power" (given the test results for the data) connected or readily available
some articles were criticizing reporting observed ex post power.
edit
the interest for sample size calculations is often in alternatives that are not local/contiguous alternatives.
Self, Steven G., and Robert H. Mauritsen. "Power/sample size calculations for generalized linear models." Biometrics (1988): 79-86.
They use the calculations based on local alternatives, but have comments about it's applicability.
related problem for GLM: the variance function also depends on the mean and will differ between null and alternative.
see papers by Shieh that take estimation properties under the alternative into account, e.g.
Shieh, Gwowen. "On power and sample size calculations for Wald tests in generalized linear models." Journal of statistical planning and inference 128.1 (2005): 43-59.
and related literature.
Also, some literature/packages for linear model seems to focus only on power for R-squared which looks very limited, and not what we are interested in here.
Li, Zhigang, and Ian W. McKeague. 2013. “Power and Sample Size Calculations for Generalized Estimating Equations Via Local Asymptotics.” Statistica Sinica 23 (1): 231–50.
They use local asymptotics so that nuisance parameter (extra slope coefficients, correlation parameters) are consistently estimated under the null (and equal to the limit under the local alternative).
However, in the sandwich form of cov_params in wald or score test statistic they use E(y | x; params_alt) in GEE.
This should be approximately the same as computing OPG, var(score_obs) under beta_alt (although they keep score_factor at params_null).
Their normal distribution cases for a single parameter in the examples has sigma_null = sigma_alt, so sigma seems to be a hybrid and not two separate sigmas for null and alternative.
AFAIU:
Under local alternative null and alternative statistics converge to the same point, so we can pick any asymptotically equivalent statistic to improve small sample properties.
Theory looks clean, but the asymptotics do not provide help in choosing the better ones among equivalent statistics.
(similar to discussion OPG, versus observed information matrix versus expected information matrix)
Note:
This is not MLE, but similar to M-estimator it uses sandwich forms of wald and score statistics (GEE).
Similar would apply to other M-estimators.
I got myself confused again about Cohen's effect sizes (I remembered the definition of f-squared incorrectly).
I feel like switching all the generic power computation to using normalized noncentrality.
f2 has the same "normalization" as ncn_chi2, and not ncn_F. (explained sum of squares divided by residual sum of squares)
formula in _fstat2effectsize f2 = f_stat * df1 / df2
The one letter names of Cohen's effect sizes are not informative and not mnenomic.
Activity
josef-pkt commentedon Dec 25, 2015
PASS has some simple power and sample size calculations for Logit, Probit and Poisson.
as simpler starting point: linear model
SAS has GLMPower ("general linear model", not generalized) https://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_glmpower_a0000000170.htm
Stata 14 has power for anova
It's not clear to me what R has
asypow https://stat.ethz.ch/pipermail/r-help/2006-March/101185.html
and power based on simulations http://www.biostat.jhsph.edu/~pmurakam/simpower.html
Also, some literature/packages for linear model seems to focus only on power for R-squared which looks very limited, and not what we are interested in here.
josef-pkt commentedon Mar 14, 2020
There is no specific issue for how to compute power and sample size by simulation by creating artificial datasets that can be scaled with nobs.
I found the following while looking for analytical formulas for power for regression
https://stats.stackexchange.com/questions/35940/simulation-of-logistic-regression-power-analysis-designed-experiments
https://stackoverflow.com/questions/27234696/how-do-you-conduct-a-power-analysis-for-logistic-regression-in-r
https://stats.stackexchange.com/questions/255586/power-simulation-for-poisson-regression
josef-pkt commentedon Feb 10, 2023
two more
https://stats.stackexchange.com/questions/604914/r-power-analysis-for-a-logistic-regression
https://stats.stackexchange.com/questions/601826/power-analysis-for-probit-model-in-r
josef-pkt commentedon Feb 10, 2023
another R package reference by some questions. It seems to have more Poisson, Logit included
https://cran.r-project.org/web/packages/WebPower/index.html
[-]more power: for LikelihoodModelResults[/-][+]ENH: more power: for LikelihoodModelResults[/+]josef-pkt commentedon Oct 30, 2024
interesting article
Li, Zhigang, and Ian W. McKeague. 2013. “Power and Sample Size Calculations for Generalized Estimating Equations Via Local Asymptotics.” Statistica Sinica 23 (1): 231–50.
They use local asymptotics so that nuisance parameter (extra slope coefficients, correlation parameters) are consistently estimated under the null (and equal to the limit under the local alternative).
However, in the sandwich form of cov_params in wald or score test statistic they use E(y | x; params_alt) in GEE.
This should be approximately the same as computing OPG, var(score_obs) under beta_alt (although they keep
score_factorat params_null).Their normal distribution cases for a single parameter in the examples has sigma_null = sigma_alt, so sigma seems to be a hybrid and not two separate sigmas for null and alternative.
AFAIU:
Under local alternative null and alternative statistics converge to the same point, so we can pick any asymptotically equivalent statistic to improve small sample properties.
Theory looks clean, but the asymptotics do not provide help in choosing the better ones among equivalent statistics.
(similar to discussion OPG, versus observed information matrix versus expected information matrix)
Note:
This is not MLE, but similar to M-estimator it uses sandwich forms of wald and score statistics (GEE).
Similar would apply to other M-estimators.
josef-pkt commentedon Nov 13, 2024
I got myself confused again about Cohen's effect sizes (I remembered the definition of f-squared incorrectly).
I feel like switching all the generic power computation to using normalized noncentrality.
f2 has the same "normalization" as ncn_chi2, and not ncn_F. (explained sum of squares divided by residual sum of squares)
formula in _fstat2effectsize
f2 = f_stat * df1 / df2The one letter names of Cohen's effect sizes are not informative and not mnenomic.