I would like to write function in R for power of the test.
neyman <- function(n,k){
for (a in 1:10^4){
x = runif(n,0,1)
b=()
b[a] <- neyman.unif.test(x, nrepl=10000, k)$statistic}
sum(b > quantile(b, 0.95))/10^4
}
But when I use
neyman(10,4)
i have info that Error: object 'b' not found
What is wrong?