-
Notifications
You must be signed in to change notification settings - Fork 1
/
script_prep_is.R
28 lines (24 loc) · 1.16 KB
/
script_prep_is.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
####################################
# Setting some names
datasets.eval <- "data.db.train"
resnames <- "res.is"
posvecs.eval <- "pos.eval.is" # posvecs.eval is used to select from resnames (in script_tables)
resnames.bs <- "res.bs.is"
##################################
# Bootstrap settings
do.bootstrap <- TRUE
R.BS <- 500 # number of bootstrap draws (500)
blocklength <- 12 # blocklength for autocorrelation
sample.countries <- FALSE # TRUE if countries are to be randomly excluded, FALSE otherwise (our preference: FALSE)
min_cr <- 5 # minimum number of pre-crisis periods in the bootstrap
alphavec <- c(0.05,0.95) # quantiles to be plotted as confidence bands c(0.05,0.95) c(0.1,0.9)
##################################
# parameter settings
parameters$optimizationMode <- FALSE
parameters$paramtable <- read.csv(paramtable_file,row.names="method")
for (col in grep("_val",colnames(parameters$paramtable))){
parameters$paramtable[,col] <- as.numeric(as.character(parameters$paramtable[,col]))
}
for (col in grep("_name",colnames(parameters$paramtable))){
parameters$paramtable[,col] <- as.character(parameters$paramtable[,col])
}