Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 206235

Neyman power of the test in R, problem with function

$
0
0

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?


Viewing all articles
Browse latest Browse all 206235

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>