Calculation of power for the hypothesis of minimal effect (off-center distribution f) in R

At work, I was asked to calculate statistical power for Wald statistical statistics. We test the null hypothesis in 1.54% of the explained variance, so the distribution of F that we are comparing is not central.

Now I was told to first calculate the critical value of F under the null hypothesis for the significance level (we used 0.05). I did this in R as follows:

`groups <- 2 N <- 4440 PV <- 0.0154 min.eff.hyp <- function(N, groups=2, PV=.01, alpha=.05){ df1 <- groups - 1 # numerator degrees of freedom df2 <- N-groups # denominator degrees of freedom ncp <- ((N-1)*PV)/(1-PV) # non-centrality parameter g <- (df1+ncp)^2/(df1+2*ncp) # adjusted df1 k <- (df1+ncp)/df1 # to adjust for non-centrality crit.central <- qf(1-alpha,g,df2) crit.val <- crit.central * k return(paste('Kritischer F-Wert (PV=',PV,'): ',round(crit.val,3), sep = '')) } min.eff.hyp(N,groups,PV)` 

And then I have to use this critical value of F to determine alpha 'under an alternative hypothesis. This alpha can then be used to calculate statistical power.

Unfortunately, I do not know how to get alpha '. Again I tried using R: pf(crit.val,g,df2,ncp)

I think this should calculate the probability of my data, given that the alternative hypothesis is correct. But, to be true, I'm at a loss. I don’t know how to implement off-center calculations in power calculations, and for some reason I can’t find someone who had the same problem, and actually found a solution.

How can I calculate the statistical power of a test when I test the hypothesis of minimal effect and thus compare it with off-center distributions?

Thanks for taking the time to help me!

Hello, Maria

+6
source share

All Articles