search for: nrng

Displaying 1 result from an estimated 1 matches for "nrng".

Did you mean: ning
2002 Aug 06
0
You requested this report (PR#1880)
Hi guys, I am planning to let my students do some simulations regarding the bias of the sample standard deviation. The following function is pretty standard (so I hope :) ): > sim <- function(nrng, replic, true.s, random, ...){ + res <- NULL + for(n in nrng){ + data <- matrix(random(n*replic,...), ncol=replic) + val <- sqrt(apply(data, 2, var)) + res <- rbind(res, + cbind(bias=val-true.s, n=n)) + } + res + } It takes a vector of sample sizes,...