6 seeds=[$(shell seq -s, 1 500)]
7 explained_variances=[0.1]
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
13 srun=sbatch --wait --verbose run_job.sbatch
16 joblists:example_1_jobs example_2_jobs example_3_jobs
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
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
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
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-4000 run_simulation.sbatch 0 example_1_jobs
36 sbatch --wait --verbose --array=4001-$(shell cat example_1_jobs | wc -l) run_simulation.sbatch 0 example_1_jobs
38 example_2_jobs: 02_indep_differential.R simulation_base.R grid_sweep.py pl_methods.R
39 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
41 example_2.feather: example_2_jobs
42 rm -f example_2.feather
43 sbatch --wait --verbose --array=1-1000 run_simulation.sbatch 0 example_2_jobs
44 sbatch --wait --verbose --array=1001-2000 run_simulation.sbatch 0 example_2_jobs
45 sbatch --wait --verbose --array=2001-3000 run_simulation.sbatch 0 example_2_jobs
46 sbatch --wait --verbose --array=3001-4000 run_simulation.sbatch 0 example_2_jobs
47 sbatch --wait --verbose --array=4001-$(shell cat example_2_jobs | wc -l)
50 # example_2_B_jobs: example_2_B.R
51 # sbatch --wait --verbose run_job.sbatch 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
53 # example_2_B.feather: example_2_B_jobs
54 # rm -f example_2_B.feather
55 # sbatch --wait --verbose --array=1-3000 run_simulation.sbatch 0 example_2_B_jobs
57 example_3_jobs: 03_depvar.R simulation_base.R grid_sweep.py pl_methods.R
58 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
60 example_3.feather: example_3_jobs
61 rm -f example_3.feather
62 sbatch --wait --verbose --array=1-1000 run_simulation.sbatch 0 example_3_jobs
63 sbatch --wait --verbose --array=1001-2000 run_simulation.sbatch 0 example_3_jobs
64 sbatch --wait --verbose --array=2001-3000 run_simulation.sbatch 0 example_3_jobs
65 sbatch --wait --verbose --array=3001-4000 run_simulation.sbatch 0 example_3_jobs
66 sbatch --wait --verbose --array=4001-$(shell cat example_3_jobs | wc -l) run_simulation.sbatch 0 example_3_jobs
68 example_4_jobs: 04_depvar_differential.R simulation_base.R grid_sweep.py pl_methods.R
69 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
71 example_4.feather: example_4_jobs
72 rm -f example_4.feather
73 sbatch --wait --verbose --array=1-1000 run_simulation.sbatch 0 example_4_jobs
74 sbatch --wait --verbose --array=1001-2000 run_simulation.sbatch 0 example_4_jobs
75 sbatch --wait --verbose --array=2001-3001 run_simulation.sbatch 0 example_4_jobs
76 sbatch --wait --verbose --array=2001-3000 run_simulation.sbatch 0 example_4_jobs
77 sbatch --wait --verbose --array=3001-4000 run_simulation.sbatch 0 example_4_jobs
78 sbatch --wait --verbose --array=4001-$(shell cat example_4_jobs | wc -l) run_simulation.sbatch 0 example_4_jobs
82 remembr.RDS:example_1.feather example_2.feather example_3.feather example_4.feather plot_example.R plot_dv_example.R summarize_estimator.R
84 ${srun} Rscript plot_example.R --infile example_1.feather --name "plot.df.example.1"
85 ${srun} Rscript plot_example.R --infile example_2.feather --name "plot.df.example.2"
86 ${srun} Rscript plot_dv_example.R --infile example_3.feather --name "plot.df.example.3"
87 ${srun} Rscript plot_dv_example.R --infile example_4.feather --name "plot.df.example.4"
94 robustness_Ns=[1000,5000]
95 robustness_robustness_ms=[100,200]
97 #in robustness 1 / example 2 misclassification is correlated with Y.
98 robustness_1_jobs_p1: 02_indep_differential.R simulation_base.R grid_sweep.py
99 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
101 robustness_1_jobs_p2: 02_indep_differential.R simulation_base.R grid_sweep.py
102 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
104 robustness_1.feather: robustness_1_jobs_p1 robustness_1_jobs_p2
106 $(eval END_1!=cat robustness_1_jobs_p1 | wc -l)
107 $(eval ITEROBUSTNESS_MS_1!=seq $(START) $(STEP) $(END_1))
108 $(eval END_2!=cat robustness_1_jobs_p2 | wc -l)
109 $(eval ITEROBUSTNESS_MS_2!=seq $(START) $(STEP) $(END_2))
111 $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_1_jobs_p1;)
112 $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_1_jobs_p2;)
114 robustness_1.RDS: robustness_1.feather summarize_estimator.R
115 rm -f robustness_1.RDS
116 ${srun} Rscript plot_example.R --infile $< --name "robustness_1" --remember-file $@
118 # 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.
119 robustness_1_dv_jobs_p1: simulation_base.R 04_depvar_differential.R grid_sweep.py
120 ${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
122 robustness_1_dv_jobs_p2: simulation_base.R 04_depvar_differential.R grid_sweep.py
123 ${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
125 robustness_1_dv.feather: robustness_1_dv_jobs_p1 robustness_1_dv_jobs_p2
127 $(eval END_1!=cat robustness_1_dv_jobs_p1 | wc -l)
128 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
129 $(eval END_2!=cat robustness_1_dv_jobs_p2 | wc -l)
130 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_1))
131 $(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;)
132 $(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;)
134 robustness_1_dv.RDS: robustness_1_dv.feather summarize_estimator.R
136 ${srun} Rscript plot_dv_example.R --infile $< --name "robustness_1_dv" --remember-file $@
139 robustness_2_jobs_p1: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
141 ${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 $@
143 robustness_2_jobs_p2: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
145 ${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 $@
147 robustness_2_jobs_p3: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
149 ${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 $@
151 robustness_2_jobs_p4: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
153 ${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 $@
155 robustness_2.feather: robustness_2_jobs_p1 robustness_2_jobs_p2 robustness_2_jobs_p3 robustness_2_jobs_p4
157 $(eval END_1!=cat robustness_2_jobs_p1 | wc -l)
158 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
159 $(eval END_2!=cat robustness_2_jobs_p2 | wc -l)
160 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
161 $(eval END_3!=cat robustness_2_jobs_p3 | wc -l)
162 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
163 $(eval END_4!=cat robustness_2_jobs_p4 | wc -l)
164 $(eval ITEMS_4!=seq $(START) $(STEP) $(END_4))
166 $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_2_jobs_p1;)
167 $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_2_jobs_p2;)
168 $(foreach item,$(ITEMS_3),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_2_jobs_p3;)
169 $(foreach item,$(ITEMS_4),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_2_jobs_p4;)
171 robustness_2.RDS: plot_example.R robustness_2.feather summarize_estimator.R
173 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_2" --remember-file $@
175 robustness_2_dv_jobs_p1: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
177 ${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 $@
179 robustness_2_dv_jobs_p2: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
181 ${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 $@
183 robustness_2_dv_jobs_p3: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
185 ${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 $@
187 robustness_2_dv_jobs_p4: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
189 ${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 $@
191 robustness_2_dv.feather: robustness_2_dv_jobs_p1 robustness_2_dv_jobs_p2 robustness_2_dv_jobs_p3 robustness_2_dv_jobs_p4
193 $(eval END_1!=cat robustness_2_dv_jobs_p1 | wc -l)
194 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
195 $(eval END_2!=cat robustness_2_dv_jobs_p2 | wc -l)
196 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
197 $(eval END_3!=cat robustness_2_dv_jobs_p3 | wc -l)
198 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
199 $(eval END_4!=cat robustness_2_dv_jobs_p4 | wc -l)
200 $(eval ITEMS_4!=seq $(START) $(STEP) $(END_4))
202 $(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;)
203 $(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;)
204 $(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;)
205 $(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;)
207 robustness_2_dv.RDS: plot_dv_example.R robustness_2_dv.feather summarize_estimator.R
209 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_2_dv" --remember-file $@
212 robustness_3_proflik_jobs: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
214 ${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 $@
216 robustness_3_proflik.feather: robustness_3_proflik_jobs
218 $(eval END_1!=cat robustness_3_proflik_jobs | wc -l)
219 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
220 $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_proflik_jobs;)
222 robustness_3_proflik.RDS: plot_example.R robustness_3_proflik.feather summarize_estimator.R
224 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_3_proflik" --remember-file $@
227 robustness_3_jobs_p1: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
229 ${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 $@
231 robustness_3_jobs_p2: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
233 ${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 $@
235 robustness_3_jobs_p3: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
237 ${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 $@
239 robustness_3.feather: robustness_3_jobs_p1 robustness_3_jobs_p2 robustness_3_jobs_p3
241 $(eval END_1!=cat robustness_3_jobs_p1 | wc -l)
242 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
243 $(eval END_2!=cat robustness_3_jobs_p2 | wc -l)
244 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
245 $(eval END_3!=cat robustness_3_jobs_p3 | wc -l)
246 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
248 $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_jobs_p1;)
249 $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_jobs_p2;)
250 $(foreach item,$(ITEMS_3),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_jobs_p3;)
252 robustness_3.RDS: plot_example.R robustness_3.feather summarize_estimator.R
254 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_3" --remember-file $@
256 robustness_3_dv_proflik_jobs: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
258 ${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 $@
260 robustness_3_dv_proflik.feather: robustness_3_dv_proflik_jobs
262 $(eval END_1!=cat robustness_3_dv_proflik_jobs | wc -l)
263 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
264 $(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;)
266 robustness_3_dv_proflik.RDS: plot_dv_example.R robustness_3_dv_proflik.feather summarize_estimator.R
268 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_3_dv_proflik" --remember-file $@
271 robustness_3_dv_jobs_p1: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
273 ${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 $@
277 robustness_3_dv_jobs_p2: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
279 ${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 $@
282 robustness_3_dv_jobs_p3: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
284 ${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 $@
286 robustness_3_dv.feather: robustness_3_dv_jobs_p1 robustness_3_dv_jobs_p2 robustness_3_dv_jobs_p3
288 $(eval END_1!=cat robustness_3_dv_jobs_p1 | wc -l)
289 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
290 $(eval END_2!=cat robustness_3_dv_jobs_p2 | wc -l)
291 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
292 $(eval END_3!=cat robustness_3_dv_jobs_p3 | wc -l)
293 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
295 $(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;)
296 $(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;)
297 $(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;)
300 robustness_3_dv.RDS: plot_dv_example.R robustness_3_dv.feather summarize_estimator.R
302 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_3_dv" --remember-file $@
306 robustness_4_jobs_p1: grid_sweep.py 02_indep_differential.R simulation_base.R grid_sweep.py
308 ${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"], "truth_formula":["x~z"], "prediction_accuracy":[0.85],"y_bias":[-2.944,-2.197]}' --outfile $@
310 robustness_4_jobs_p2: grid_sweep.py 02_indep_differential.R simulation_base.R grid_sweep.py
312 ${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"], "truth_formula":["x~z"], "prediction_accuracy":[0.85], "y_bias":[-1.386,-0.846]}' --outfile $@
314 robustness_4_jobs_p3: grid_sweep.py 02_indep_differential.R simulation_base.R grid_sweep.py
316 ${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"], "truth_formula":["x~z"], "prediction_accuracy":[0.85],"y_bias":[-0.405,-0.25]}' --outfile $@
318 robustness_4.feather: robustness_4_jobs_p1 robustness_4_jobs_p2 robustness_4_jobs_p3
320 $(eval END_1!=cat robustness_4_jobs_p1 | wc -l)
321 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
322 $(eval END_2!=cat robustness_4_jobs_p2 | wc -l)
323 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
324 $(eval END_3!=cat robustness_4_jobs_p3 | wc -l)
325 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
327 $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_4_jobs_p1;)
328 $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_4_jobs_p2;)
329 $(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 robustness_4.RDS: plot_example.R robustness_4.feather summarize_estimator.R
333 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_4" --remember-file $@
336 # '{"N":${robustness_Ns},"Bxy":[0.7],"Bzy":[-0.7],"m":${ms}, "seed":${seeds}, "outfile":["example_4.feather"], "z_bias":[0.5]}' --example_4_jobs
338 robustness_4_dv_jobs_p1: grid_sweep.py 04_depvar_differential.R simulation_base.R grid_sweep.py
340 ${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"], "prediction_accuracy":[0.85],"z_bias":[0,0.1]}' --outfile $@
342 robustness_4_dv_jobs_p2: grid_sweep.py 04_depvar_differential.R simulation_base.R grid_sweep.py
344 ${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"], "prediction_accuracy":[0.85],"z_bias":[0.25,0.405]}' --outfile $@
346 robustness_4_dv_jobs_p3: grid_sweep.py 04_depvar_differential.R simulation_base.R grid_sweep.py
348 ${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"], "prediction_accuracy":[0.85],"z_bias":[0.846,1.386]}' --outfile $@
350 robustness_4_dv_jobs_p4: grid_sweep.py 04_depvar_differential.R simulation_base.R grid_sweep.py
352 ${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"], "prediction_accuracy":[0.85],"z_bias":[2.197,2.944]}' --outfile $@
354 robustness_4_dv.feather: robustness_4_dv_jobs_p1 robustness_4_dv_jobs_p2 robustness_4_dv_jobs_p3 robustness_4_dv_jobs_p4
356 $(eval END_1!=cat robustness_4_dv_jobs_p1 | wc -l)
357 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
358 $(eval END_2!=cat robustness_4_dv_p2 | wc -l)
359 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
360 $(eval END_3!=cat robustness_4_dv_p3 | wc -l)
361 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
362 $(eval END_3!=cat robustness_4_dv_p4 | wc -l)
363 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
366 $(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;)
367 $(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;)
368 $(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;)
369 $(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;)
372 robustness_4_dv.RDS: plot_dv_example.R robustness_4_dv.feather summarize_estimator.R
374 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_4" --remember-file $@
383 rm -f example_1.feather
384 rm -f example_2.feather
385 rm -f example_3.feather
386 rm -f example_4.feather
394 rm -f robustness*.RDS
396 rm -f robustness_*_jobs_*
397 # sbatch --wait --verbose --array=3001-6001 run_simulation.sbatch 0 example_2_B_jobs
399 # example_2_B_mecor_jobs:
400 # 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
402 # example_2_B_mecor.feather:example_2_B_mecor.R example_2_B_mecor_jobs
403 # rm -f example_2_B_mecor.feather
404 # sbatch --wait --verbose --array=1-3000 run_simulation.sbatch 0 example_2_B_mecor_jobs
405 # sbatch --wait --verbose --array=3001-6001 run_simulation.sbatch 0 example_2_B_mecor_jobs