-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_observational_random_intercepts.R
48 lines (37 loc) · 1.24 KB
/
run_observational_random_intercepts.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
44
45
46
47
source('observational_random_intercepts.R')
source('models.R')
source('load_ihdp.R')
source('get_balance.R')
get.seed <- Sys.getenv('SLURM_ARRAY_TASK_ID')
# g1
A <- observational_random_intercepts(tau = .2, type = 'A', seed = get.seed)
out_file <- paste0('results/A/g1_iteration_', get.seed, '.rds')
write_rds(A, out_file)
rm(A)
gc()
B <- observational_random_intercepts(tau = .2, type = 'B', seed = get.seed)
out_file <- paste0('results/B/g1_iteration_', get.seed, '.rds')
write_rds(B, out_file)
rm(B)
gc()
C <- observational_random_intercepts(tau = .2, type = 'C', seed = get.seed)
out_file <- paste0('results/C/g1_iteration_', get.seed, '.rds')
write_rds(C, out_file)
rm(C)
gc()
#g2
A <- observational_random_intercepts(tau = .2, type = 'A', seed = get.seed, group = 'g2')
out_file <- paste0('results/A/g2_iteration_', get.seed, '.rds')
write_rds(A, out_file)
rm(A)
gc()
B <- observational_random_intercepts(tau = .2, type = 'B', seed = get.seed, group = 'g2')
out_file <- paste0('results/B/g2_iteration_', get.seed, '.rds')
write_rds(B, out_file)
rm(B)
gc()
C <- observational_random_intercepts(tau = .2, type = 'C', seed = get.seed, group = 'g2')
out_file <- paste0('results/C/g2_iteration_', get.seed, '.rds')
write_rds(C, out_file)
rm(C)
gc()