exuber (version 0.3.0)

mc_cv: Monte Carlo Critical Values

Description

mc_cv computes Monte Carlo critical values for the recursive unit root tests. mc_dist computes the distribution.

Usage

mc_cv(n, minw = NULL, nrep = 2000, seed = NULL,
  opt_badf = c("fixed", "asymptotic", "simulated"),
  opt_bsadf = c("conservative", "conventional"))

mc_distr(n, minw = NULL, nrep = 2000, seed = NULL)

Arguments

n

A positive integer. The sample size.

minw

A positive integer. The minimum window size, which defaults to \((0.01 + 1.8/\sqrt(T))*T\).

nrep

A positive integer. The number of Monte Carlo simulations.

seed

An object specifying if and how the random number generator(rng) should be initialized. Either NULL or an integer will be used in a call to set.seed before simulation. If set, the value is save as "seed" attribute of the returned value. The default, NULL will note change the rng state, and return .Random.seed as the "seed" attribute.

opt_badf

Options for badf critical value calculation. "fixed" corresponds to log(log(n*s))/100 rule, "asymptotic" to asymptotic critical values and simulated to the monte carlo simulations.

opt_bsadf

Options for bsadf critical value calculation. "conventional" corresponds to the max of the quantile of the simulated distribution, while "conservative" corresponds to the quantile of the max which is more conservative in nature, thus the name.

Value

A list that contains the critical values for ADF, BADF, BSADF and GSADF t-statistics.

See Also

wb_cv for Wild Bootstrapped critical values and sb_cv for Sieve Bootstrapped critical values

Examples

Run this code
# NOT RUN {
# Default minimum window
mc <- mc_cv(n = 100)

# Change the minimum window and the number of simulations
mc <- mc_cv(n = 100, nrep = 2500, minw = 20)

mdist <- mc_distr(n = 100)
autoplot(mdist)
# }

Run the code above in your browser using DataCamp Workspace