mmc
object generating functionS3 class mmc
object generating function
return_mmc(
S0,
y,
statistic,
dgp,
est,
lower,
upper,
N,
type,
method,
alpha,
control,
call,
seed,
lmc,
opt_result,
opt_trace
)
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 a vector of nuisance parameters v
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
.
A vector with length of v. It is the starting
point of the algorithm. If est
is a consistent estimate
of v
then mmc
will return both the MMC and Local Monte Carlo (LMC).
Default is NULL, in which case, default values will be generated automatically.
A vector with length of v. Lower bounds for nuisance parameters under the null. See Details.
A vector with length of v. Upper bounds for nuisance parameters under the null. See Details.
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
.
A character string. Type of algorithm to be
used for global optimization. The four available methods
are simulated annealing (GenSA
), particle swarm (psoptim
),
genetic algorithm (GA
), and grid search (gridSearch
)
Default is GenSA
,
An atomic vector. If mmc
finds a
p-value over alpha
, then the algorithm will stop. This is particularly
useful if we are only looking at testing a hypothesis at a particular level.
Default is NULL.
A list. Arguments to be used to control the
behavior of the algorithm chosen in method
. See controls section for more details.
An object of class call
. Original call to mmc
An integer vector. Value of .Random.seed
at the start of
mmc
call.
An object of class mc
. If par
is specified, it returns an object
of class mc
corresponding the Local Monte Carlo test.
An object returning the optimization results.
An object returning the optimization results.