return_mc function

S3 class mc object generating function

S3 class mc object generating function

return_mc(S0, y, statistic, dgp, N, type, call, seed, pval)

Arguments

  • 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 y and output a scalar.
  • dgp: 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.
  • 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 geq, leq, absolute and two-tailed. Default is geq.
  • call: An object of class call. Original call to mmc
  • seed: An integer vector. Value of .Random.seed at the start of mmc call.
  • pval: An atomic vector. Monte Carlo p-value of statistic