Description Usage Arguments Examples
S3 class mc
.
1 |
S0 |
An atomic vector. Value of the test statistic applied to the data. |
y |
A vector or data frame. |
statistic |
A function or a character string that specifies
how the statistic is computed. The function needs to input the
|
dgp |
A function. The function inputs the first argument
|
N |
An atomic vector. Number of replications of the test statistic. |
type |
A character string. It specifies the type of test
the p-value function produces. The possible values are
|
call |
An object of class |
seed |
An integer vector. Value of |
pval |
An atomic vector. Monte Carlo p-value of |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # Generate typical data found inside the function mc()
S0 <- 0
y <- rnorm(100)
statistic <- function(y) mean(y)
dgp <- function(y) sample(y, replace = TRUE)
N <- 99
type <- "geq"
call <- call("mc",y= y, statistic = statistic, dgp = dgp, N = 99, type = type)
seed <- NULL
pval <- 0.06
# Combine data and return it as an object of class 'mc'
MaxMC:::return_mc(S0 = S0, y = y, statistic = statistic, dgp = dgp,
N = N, type = type, call = call, seed = seed, pval= pval)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.