mmctSampler-methods {simctest} | R Documentation |
Constructor for class 'mmctSampler'.
mmctSampler(f, num, data=NULL)
f |
a function f(ind,n,data) which for every hypothesis ind[i] in vector "ind" returns n[i] new samples and returns the number of exceedances, where i=1...length(ind). The data stored in the data slot of class "mmctSampler" is also passed on to "f". |
num |
number of hypotheses. |
data |
additional slot for data. |
returns object of type 'mmctSampler' (derived from class 'mmctSamplerGeneric').
fun <- function(ind,n,data) sapply(1:length(ind), function(i) sum(runif(n[i])<=data[ind[i]])); i <- mmctSampler(fun,num=500,data=runif(500));