mc
object generating functionS3 class mc
object generating function
return_mc(S0, y, statistic, dgp, N, type, call, seed, pval)
An atomic vector. Value of the test statistic applied to the data.
A vector or data frame.
A function or a character string that specifies
how the statistic is computed. The function needs to input the
y
and output a scalar.
A function. The function inputs the first argument
y
and outputs a simulated y
. It should represent the
data generating process under the null. Default value is the function
sample(y, replace = TRUE)
, i.e. the
bootstrap resampling of y
.
An atomic vector. Number of replications of the test statistic.
A character string. It specifies the type of test
the p-value function produces. The possible values are
geq
, leq
, absolute
and two-tailed
.
Default is geq
.
An object of class call
. Original call to mmc
An integer vector. Value of .Random.seed
at the start of
mmc
call.
An atomic vector. Monte Carlo p-value of statistic