I've collect 161 people for a study which the original power analysis was based on correlations, but now I've realised binomial regression would be better. I can find a lot of articles on comparing binomial proportions (45/60 vs 48/60) and linear regressions, but nothing about a regression predicting a proportion (specifically one with success/fail: 48/60 rather than proportion success: 80% )
I have a variable (ordinal, 0-30) predicting performance in each block of 60 trials. My research question is: does Unex predict performance?
`res <- glm(cbind(B1_success, (60 - B1_success)) ~ Unex, data = Df, family = "binomial")`
I'm not sure what the effect size would be to use for this either, as glm does not give overall effect sizes except for beta coefficients(?). Overall, I wanted to work out power for 77%, 78%, 82%, 83% etc. (H1) compared to 80% (H0), or small, medium, strong effect size? And post-hoc achieved power.
Any help would be appreciated! Sorry if this is unclear, my first post.
I've seen Power analysis for binomial data when the null hypothesis is that $p = 0$ but not sure its relevant to me.
Edit: Thanks for the help. I've added an R function that other might find useful
powerBinom<-function(beta, N, outcomeVariance, predictorSD){
if (outcomeVariance >.25) {print("ERROR: Maximum 0.25 for binomial outcome")}
powerBinom = 1 - pnorm(1.96 - beta * predictorSD * sqrt((N*outcomeVariance)))
print(powerBinom)
}