Hi all, Assume the following function that generate a random number.
z1<-function (n, eta) { wv <- runif(n) wz <- (-1/eta) * log(wv) wz } y <- z1(100,4) mean(y) I want to run this function say 1000 times and I want to count if the mean(y) outside the following range 0.20 to 0.30. How do I do it in R? Thanks in advance ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.