Description Usage Arguments Value Examples
View source: R/running.simulation.R
Running Simulation
1 2 3 4 5 6 | running.simulation(model = "CTE", simu = 40, samples = c(100, 200, 500),
g.method = c("nnet", "rf", "MARS"), gps.method = c("series",
"boosting&normal", "linear&boxcox"), trimming = c(-4, 4), cov = c(2, 5,
10), method = c("SR", "HI", "CDML"), fold = c(1, 2, 3, 5),
responseCurve = "polynom", file = "r_scratch/cte100and200and500.Rdata",
sd = 8)
|
model |
model varies from "IV", "CTE" |
simu |
number of simulations one would run, default = 100. |
samples |
number of samples |
g.method |
a vector of method for regression estimation |
gps.method |
a vector of method for generalized propensity score estimation |
trimming |
trimming of treatment vector, default = c(-4, 4) |
cov |
a vector of dimensions of covariates |
method |
a vector of estimation methods we choose from double machine learning method ("CDML") and simple regression method ("SR"), Hirano & Imbens method ("HI") |
fold |
number of folds for sample splitting |
responseCurve |
choose from "linear", "polynom", "polynom2", "polynom3", "mixture". |
file |
file that we save our return into |
sd |
t = ∑ x_i + ε, the standard error of ε, choose from 1, 2, 3, 5, 8, 10, 15 |
no returns
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | running.simulation(
########### enter all parameters needed for running simulations ##########
model <- "CTE",
simu <-8,
samples <- c(200),
g.method <- c("lasso"),
gps.method <-
c(#"series",
"rf&normal" ,
"linear&boxcox"),
trimming <- c(-4, 4),
cov <- c(5),
method <- c("SR", "CDML"),
fold <- c(1, 2, 3),
responseCurve <- "polynom3",
file <- "demo.Rdata", # the file saves data
sd =8)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.