spec.res.gen | R Documentation |
Generates CI length and coverage results for each DGP specification.
spec.res.gen(specdata.list, eps, CI.method, th, spec.etc)
specdata.list |
a list generated by |
eps |
N(0,1) random noises. |
CI.method |
method to be used to generate the CI. |
th |
true RD parameter value. |
spec.etc |
list of other specification parameters. |
This function is used for MC simulations.
a list with two components; len
contains the length result,
and cov
contains the coverage indicator.
spec.etc <- list(alpha = 0.05, mon_ind = 1, C.small = 1, C.large = 3, se.method.RDH = "nn", se.initial.RDH = "nn", M.RDH = 1, se.method = "nn.test", se.init = "S.test", t.dir = "left", C.l = 1/2, C.u = 2, C = 3) spec.all <- spec.grid(c("unif", "homo", "trueCsmall")) specdata.list <- spec.data.all(spec.all, 4, 100, 1, 3, 1, 1/2) eps <- rnorm(100) spec.res.gen(specdata.list, eps, "RDH", 1, spec.etc) spec.res.gen(specdata.list, eps, "RDR", 1, spec.etc) spec.res.gen(specdata.list, eps, "adpt", 1, spec.etc) spec.res.gen(specdata.list, eps, "mm.largeC", 1, spec.etc) spec.res.gen(specdata.list, eps, "RDR.L", 1, spec.etc) spec.etc$mon_ind <- c(1, 2) specdata.list <- spec.data.all(spec.all, 5, 100, 1, 3, 1, 1/2) spec.res.gen(specdata.list, eps, "mm.largeC", 1, spec.etc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.