]> code.communitydata.science - ml_measurement_error_public.git/blob - simulations/Makefile
changes from klone
[ml_measurement_error_public.git] / simulations / Makefile
1 .ONESHELL:
2 SHELL=bash
3
4 Ns=[1000, 5000, 10000]
5 ms=[100, 200, 400]
6 seeds=[$(shell seq -s, 1 500)]
7 explained_variances=[0.1]
8
9 all:main supplement
10 main:remembr.RDS 
11 supplement:robustness_1.RDS robustness_1_dv.RDS robustness_2.RDS robustness_2_dv.RDS robustness_3.RDS robustness_3_dv.RDS robustness_3_proflik.RDS robustness_3_dv_proflik.RDS robustness_4.RDS robustness_4_dv.RDS robustness_5.RDS robustness_5_dv.RDS robustness_6.feather
12
13 srun=sbatch --wait --verbose run_job.sbatch
14
15
16 joblists:example_1_jobs example_2_jobs example_3_jobs
17
18 # test_true_z_jobs: test_true_z.R simulation_base.R
19 #       sbatch --wait --verbose run_job.sbatch  ./grid_sweep.py --command "Rscript test_true_z.R" --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["test_true_z.feather"], "y_explained_variancevari":${explained_variances}, "Bzx":${Bzx}}' --outfile test_true_z_jobsb
20
21 # test_true_z.feather: test_true_z_jobs 
22 #       rm -f test_true_z.feather
23 #       sbatch --wait --verbose --array=1-3000 run_simulation.sbatch 0 test_true_z_jobs
24 #       sbatch --wait --verbose --array=3001-6001 run_simulation.sbatch 0 test_true_z_jobs
25
26
27 example_1_jobs: 01_two_covariates.R simulation_base.R grid_sweep.py pl_methods.R
28         ${srun} ./grid_sweep.py --command "Rscript 01_two_covariates.R" --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["example_1.feather"], "y_explained_variance":${explained_variances}, "Bzx":[1]}' --outfile example_1_jobs
29
30 example_1.feather: example_1_jobs 
31         rm -f example_1.feather
32         sbatch --wait --verbose --array=1-1000  run_simulation.sbatch 0 example_1_jobs
33         sbatch --wait --verbose --array=1001-2000 run_simulation.sbatch 0 example_1_jobs
34         sbatch --wait --verbose --array=2001-3000  run_simulation.sbatch 0 example_1_jobs
35         sbatch --wait --verbose --array=3001-$(shell cat example_1_jobs | wc -l) run_simulation.sbatch 0 example_1_jobs
36
37 example_2_jobs: 02_indep_differential.R simulation_base.R grid_sweep.py pl_methods.R
38         sbatch --wait --verbose run_job.sbatch ./grid_sweep.py --command "Rscript 02_indep_differential.R" --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["example_2.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+z+x"]}' --outfile example_2_jobs
39
40 example_2.feather: example_2_jobs 
41         rm -f example_2.feather
42         sbatch --wait --verbose --array=1-1000  run_simulation.sbatch 0 example_2_jobs
43         sbatch --wait --verbose --array=1001-2000 run_simulation.sbatch 0 example_2_jobs
44         sbatch --wait --verbose --array=2001-3000  run_simulation.sbatch 0 example_2_jobs
45         sbatch --wait --verbose --array=3001-$(shell cat example_2_jobs | wc -l) run_simulation.sbatch 0 example_2_jobs
46
47
48
49 # example_2_B_jobs: example_2_B.R
50 #       sbatch --wait --verbose run_job.sbatch python3 ./grid_sweep.py --command "Rscript example_2_B.R" --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["example_2_B.feather"]}' --outfile example_2_B_jobs
51
52 # example_2_B.feather: example_2_B_jobs
53 #       rm -f example_2_B.feather
54 #       sbatch --wait --verbose --array=1-3000 run_simulation.sbatch 0 example_2_B_jobs
55
56 example_3_jobs: 03_depvar.R simulation_base.R grid_sweep.py pl_methods.R
57         sbatch --wait --verbose run_job.sbatch ./grid_sweep.py --command "Rscript 03_depvar.R" --arg_dict '{"N":${Ns},"m":${ms}, "Bxy":[0.7],"Bzy":[-0.7],"Bzx":[1],"seed":${seeds}, "outfile":["example_3.feather"], "y_explained_variance":${explained_variances}}' --outfile example_3_jobs
58
59 example_3.feather: example_3_jobs
60         rm -f example_3.feather 
61         sbatch --wait --verbose --array=1-1000  run_simulation.sbatch 0 example_3_jobs
62         sbatch --wait --verbose --array=1001-2000 run_simulation.sbatch 0 example_3_jobs
63          sbatch --wait --verbose --array=2001-3000  run_simulation.sbatch 0 example_3_jobs
64         sbatch --wait --verbose --array=3001-$(shell cat example_3_jobs | wc -l) run_simulation.sbatch 0 example_3_jobs
65
66 example_4_jobs: 04_depvar_differential.R simulation_base.R grid_sweep.py pl_methods.R
67         sbatch --wait --verbose run_job.sbatch ./grid_sweep.py --command "Rscript 04_depvar_differential.R" --arg_dict '{"N":${Ns},"Bxy":[0.7],"Bzy":[-0.7],"Bzx":[1], "m":${ms}, "seed":${seeds}, "outfile":["example_4.feather"], "z_bias":[-0.5], "prediction_accuracy":[0.73]}' --outfile example_4_jobs
68
69 example_4.feather: example_4_jobs
70         rm -f example_4.feather
71         sbatch --wait --verbose --array=1-1000  run_simulation.sbatch 0 example_4_jobs
72         sbatch --wait --verbose --array=1001-2000  run_simulation.sbatch 0 example_4_jobs
73         sbatch --wait --verbose --array=2001-3001 run_simulation.sbatch 0 example_4_jobs
74         sbatch --wait --verbose --array=2001-3000  run_simulation.sbatch 0 example_4_jobs
75         sbatch --wait --verbose --array=3001-$(shell cat example_4_jobs | wc -l)  run_simulation.sbatch 0 example_4_jobs
76
77
78 remembr.RDS:example_1.feather example_2.feather example_3.feather example_4.feather plot_example.R plot_dv_example.R summarize_estimator.R
79         rm -f remembr.RDS
80         ${srun} Rscript plot_example.R --infile example_1.feather --name "plot.df.example.1"
81         ${srun} Rscript plot_example.R --infile example_2.feather --name "plot.df.example.2"
82         ${srun} Rscript plot_dv_example.R --infile example_3.feather --name "plot.df.example.3"
83         ${srun} Rscript plot_dv_example.R --infile example_4.feather --name "plot.df.example.4"
84
85
86 START=0
87 STEP=1000
88 ONE=1
89
90 robustness_Ns=[1000,5000]
91 robustness_ms=[100,200]
92
93 #in robustness 1 / example 2 misclassification is correlated with Y.
94 robustness_1_jobs_p1: 02_indep_differential.R simulation_base.R grid_sweep.py
95         sbatch --wait --verbose run_job.sbatch ./grid_sweep.py --command "Rscript 02_indep_differential.R" --arg_dict '{"N":[1000],"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_1.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3,0],"Bxy":[0.3],"Bzx":[1,0], "outcome_formula":["y~x+z"], "z_bias":[0, 0.5], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~1"]}' --outfile robustness_1_jobs_p1
96
97 robustness_1_jobs_p2: 02_indep_differential.R simulation_base.R grid_sweep.py
98         sbatch --wait --verbose run_job.sbatch ./grid_sweep.py --command "Rscript 02_indep_differential.R" --arg_dict '{"N":[5000],"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_1.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3,0],"Bxy":[0.3],"Bzx":[1,0], "outcome_formula":["y~x+z"], "z_bias":[0, 0.5], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~1"]}' --outfile robustness_1_jobs_p2
99
100 robustness_1.feather: robustness_1_jobs_p1 robustness_1_jobs_p2
101         rm -f $@
102         $(eval END_1!=cat robustness_1_jobs_p1 | wc -l)
103         $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
104         $(eval END_2!=cat robustness_1_jobs_p2 | wc -l)
105         $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
106         $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_1_jobs_p1;)
107         $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_1_jobs_p2;)
108
109 robustness_1.RDS: robustness_1.feather summarize_estimator.R
110         rm -f robustness_1.RDS
111         ${srun} Rscript plot_example.R --infile $< --name "robustness_1" --remember-file $@
112
113 # when Bzy is 0 and zbias is not zero, we have the case where P(W|Y,X,Z) has an omitted variable that is conditionanlly independent from Y.  Note that X and Z are independent in this scenario.
114 robustness_1_dv_jobs_p1: simulation_base.R 04_depvar_differential.R grid_sweep.py
115         ${srun} ./grid_sweep.py --command 'Rscript 04_depvar_differential.R' --arg_dict '{"N":[1000],"Bzx":[1], "Bxy":[0.7,0],"Bzy":[-0.7,0],"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_1_dv.feather"], "proxy_formula":["w_pred~y"],"z_bias":[-0.5]}' --outfile robustness_1_dv_jobs_p1
116
117 robustness_1_dv_jobs_p2: simulation_base.R 04_depvar_differential.R grid_sweep.py
118         ${srun} ./grid_sweep.py --command 'Rscript 04_depvar_differential.R' --arg_dict '{"N":[5000],"Bzx":[1], "Bxy":[0.7,0],"Bzy":[-0.7,0],"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_1_dv.feather"], "proxy_formula":["w_pred~y"],"z_bias":[-0.5]}' --outfile robustness_1_dv_jobs_p2
119
120 robustness_1_dv.feather: robustness_1_dv_jobs_p1 robustness_1_dv_jobs_p2
121         rm -f $@
122         $(eval END_1!=cat robustness_1_dv_jobs_p1 | wc -l)
123         $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
124         $(eval END_2!=cat robustness_1_dv_jobs_p2 | wc -l)
125         $(eval ITEMS_2!=seq $(START) $(STEP) $(END_1))
126         $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_1_dv_jobs_p1;)
127         $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_1_dv_jobs_p2;)
128
129 robustness_1_dv.RDS: robustness_1_dv.feather summarize_estimator.R
130         rm -f $@
131         ${srun} Rscript plot_dv_example.R --infile $< --name "robustness_1_dv" --remember-file $@
132
133
134 robustness_2_jobs_p1: grid_sweep.py 01_two_covariates.R simulation_base.R
135         rm -f $@
136         ${srun} ./$< --command 'Rscript 01_two_covariates.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_2.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~z"], "prediction_accuracy":[0.60,0.65]}' --outfile $@
137
138 robustness_2_jobs_p2: grid_sweep.py 01_two_covariates.R simulation_base.R
139         rm -f $@
140         ${srun} ./$< --command 'Rscript 01_two_covariates.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_2.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~z"], "prediction_accuracy":[0.70,0.75]}' --outfile $@
141
142 robustness_2_jobs_p3: grid_sweep.py 01_two_covariates.R simulation_base.R
143         rm -f $@
144         ${srun} ./$< --command 'Rscript 01_two_covariates.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_2.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~z"], "prediction_accuracy":[0.80,0.85]}' --outfile $@
145
146 robustness_2_jobs_p4: grid_sweep.py 01_two_covariates.R simulation_base.R
147         rm -f $@
148         ${srun} ./$< --command 'Rscript 01_two_covariates.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_2.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~z"], "prediction_accuracy":[0.90,0.95]}' --outfile $@
149
150 robustness_2.feather: robustness_2_jobs_p1 robustness_2_jobs_p2 robustness_2_jobs_p3 robustness_2_jobs_p4
151         rm $@
152         $(eval END_1!=cat robustness_2_jobs_p1 | wc -l)
153         $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
154         $(eval END_2!=cat robustness_2_jobs_p2 | wc -l)
155         $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
156         $(eval END_3!=cat robustness_2_jobs_p3 | wc -l)
157         $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
158         $(eval END_4!=cat robustness_2_jobs_p4 | wc -l)
159         $(eval ITEMS_4!=seq $(START) $(STEP) $(END_4))
160
161         $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_2_jobs_p1;)
162         $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_2_jobs_p2;)
163         $(foreach item,$(ITEMS_3),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_2_jobs_p3;)
164         $(foreach item,$(ITEMS_4),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_2_jobs_p4;)
165
166 robustness_2.RDS: plot_example.R robustness_2.feather summarize_estimator.R
167         rm -f $@
168         ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_2" --remember-file $@
169
170 robustness_2_dv_jobs_p1: grid_sweep.py 03_depvar.R simulation_base.R
171         rm -f $@
172         ${srun} ./$< --command 'Rscript 03_depvar.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_2_dv.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.60,0.65]}' --outfile $@
173
174 robustness_2_dv_jobs_p2: grid_sweep.py 03_depvar.R simulation_base.R
175         rm -f $@
176         ${srun} ./$< --command 'Rscript 03_depvar.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_2_dv.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.70,0.75]}' --outfile $@
177
178 robustness_2_dv_jobs_p3: grid_sweep.py 03_depvar.R simulation_base.R
179         rm -f $@
180         ${srun} ./$< --command 'Rscript 03_depvar.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_2_dv.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.80,0.85]}' --outfile $@
181
182 robustness_2_dv_jobs_p4: grid_sweep.py 03_depvar.R simulation_base.R
183         rm -f $@
184         ${srun} ./$< --command 'Rscript 03_depvar.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_2_dv.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.90,0.95]}' --outfile $@
185
186 robustness_2_dv.feather: robustness_2_dv_jobs_p1 robustness_2_dv_jobs_p2 robustness_2_dv_jobs_p3 robustness_2_dv_jobs_p4
187         rm -f $@
188         $(eval END_1!=cat robustness_2_dv_jobs_p1 | wc -l)
189         $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
190         $(eval END_2!=cat robustness_2_dv_jobs_p2 | wc -l)
191         $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
192         $(eval END_3!=cat robustness_2_dv_jobs_p3 | wc -l)
193         $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
194         $(eval END_4!=cat robustness_2_dv_jobs_p4 | wc -l)
195         $(eval ITEMS_4!=seq $(START) $(STEP) $(END_4))
196
197         $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_2_dv_jobs_p1;)
198         $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_2_dv_jobs_p2;)
199         $(foreach item,$(ITEMS_3),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_2_dv_jobs_p3;)
200         $(foreach item,$(ITEMS_4),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_2_dv_jobs_p4;)
201
202 robustness_2_dv.RDS: plot_dv_example.R robustness_2_dv.feather summarize_estimator.R
203         rm -f $@
204         ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_2_dv" --remember-file $@
205
206
207 robustness_3_proflik_jobs: grid_sweep.py 01_two_covariates.R simulation_base.R
208         rm -f $@
209         ${srun} ./$< --command 'Rscript 01_two_covariates.R'  --arg_dict '{"N":[1000],"m":[100], "seed":${seeds}, "outfile":["robustness_3_proflik.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1],"Px":[0.5,0.6,0.7,0.8,0.9,0.95], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~z"], "prediction_accuracy":[0.85], "confint_method":['spline']}' --outfile $@
210
211 robustness_3_proflik.feather: robustness_3_proflik_jobs
212         rm -f $@
213         $(eval END_1!=cat robustness_3_proflik_jobs | wc -l)
214         $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
215         $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_proflik_jobs;)
216
217 robustness_3_proflik.RDS: plot_example.R robustness_3_proflik.feather summarize_estimator.R
218         rm -f $@
219         ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_3_proflik" --remember-file $@
220
221
222 robustness_3_jobs_p1: grid_sweep.py 01_two_covariates.R simulation_base.R
223         rm -f $@
224         ${srun} ./$< --command 'Rscript 01_two_covariates.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_3.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1],"Px":[0.5,0.6], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~z"], "prediction_accuracy":[0.85]}' --outfile $@
225
226 robustness_3_jobs_p2: grid_sweep.py 01_two_covariates.R simulation_base.R
227         rm -f $@
228         ${srun} ./$< --command 'Rscript 01_two_covariates.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_3.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1],"Px":[0.7,0.8], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~z"], "prediction_accuracy":[0.85]}' --outfile $@
229
230 robustness_3_jobs_p3: grid_sweep.py 01_two_covariates.R simulation_base.R
231         rm -f $@
232         ${srun} ./$< --command 'Rscript 01_two_covariates.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_3.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1],"Px":[0.9,0.95], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~z"], "prediction_accuracy":[0.85]}' --outfile $@
233
234 robustness_3.feather: robustness_3_jobs_p1 robustness_3_jobs_p2 robustness_3_jobs_p3
235         rm -f $@
236         $(eval END_1!=cat robustness_3_jobs_p1 | wc -l)
237         $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
238         $(eval END_2!=cat robustness_3_jobs_p2 | wc -l)
239         $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
240         $(eval END_3!=cat robustness_3_jobs_p3 | wc -l)
241         $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
242
243         $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_jobs_p1;)
244         $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_jobs_p2;)
245         $(foreach item,$(ITEMS_3),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_jobs_p3;)
246
247 robustness_3.RDS: plot_example.R robustness_3.feather summarize_estimator.R
248         rm -f $@
249         ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_3" --remember-file $@
250
251 robustness_3_dv_proflik_jobs: grid_sweep.py 03_depvar.R simulation_base.R
252         rm -f $@
253         ${srun} ./$< --command 'Rscript 03_depvar.R'  --arg_dict '{"N":[1000],"m":[100], "seed":${seeds}, "outfile":["robustness_3_dv_proflik.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1],"B0":[0,0.405,0.846,1.386,2.197,2.944], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.85],"confint_method":['spline']}' --outfile $@
254
255 robustness_3_dv_proflik.feather: robustness_3_dv_proflik_jobs
256         rm -f $@
257         $(eval END_1!=cat robustness_3_dv_proflik_jobs | wc -l)
258         $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
259         $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_dv_proflik_jobs;)
260
261 robustness_3_dv_proflik.RDS: plot_dv_example.R robustness_3_dv_proflik.feather summarize_estimator.R
262         rm -f $@
263         ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_3_dv_proflik" --remember-file $@
264
265
266  robustness_3_dv_jobs_p1: grid_sweep.py 03_depvar.R simulation_base.R
267         rm -f $@
268         ${srun} ./$< --command 'Rscript 03_depvar.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_3_dv.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1],"B0":[0,0.405], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.85]}' --outfile $@
269
270 robustness_3_dv_jobs_p2: grid_sweep.py 03_depvar.R simulation_base.R
271         rm -f $@
272         ${srun} ./$< --command 'Rscript 03_depvar.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_3_dv.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1],"B0":[0.847,1.386], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.85]}' --outfile $@
273
274
275 robustness_3_dv_jobs_p3: grid_sweep.py 03_depvar.R simulation_base.R
276         rm -f $@
277         ${srun} ./$< --command 'Rscript 03_depvar.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_3_dv.feather"],"y_explained_variance":${explained_variances},  "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1], "B0":[2.197,2.944], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.85]}' --outfile $@
278
279 robustness_3_dv.feather: robustness_3_dv_jobs_p1 robustness_3_dv_jobs_p2 robustness_3_dv_jobs_p3
280         rm -f $@
281         $(eval END_1!=cat robustness_3_dv_jobs_p1 | wc -l)
282         $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
283         $(eval END_2!=cat robustness_3_dv_jobs_p2 | wc -l)
284         $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
285         $(eval END_3!=cat robustness_3_dv_jobs_p3 | wc -l)
286         $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
287
288         $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_dv_jobs_p1;)
289         $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_dv_jobs_p2;)
290          $(foreach item,$(ITEMS_3),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_dv_jobs_p3;)
291
292
293 robustness_3_dv.RDS: plot_dv_example.R robustness_3_dv.feather summarize_estimator.R
294         rm -f $@
295         ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_3_dv" --remember-file $@
296
297
298
299 robustness_4_jobs_p1: grid_sweep.py 02_indep_differential.R simulation_base.R
300         rm -f $@
301         ${srun} ./$< --command 'Rscript 02_indep_differential.R' --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_4.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x+z"], "truth_formula":["x~z"], "y_bias":[-2.944,-2.197]}' --outfile $@
302
303 robustness_4_jobs_p2: grid_sweep.py 02_indep_differential.R simulation_base.R
304         rm -f $@
305         ${srun} ./$< --command 'Rscript 02_indep_differential.R' --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_4.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x+z"], "truth_formula":["x~z"], "y_bias":[-1.386,-0.846]}' --outfile $@
306
307 robustness_4_jobs_p3: grid_sweep.py 02_indep_differential.R simulation_base.R
308         rm -f ./$@
309         ${srun} ./$< --command 'Rscript 02_indep_differential.R' --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_4.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x+z"], "truth_formula":["x~z"], "y_bias":[-0.405,-0.25]}' --outfile $@
310
311 robustness_4_jobs_p4: grid_sweep.py 02_indep_differential.R simulation_base.R
312         rm -f ./$@
313         ${srun} ./$< --command 'Rscript 02_indep_differential.R' --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_4.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x+z"], "truth_formula":["x~z"], "y_bias":[0,-0.1]}' --outfile $@
314
315
316 robustness_4.feather: robustness_4_jobs_p1 robustness_4_jobs_p2 robustness_4_jobs_p3
317         rm -f $@
318         $(eval END_1!=cat robustness_4_jobs_p1 | wc -l)
319         $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
320         $(eval END_2!=cat robustness_4_jobs_p2 | wc -l)
321         $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
322         $(eval END_3!=cat robustness_4_jobs_p3 | wc -l)
323         $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
324         $(eval END_4!=cat robustness_4_jobs_p3 | wc -l)
325         $(eval ITEMS_3!=seq $(START) $(STEP) $(END_4))
326
327
328         $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_4_jobs_p1;)
329         $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_4_jobs_p2;)
330         $(foreach item,$(ITEMS_3),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_4_jobs_p3;)
331         $(foreach item,$(ITEMS_4),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_4_jobs_p3;)
332
333
334 robustness_4.RDS: plot_example.R robustness_4.feather summarize_estimator.R
335         rm -f $@
336         ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_4" --remember-file $@
337
338
339 # '{"N":${robustness_Ns},"Bxy":[0.7],"Bzy":[-0.7],"m":${ms}, "seed":${seeds}, "outfile":["example_4.feather"], "z_bias":[0.5]}' --example_4_jobs
340
341 robustness_4_dv_jobs_p1: grid_sweep.py 04_depvar_differential.R simulation_base.R
342         rm -f $@
343         ${srun} ./$< --command 'Rscript 04_depvar_differential.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_4_dv.feather"], "Bzy":[-0.7],"Bxy":[0.7],"Bzx":[1], "outcome_formula":["y~x+z"], "z_bias":[0,0.1]}' --outfile $@
344
345 robustness_4_dv_jobs_p2: grid_sweep.py 04_depvar_differential.R simulation_base.R
346         rm -f $@
347         ${srun} ./$< --command 'Rscript 04_depvar_differential.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_4_dv.feather"], "Bzy":[-0.7],"Bxy":[0.7],"Bzx":[1], "outcome_formula":["y~x+z"], "z_bias":[0.25,0.405]}' --outfile $@
348
349 robustness_4_dv_jobs_p3: grid_sweep.py 04_depvar_differential.R simulation_base.R
350         rm -f $@
351         ${srun} ./$< --command 'Rscript 04_depvar_differential.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_4_dv.feather"], "Bzy":[-0.7],"Bxy":[0.7],"Bzx":[1],"outcome_formula":["y~x+z"],"z_bias":[0.846,1.386]}' --outfile $@ 
352
353 robustness_4_dv_jobs_p4: grid_sweep.py 04_depvar_differential.R simulation_base.R
354         rm -f $@
355         ${srun} ./$< --command 'Rscript 04_depvar_differential.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_4_dv.feather"],"Bzy":[-0.7],"Bxy":[0.7],"Bzx":[1], "outcome_formula":["y~x+z"], "z_bias":[2.197,2.944]}' --outfile $@
356
357 robustness_4_dv.feather: robustness_4_dv_jobs_p1 robustness_4_dv_jobs_p2 robustness_4_dv_jobs_p3 robustness_4_dv_jobs_p4
358         rm -f $@
359         $(eval END_1!=cat robustness_4_dv_jobs_p1 | wc -l)
360         $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
361         $(eval END_2!=cat robustness_4_dv_jobs_p2 | wc -l)
362         $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
363         $(eval END_3!=cat robustness_4_dv_jobs_p3 | wc -l)
364         $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
365         $(eval END_4!=cat robustness_4_dv_jobs_p4 | wc -l)
366         $(eval ITEMS_4!=seq $(START) $(STEP) $(END_4))
367         $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_4_dv_jobs_p1;)
368         $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_4_dv_jobs_p2;)
369         $(foreach item,$(ITEMS_3),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_4_dv_jobs_p3;)
370         $(foreach item,$(ITEMS_4),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_4_dv_jobs_p4;)
371
372
373 robustness_4_dv.RDS: plot_dv_example.R robustness_4_dv.feather summarize_estimator.R
374         rm -f $@
375         ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_4_dv" --remember-file $@
376
377
378 robustness_5_jobs_p1: grid_sweep.py 02_indep_differential.R simulation_base.R
379         rm -f $@
380         ${srun} ./$< --command 'Rscript 02_indep_differential.R' --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_5.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[1.386,2.197], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x+z"], "truth_formula":["x~z"]}' --outfile $@
381
382 robustness_5_jobs_p2: grid_sweep.py 02_indep_differential.R simulation_base.R
383         rm -f $@
384         ${srun} ./$< --command 'Rscript 02_indep_differential.R' --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_5.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.405,0.846], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x+z"], "truth_formula":["x~z"]}' --outfile $@
385
386 robustness_5_jobs_p3: grid_sweep.py 02_indep_differential.R simulation_base.R
387         rm -f $@
388         ${srun} ./$< --command 'Rscript 02_indep_differential.R' --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_5.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0,0.25], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x+z"], "truth_formula":["x~z"]}' --outfile $@
389
390 robustness_5_jobs_p4: grid_sweep.py 02_indep_differential.R simulation_base.R
391         rm -f $@
392         ${srun} ./$< --command 'Rscript 02_indep_differential.R' --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_5.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[2.944], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x+z"], "truth_formula":["x~z"]}' --outfile $@
393
394
395 robustness_5.feather: robustness_5_jobs_p1 robustness_5_jobs_p2 robustness_5_jobs_p3
396         rm -f $@
397         $(eval END_1!=cat robustness_5_jobs_p1 | wc -l)
398         $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
399         $(eval END_2!=cat robustness_5_jobs_p2 | wc -l)
400         $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
401         $(eval END_3!=cat robustness_5_jobs_p3 | wc -l)
402         $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
403         $(eval END_4!=cat robustness_5_jobs_p4 | wc -l)
404         $(eval ITEMS_4!=seq $(START) $(STEP) $(END_4))
405
406         $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_5_jobs_p1;)
407         $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_5_jobs_p2;)
408         $(foreach item,$(ITEMS_3),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_5_jobs_p3;)
409         $(foreach item,$(ITEMS_4),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_5_jobs_p4;)
410
411 robustness_5.RDS: plot_example.R robustness_5.feather summarize_estimator.R
412         rm -f $@
413         ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_5" --remember-file $@
414
415
416 # '{"N":${robustness_Ns},"Bxy":[0.7],"Bzy":[-0.7],"m":${ms}, "seed":${seeds}, "outfile":["example_4.feather"], "z_bias":[0.5]}' --example_4_jobs
417
418 robustness_5_dv_jobs_p1: grid_sweep.py 04_depvar_differential.R simulation_base.R
419         rm -f $@
420          ${srun} ./$< --command 'Rscript 04_depvar_differential.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_5_dv.feather"], "Bzy":[-0.7],"Bxy":[0.7],"Bzx":[0,0.25], "outcome_formula":["y~x+z"], "z_bias":[-0.5]}' --outfile $@
421
422 robustness_5_dv_jobs_p2: grid_sweep.py 04_depvar_differential.R simulation_base.R
423         rm -f $@
424         ${srun} ./$< --command 'Rscript 04_depvar_differential.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_5_dv.feather"], "Bzy":[-0.7],"Bxy":[0.7],"Bzx":[0.405,0.846], "outcome_formula":["y~x+z"],  "z_bias":[-0.5]}' --outfile $@
425
426 robustness_5_dv_jobs_p3: grid_sweep.py 04_depvar_differential.R simulation_base.R
427         rm -f $@
428         ${srun} ./$< --command 'Rscript 04_depvar_differential.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_5_dv.feather"], "Bzy":[-0.7],"Bxy":[0.7],"Bzx":[1.386,2.197],"outcome_formula":["y~x+z"], "z_bias":[-0.5]}' --outfile $@ 
429
430 robustness_5_dv_jobs_p4: grid_sweep.py 04_depvar_differential.R simulation_base.R
431         rm -f $@
432         ${srun} ./$< --command 'Rscript 04_depvar_differential.R'  --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_5_dv.feather"],"Bzy":[-0.7],"Bxy":[0.7],"Bzx":[2.944], "outcome_formula":["y~x+z"], "z_bias":[-0.5]}' --outfile $@
433
434 robustness_5_dv.feather: robustness_5_dv_jobs_p1 robustness_5_dv_jobs_p2 robustness_5_dv_jobs_p3 robustness_5_dv_jobs_p4
435         rm -f $@
436         $(eval END_1!=cat robustness_5_dv_jobs_p1 | wc -l)
437         $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
438         $(eval END_2!=cat robustness_5_dv_jobs_p2 | wc -l)
439         $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
440         $(eval END_3!=cat robustness_5_dv_jobs_p3 | wc -l)
441         $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
442         $(eval END_4!=cat robustness_5_dv_jobs_p4 | wc -l)
443         $(eval ITEMS_4!=seq $(START) $(STEP) $(END_4))
444
445
446         $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_5_dv_jobs_p1;)
447         $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_5_dv_jobs_p2;)
448         $(foreach item,$(ITEMS_3),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_5_dv_jobs_p3;)
449         $(foreach item,$(ITEMS_4),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_5_dv_jobs_p4;)
450
451
452 robustness_5_dv.RDS: plot_dv_example.R robustness_5_dv.feather summarize_estimator.R
453         rm -f $@
454         ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_5_dv" --remember-file $@
455
456
457 clean_main:
458         rm -f remembr.RDS
459         rm -f example_1_jobs
460         rm -f example_2_jobs
461         rm -f example_3_jobs
462         rm -f example_4_jobs
463         rm -f example_1.feather
464         rm -f example_2.feather
465         rm -f example_3.feather
466         rm -f example_4.feather
467
468
469 #       
470 clean_all:
471         rm *.feather
472         rm -f remembr.RDS
473         rm -f remembr*.RDS
474         rm -f robustness*.RDS
475         rm -f example_*_jobs
476         rm -f robustness_*_jobs_*
477 #       sbatch --wait --verbose --array=3001-6001 run_simulation.sbatch 0 example_2_B_jobs
478
479 # example_2_B_mecor_jobs:
480 #       sbatch --wait --verbose run_job.sbatch grid_sweep.py --command "Rscript example_2_B_mecor.R" --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["example_2_B_mecor.feather"]}' --outfile example_2_B_mecor_jobs
481
482 # example_2_B_mecor.feather:example_2_B_mecor.R example_2_B_mecor_jobs
483 #       rm -f example_2_B_mecor.feather
484 #       sbatch --wait --verbose --array=1-3000 run_simulation.sbatch 0 example_2_B_mecor_jobs
485 #       sbatch --wait --verbose --array=3001-6001 run_simulation.sbatch 0 example_2_B_mecor_jobs
486
487 robustness_6_jobs_p1: grid_sweep.py 03_indep_differential_nonnorm.R simulation_base.R
488         rm -f $@
489         ${srun} ./$< --command 'Rscript 03_indep_differential_nonnorm.R' --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_6.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x+z"], "truth_formula":["x~z"],"sd_y_mixin":[0,1,2.5]}' --outfile $@
490
491 robustness_6_jobs_p2: grid_sweep.py 03_indep_differential_nonnorm.R simulation_base.R
492         rm -f $@
493         ${srun} ./$< --command 'Rscript 03_indep_differential_nonnorm.R' --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_6.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x+z"], "truth_formula":["x~z"],"sd_y_mixin":[5,10]}' --outfile $@
494
495 robustness_6_jobs_p3: grid_sweep.py 03_indep_differential_nonnorm.R simulation_base.R
496         rm -f $@
497         ${srun} ./$< --command 'Rscript 03_indep_differential_nonnorm.R' --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_6.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x+z"], "truth_formula":["x~z"],"sd_y_mixin":[0,1,2.5],"y_bias":[0]}' --outfile $@
498
499 robustness_6_jobs_p4: grid_sweep.py 03_indep_differential_nonnorm.R simulation_base.R
500         rm -f $@
501         ${srun} ./$< --command 'Rscript 03_indep_differential_nonnorm.R' --arg_dict '{"N":${robustness_Ns},"m":${robustness_ms}, "seed":${seeds}, "outfile":["robustness_6.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x+z"], "truth_formula":["x~z"],"sd_y_mixin":[5,10],"y_bias":[0]}' --outfile $@
502
503
504 robustness_6.feather: robustness_6_jobs_p1 robustness_6_jobs_p2 robustness_6_jobs_p3 robustness_6_jobs_p4
505         rm -f $@
506         $(eval END_1!=cat robustness_6_jobs_p1 | wc -l)
507         $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
508         $(eval END_2!=cat robustness_6_jobs_p2 | wc -l)
509         $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
510         $(eval END_3!=cat robustness_6_jobs_p3 | wc -l)
511         $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
512         $(eval END_4!=cat robustness_6_jobs_p4 | wc -l)
513         $(eval ITEMS_4!=seq $(START) $(STEP) $(END_4))
514
515
516         # $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_6_jobs_p1;)
517         # $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_6_jobs_p2;)
518         # $(foreach item,$(ITEMS_3),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_6_jobs_p3;)
519         $(foreach item,$(ITEMS_4),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_6_jobs_p4;)
520
521
522 robustness_6.RDS: plot_example.R robustness_6.feather summarize_estimator.R
523         rm -f $@
524         ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_6" --remember-file $@
525
526
527 .PHONY: supplement

Community Data Science Collective || Want to submit a patch?