Learn R Programming

simctest (version 2.5)

mmctSampler-class: Class "mmctest"

Description

Wrapper-Class for "mmctestInterfaceGeneric", takes a function, the number of hypotheses and returns derived object of class "mmctestInterfaceGeneric". Class provides a slot for additional data. The function f(ind,n,data) has to return n[i] new samples for each hypothesis ind[i] in vector "ind", where i=1...length(ind). The data stored in the data slot of class "mmctSampler" is also passed on to "f".

Arguments

Objects from the Class

Objects can be created by calls of the form mmctSampler(f=...,num=...,data=...).

Slots

f:

Object of class "function"

num:

Object of class "numeric"

data:

Object of class "numeric"

Methods

getSamples

signature(obj="mmctSampler", ind="numeric", n="numeric"): ...

getNumber

signature(obj="mmctSampler"): ...

References

Gandy, A. and Hahn, G. (2013) MMCTest - A Safe Algorithm for Implementing Multiple Monte Carlo Tests. arXiv:1209.3963

Examples

Run this code
# NOT RUN {
  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));
# }

Run the code above in your browser using DataLab