-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.R
43 lines (39 loc) · 1.24 KB
/
main.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# This script runs cross-validation, in-sample and out-of-sample estimations
# Gregor von Schweinitz, 2020-11-17
cat("\014") # clear console
rm(list = ls()) # clear workspace
list.masterfiles_cv <- c("mu05_cv")
list.masterfiles_est <- c("mu05_is","mu05_rec")
ls.keep <- c(ls(),"ls.keep")
for (masterfile in list.masterfiles_cv){
# For safety reasons, the output of the cross-validation ("outtable_05.csv") is not saved in the main working directory, but in the output working directory
# For usage, this needs to be copied into the main working directory
print("#########################")
print("#########################")
print("")
print("")
print("")
print(masterfile)
print("")
print("")
print("")
print("#########################")
print("#########################")
source(paste("script_master_",masterfile,".R",sep=""))
rm(list=setdiff(ls(),ls.keep))
}
for (masterfile in list.masterfiles_est){
print("#########################")
print("#########################")
print("")
print("")
print("")
print(masterfile)
print("")
print("")
print("")
print("#########################")
print("#########################")
source(paste("script_master_",masterfile,".R",sep=""))
rm(list=setdiff(ls(),ls.keep))
}