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_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) run_simulation.sbatch 0 example_2_jobs
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],"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],"m":${ms}, "seed":${seeds}, "outfile":["example_4.feather"], "z_bias":[0.3], "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-3000 run_simulation.sbatch 0 example_4_jobs
76 sbatch --wait --verbose --array=3001-4000 run_simulation.sbatch 0 example_4_jobs
77 sbatch --wait --verbose --array=4001-$(shell cat example_4_jobs | wc -l) run_simulation.sbatch 0 example_4_jobs
81 remembr.RDS:example_1.feather example_2.feather example_3.feather example_4.feather plot_example.R plot_dv_example.R summarize_estimator.R
83 ${srun} Rscript plot_example.R --infile example_1.feather --name "plot.df.example.1"
84 ${srun} Rscript plot_example.R --infile example_2.feather --name "plot.df.example.2"
85 ${srun} Rscript plot_dv_example.R --infile example_3.feather --name "plot.df.example.3"
86 ${srun} Rscript plot_dv_example.R --infile example_4.feather --name "plot.df.example.4"
89 robustness_1_jobs: 02_indep_differential.R simulation_base.R grid_sweep.py
90 sbatch --wait --verbose run_job.sbatch grid_sweep.py --command "Rscript 02_indep_differential.R" --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_1.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~1"]}' --outfile robustness_1_jobs
98 robustness_1.feather: robustness_1_jobs
99 $(eval END_1!=cat robustness_1_jobs | wc -l)
100 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
101 rm -f robustness_1.feather
102 sbatch --wait --verbose --array=1-1000 run_simulation.sbatch 0 robustness_1_jobs
103 sbatch --wait --verbose --array=1001-2000 run_simulation.sbatch 0 robustness_1_jobs
104 sbatch --wait --verbose --array=2001-3000 run_simulation.sbatch 0 robustness_1_jobs
105 sbatch --wait --verbose --array=3001-4000 run_simulation.sbatch 0 robustness_1_jobs
106 sbatch --wait --verbose --array=4001-$(shell cat robustness_1_jobs | wc -l) run_simulation.sbatch 0 robustness_1_jobs
108 $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_1_jobs;)
110 robustness_1.RDS: robustness_1.feather
111 rm -f robustness_1.RDS
112 ${srun} Rscript plot_example.R --infile $< --name "robustness_1" --remember-file $@
114 robustness_1_dv_jobs: simulation_base.R 04_depvar_differential.R grid_sweep.py
115 ${srun} grid_sweep.py --command 'Rscript 04_depvar_differential.R' --arg_dict '{"N":${Ns},"Bxy":[0.7],"Bzy":[-0.7],"m":${ms}, "seed":${seeds}, "outfile":["robustness_1_dv.feather"], "proxy_formula":["w_pred~y"],"z_bias":[0.5]}' --outfile robustness_1_dv_jobs
117 robustness_1_dv.feather: robustness_1_dv_jobs
118 rm -f robustness_1_dv.feather
119 $(eval END_1!=cat robustness_1_dv_jobs | wc -l)
120 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
121 $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_1_dv_jobs;)
124 robustness_1_dv.RDS: robustness_1_dv.feather
126 ${srun} Rscript plot_dv_example.R --infile $< --name "robustness_1_dv" --remember-file $@
129 robustness_2_jobs_p1: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
131 ${srun} $< --command 'Rscript 01_two_covariates.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_2.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~z"], "prediction_accuracy":[0.60,0.65]}' --outfile $@
133 robustness_2_jobs_p2: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
135 ${srun} $< --command 'Rscript 01_two_covariates.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_2.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~z"], "prediction_accuracy":[0.70,0.75]}' --outfile $@
137 robustness_2_jobs_p3: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
139 ${srun} $< --command 'Rscript 01_two_covariates.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_2.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~z"], "prediction_accuracy":[0.80,0.85]}' --outfile $@
141 robustness_2_jobs_p4: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
143 ${srun} $< --command 'Rscript 01_two_covariates.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_2.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~z"], "prediction_accuracy":[0.90,0.95]}' --outfile $@
145 robustness_2.feather: robustness_2_jobs_p1 robustness_2_jobs_p2 robustness_2_jobs_p3 robustness_2_jobs_p4
146 $(eval END_1!=cat robustness_2_jobs_p1 | wc -l)
147 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
148 $(eval END_2!=cat robustness_2_jobs_p2 | wc -l)
149 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
150 $(eval END_3!=cat robustness_2_jobs_p3 | wc -l)
151 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
152 $(eval END_4!=cat robustness_2_jobs_p4 | wc -l)
153 $(eval ITEMS_4!=seq $(START) $(STEP) $(END_4))
155 $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_2_jobs_p1;)
156 $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_2_jobs_p2;)
157 $(foreach item,$(ITEMS_3),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_2_jobs_p3;)
158 $(foreach item,$(ITEMS_4),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_2_jobs_p4;)
160 robustness_2.RDS: plot_example.R robustness_2.feather
162 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_2" --remember-file $@
164 robustness_2_dv_jobs_p1: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
166 ${srun} $< --command 'Rscript 03_depvar.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_2_dv.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.60,0.65]}' --outfile $@
168 robustness_2_dv_jobs_p2: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
170 ${srun} $< --command 'Rscript 03_depvar.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_2_dv.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.70,0.75]}' --outfile $@
172 robustness_2_dv_jobs_p3: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
174 ${srun} $< --command 'Rscript 03_depvar.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_2_dv.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.80,0.85]}' --outfile $@
176 robustness_2_dv_jobs_p4: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
178 ${srun} $< --command 'Rscript 03_depvar.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_2_dv.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.90,0.95]}' --outfile $@
180 robustness_2_dv.feather: robustness_2_dv_jobs_p1 robustness_2_dv_jobs_p2 robustness_2_dv_jobs_p3 robustness_2_dv_jobs_p4
181 $(eval END_1!=cat robustness_2_dv_jobs_p1 | wc -l)
182 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
183 $(eval END_2!=cat robustness_2_dv_jobs_p2 | wc -l)
184 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
185 $(eval END_3!=cat robustness_2_dv_jobs_p3 | wc -l)
186 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
187 $(eval END_4!=cat robustness_2_dv_jobs_p4 | wc -l)
188 $(eval ITEMS_4!=seq $(START) $(STEP) $(END_4))
190 $(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;)
191 $(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;)
192 $(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;)
193 $(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;)
195 robustness_2_dv.RDS: plot_example.R robustness_2_dv.feather
197 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_2_dv" --remember-file $@
200 robustness_3_jobs_p1: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
202 ${srun} $< --command 'Rscript 01_two_covariates.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_3.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3],"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 $@
204 robustness_3_jobs_p2: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
206 ${srun} $< --command 'Rscript 01_two_covariates.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_3.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3],"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 $@
208 robustness_3_jobs_p3: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
210 ${srun} $< --command 'Rscript 01_two_covariates.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_3.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3],"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 $@
212 robustness_3.feather: robustness_3_jobs_p1 robustness_3_jobs_p2 robustness_3_jobs_p3
213 $(eval END_1!=cat robustness_3_jobs_p1 | wc -l)
214 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
215 $(eval END_2!=cat robustness_3_jobs_p2 | wc -l)
216 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
217 $(eval END_3!=cat robustness_3_jobs_p3 | wc -l)
218 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
220 $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_jobs_p1;)
221 $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_jobs_p2;)
222 $(foreach item,$(ITEMS_3),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_jobs_p3;)
224 robustness_3.RDS: plot_example.R robustness_3.feather
226 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_3" --remember-file $@
228 robustness_3_dv_jobs_p1: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
230 ${srun} $< --command 'Rscript 03_depvar.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_3_dv.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3],"B0":[0.5,0.6], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.85]}' --outfile $@
234 robustness_3_dv_jobs_p2: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
236 ${srun} $< --command 'Rscript 03_depvar.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_3_dv.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3],"B0":[0.7,0.8], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.85]}' --outfile $@
239 robustness_3_dv_jobs_p3: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
241 ${srun} $< --command 'Rscript 03_depvar.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_3_dv.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3], "B0":[0.9,0.95], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.85]}' --outfile $@
243 robustness_3_dv.feather: robustness_3_dv_jobs_p1 robustness_3_dv_jobs_p2 robustness_3_dv_jobs_p3
244 $(eval END_1!=cat robustness_3_dv_jobs_p1 | wc -l)
245 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
246 $(eval END_2!=cat robustness_3_dv_jobs_p2 | wc -l)
247 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
248 $(eval END_3!=cat robustness_3_dv_jobs_p3 | wc -l)
249 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
251 $(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;)
252 $(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;)
253 $(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;)
256 robustness_3_dv.RDS: plot_dv_example.R robustness_3_dv.feather
258 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_3_dv" --remember-file $@
261 robustness_4_jobs_p1: grid_sweep.py 02_indep_differential.R simulation_base.R grid_sweep.py
263 ${srun} $< --command 'Rscript 02_indep_differential.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_4.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~z"], "prediction_accuracy":[0.85],"y_bias":[-1,-0.85]}' --outfile $@
265 robustness_4_jobs_p2: grid_sweep.py 02_indep_differential.R simulation_base.R grid_sweep.py
267 ${srun} $< --command 'Rscript 02_indep_differential.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_4.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~z"], "prediction_accuracy":[0.85], "y_bias":[-0.70,-0.55]}' --outfile $@
269 robustness_4_jobs_p3: grid_sweep.py 02_indep_differential.R simulation_base.R grid_sweep.py
271 ${srun} $< --command 'Rscript 02_indep_differential.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_4.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~z"], "prediction_accuracy":[0.85],"y_bias":[-0.4,-0.25]}' --outfile $@
273 robustness_4_jobs_p4: grid_sweep.py 02_indep_differential.R simulation_base.R grid_sweep.py
275 ${srun} $< --command 'Rscript 02_indep_differential.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_4.feather"],"y_explained_variance":${explained_variances}, "Bzy":[-0.3],"Bxy":[0.3],"Bzx":[0.3], "outcome_formula":["y~x+z"], "proxy_formula":["w_pred~y+x"], "truth_formula":["x~z"], "prediction_accuracy":[0.85],"y_bias":[-0.1,0]}' --outfile $@
277 robustness_4.feather: robustness_4_jobs_p1 robustness_4_jobs_p2 robustness_4_jobs_p3
278 $(eval END_1!=cat robustness_4_jobs_p1 | wc -l)
279 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
280 $(eval END_2!=cat robustness_4_jobs_p2 | wc -l)
281 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
282 $(eval END_3!=cat robustness_4_jobs_p3 | wc -l)
283 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
285 $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_4_jobs_p1;)
286 $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_4_jobs_p2;)
287 $(foreach item,$(ITEMS_3),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_4_jobs_p3;)
289 robustness_4.RDS: plot_example.R robustness_4.feather
291 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_4" --remember-file $@
294 # '{"N":${Ns},"Bxy":[0.7],"Bzy":[-0.7],"m":${ms}, "seed":${seeds}, "outfile":["example_4.feather"], "z_bias":[0.5]}' --outfile example_4_jobs
296 robustness_4_dv_jobs_p1: grid_sweep.py 04_depvar_differential.R simulation_base.R grid_sweep.py
298 ${srun} $< --command 'Rscript 04_depvar_differential.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_4_dv.feather"], "Bzy":[-0.7],"Bxy":[0.7], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.85],"z_bias":[0,0.1]}' --outfile $@
300 robustness_4_dv_jobs_p2: grid_sweep.py 04_depvar_differential.R simulation_base.R grid_sweep.py
302 ${srun} $< --command 'Rscript 04_depvar_differential.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_4_dv.feather"], "Bzy":[-0.7],"Bxy":[0.7], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.85],"z_bias":[0.25,0.4]}' --outfile $@
304 robustness_4_dv_jobs_p3: grid_sweep.py 04_depvar_differential.R simulation_base.R grid_sweep.py
306 ${srun} $< --command 'Rscript 04_depvar_differential.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_4_dv.feather"], "Bzy":[-0.7],"Bxy":[0.7],"outcome_formula":["y~x+z"], "prediction_accuracy":[0.85],"z_bias":[0.55,0.7]}' --outfile $@
308 robustness_4_dv_jobs_p4: grid_sweep.py 04_depvar_differential.R simulation_base.R grid_sweep.py
310 ${srun} $< --command 'Rscript 04_depvar_differential.R' --arg_dict '{"N":${Ns},"m":${ms}, "seed":${seeds}, "outfile":["robustness_4_dv.feather"],"Bzy":[-0.7],"Bxy":[0.7], "outcome_formula":["y~x+z"], "prediction_accuracy":[0.85],"z_bias":[0.85,1]}' --outfile $@
312 robustness_4_dv.feather: robustness_4_dv_jobs_p1 robustness_4_dv_jobs_p2 robustness_4_dv_jobs_p3
313 $(eval END_1!=cat robustness_4_dv_jobs_p1 | wc -l)
314 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
315 $(eval END_2!=cat robustness_4_dv_p2 | wc -l)
316 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
317 $(eval END_3!=cat robustness_4_dv_p3 | wc -l)
318 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
320 $(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;)
321 $(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;)
322 $(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;)
325 robustness_4_dv.RDS: plot_dv_example.R robustness_4_dv.feather
327 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_4" --remember-file $@
337 rm -f example_1.feather
338 rm -f example_2.feather
339 rm -f example_3.feather
340 rm -f example_4.feather
348 rm -f robustness*.RDS
350 rm -f robustness_*_jobs_*
351 # sbatch --wait --verbose --array=3001-6001 run_simulation.sbatch 0 example_2_B_jobs
353 # example_2_B_mecor_jobs:
354 # 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
356 # example_2_B_mecor.feather:example_2_B_mecor.R example_2_B_mecor_jobs
357 # rm -f example_2_B_mecor.feather
358 # sbatch --wait --verbose --array=1-3000 run_simulation.sbatch 0 example_2_B_mecor_jobs
359 # sbatch --wait --verbose --array=3001-6001 run_simulation.sbatch 0 example_2_B_mecor_jobs