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.5]}' --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"
90 irr_ms = [150,300,600]
92 irr_explained_variances=${explained_variances}
93 irr_coder_accuracy=[0.80]
95 example_5_jobs: 05_irr_indep.R irr_simulation_base.R grid_sweep.py pl_methods.R measerr_methods.R
96 sbatch --wait --verbose run_job.sbatch grid_sweep.py --command "Rscript 05_irr_indep.R" --arg_dict '{"N":${irr_Ns},"m":${irr_ms}, "seed":${irr_seeds}, "outfile":["example_5.feather"], "y_explained_variance":${irr_explained_variances}, "coder_accuracy":${irr_coder_accuracy}}' --outfile example_5_jobs
98 example_5.feather:example_5_jobs
99 rm -f example_5.feather
100 sbatch --wait --verbose --array=1-1000 run_simulation.sbatch 0 example_5_jobs
101 sbatch --wait --verbose --array=1001-$(shell cat example_5_jobs | wc -l) run_simulation.sbatch 1000 example_5_jobs
102 # sbatch --wait --verbose --array=2001-3000 run_simulation.sbatch 2000 example_5_jobs
103 # sbatch --wait --verbose --array=3001-4000 run_simulation.sbatch 3000 example_5_jobs
104 # sbatch --wait --verbose --array=2001-$(shell cat example_5_jobs | wc -l) run_simulation.sbatch 4000 example_5_jobs
108 # example_6_jobs: 06_irr_dv.R irr_dv_simulation_base.R grid_sweep.py pl_methods.R
109 # sbatch --wait --verbose run_job.sbatch grid_sweep.py --command "Rscript 06_irr_dv.R" --arg_dict '{"N":${irr_Ns},"m":${irr_ms}, "seed":${irr_seeds}, "outfile":["example_6.feather"], "y_explained_variance":${irr_explained_variances},"coder_accuracy":${irr_coder_accuracy}}' --outfile example_6_jobs
111 # example_6.feather:example_6_jobs
112 # rm -f example_6.feather
113 # sbatch --wait --verbose --array=1-1000 run_simulation.sbatch 0 example_6_jobs
114 # sbatch --wait --verbose --array=1001-2000 run_simulation.sbatch 1000 example_6_jobs
115 # sbatch --wait --verbose --array=2001-$(shell cat example_6_jobs | wc -l) run_simulation.sbatch 2000 example_6_jobs
118 remember_irr.RDS: example_5.feather plot_irr_example.R plot_irr_dv_example.R summarize_estimator.R
119 rm -f remember_irr.RDS
120 sbatch --wait --verbose run_job.sbatch Rscript plot_irr_example.R --infile example_5.feather --name "plot.df.example.5"
121 # sbatch --wait --verbose run_job.sbatch Rscript plot_irr_dv_example.R --infile example_6.feather --name "plot.df.example.6"
124 robustness_1_jobs: 02_indep_differential.R simulation_base.R grid_sweep.py
125 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
133 robustness_1.feather: robustness_1_jobs
134 $(eval END_1!=cat robustness_1_jobs | wc -l)
135 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
136 rm -f robustness_1.feather
137 sbatch --wait --verbose --array=1-1000 run_simulation.sbatch 0 robustness_1_jobs
138 sbatch --wait --verbose --array=1001-2000 run_simulation.sbatch 0 robustness_1_jobs
139 sbatch --wait --verbose --array=2001-3000 run_simulation.sbatch 0 robustness_1_jobs
140 sbatch --wait --verbose --array=3001-4000 run_simulation.sbatch 0 robustness_1_jobs
141 sbatch --wait --verbose --array=4001-$(shell cat robustness_1_jobs | wc -l) run_simulation.sbatch 0 robustness_1_jobs
143 $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_1_jobs;)
145 robustness_1.RDS: robustness_1.feather
146 rm -f robustness_1.RDS
147 ${srun} Rscript plot_example.R --infile $< --name "robustness_1" --remember-file $@
149 robustness_1_dv_jobs: simulation_base.R 04_depvar_differential.R grid_sweep.py
150 ${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
152 robustness_1_dv.feather: robustness_1_dv_jobs
153 rm -f robustness_1_dv.feather
154 $(eval END_1!=cat robustness_1_dv_jobs | wc -l)
155 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
156 $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_1_dv_jobs;)
159 robustness_1_dv.RDS: robustness_1_dv.feather
161 ${srun} Rscript plot_dv_example.R --infile $< --name "robustness_1_dv" --remember-file $@
164 robustness_2_jobs_p1: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
166 ${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 $@
168 robustness_2_jobs_p2: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
170 ${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 $@
172 robustness_2_jobs_p3: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
174 ${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 $@
176 robustness_2_jobs_p4: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
178 ${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 $@
180 robustness_2.feather: robustness_2_jobs_p1 robustness_2_jobs_p2 robustness_2_jobs_p3 robustness_2_jobs_p4
181 $(eval END_1!=cat robustness_2_jobs_p1 | wc -l)
182 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
183 $(eval END_2!=cat robustness_2_jobs_p2 | wc -l)
184 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
185 $(eval END_3!=cat robustness_2_jobs_p3 | wc -l)
186 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
187 $(eval END_4!=cat robustness_2_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_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_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_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_jobs_p4;)
195 robustness_2.RDS: plot_example.R robustness_2.feather
197 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_2" --remember-file $@
199 robustness_2_dv_jobs_p1: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
201 ${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 $@
203 robustness_2_dv_jobs_p2: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
205 ${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 $@
207 robustness_2_dv_jobs_p3: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
209 ${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 $@
211 robustness_2_dv_jobs_p4: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
213 ${srun} $< --command 'Rscript 01_two_covariates.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 $@
215 robustness_2_dv.feather: robustness_2_dv_jobs_p1 robustness_2_dv_jobs_p2 robustness_2_dv_jobs_p3 robustness_2_dv_jobs_p4
216 $(eval END_1!=cat robustness_2_dv_jobs_p1 | wc -l)
217 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
218 $(eval END_2!=cat robustness_2_dv_jobs_p2 | wc -l)
219 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
220 $(eval END_3!=cat robustness_2_dv_jobs_p3 | wc -l)
221 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
222 $(eval END_4!=cat robustness_2_dv_jobs_p4 | wc -l)
223 $(eval ITEMS_4!=seq $(START) $(STEP) $(END_4))
225 $(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;)
226 $(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;)
227 $(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;)
228 $(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;)
230 robustness_2_dv.RDS: plot_example.R robustness_2_dv.feather
232 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_2_dv" --remember-file $@
235 robustness_3_jobs_p1: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
237 ${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 $@
239 robustness_3_jobs_p2: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
241 ${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 $@
243 robustness_3_jobs_p3: grid_sweep.py 01_two_covariates.R simulation_base.R grid_sweep.py
245 ${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 $@
247 robustness_3.feather: robustness_3_jobs_p1 robustness_3_jobs_p2 robustness_3_jobs_p3
248 $(eval END_1!=cat robustness_3_jobs_p1 | wc -l)
249 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
250 $(eval END_2!=cat robustness_3_jobs_p2 | wc -l)
251 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
252 $(eval END_3!=cat robustness_3_jobs_p3 | wc -l)
253 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
255 $(foreach item,$(ITEMS_1),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_jobs_p1;)
256 $(foreach item,$(ITEMS_2),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_jobs_p2;)
257 $(foreach item,$(ITEMS_3),sbatch --wait --verbose --array=$(shell expr $(item) + $(ONE))-$(shell expr $(item) + $(STEP)) run_simulation.sbatch 0 robustness_3_jobs_p3;)
259 robustness_3.RDS: plot_example.R robustness_3.feather
261 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_3" --remember-file $@
263 robustness_3_dv_jobs_p1: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
265 ${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 $@
269 robustness_3_dv_jobs_p2: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
271 ${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 $@
274 robustness_3_dv_jobs_p3: grid_sweep.py 03_depvar.R simulation_base.R grid_sweep.py
276 ${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 $@
278 robustness_3_dv.feather: robustness_3_dv_jobs_p1 robustness_3_dv_jobs_p2 robustness_3_dv_jobs_p3
279 $(eval END_1!=cat robustness_3_dv_jobs_p1 | wc -l)
280 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
281 $(eval END_2!=cat robustness_3_dv_jobs_p2 | wc -l)
282 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
283 $(eval END_3!=cat robustness_3_dv_jobs_p3 | wc -l)
284 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
286 $(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;)
287 $(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;)
288 $(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 robustness_3_dv.RDS: plot_dv_example.R robustness_3_dv.feather
293 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_3_dv" --remember-file $@
296 robustness_4_jobs_p1: grid_sweep.py 02_indep_differential.R simulation_base.R grid_sweep.py
298 ${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 $@
300 robustness_4_jobs_p2: grid_sweep.py 02_indep_differential.R simulation_base.R grid_sweep.py
302 ${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 $@
304 robustness_4_jobs_p3: grid_sweep.py 02_indep_differential.R simulation_base.R grid_sweep.py
306 ${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 $@
308 robustness_4_jobs_p4: grid_sweep.py 02_indep_differential.R simulation_base.R grid_sweep.py
310 ${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 $@
312 robustness_4.feather: robustness_4_jobs_p1 robustness_4_jobs_p2 robustness_4_jobs_p3
313 $(eval END_1!=cat robustness_4_jobs_p1 | wc -l)
314 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
315 $(eval END_2!=cat robustness_4_jobs_p2 | wc -l)
316 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
317 $(eval END_3!=cat robustness_4_jobs_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_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_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_jobs_p3;)
324 robustness_4.RDS: plot_example.R robustness_4.feather
326 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_4" --remember-file $@
329 # '{"N":${Ns},"Bxy":[0.7],"Bzy":[-0.7],"m":${ms}, "seed":${seeds}, "outfile":["example_4.feather"], "z_bias":[0.5]}' --outfile example_4_jobs
331 robustness_4_dv_jobs_p1: grid_sweep.py 04_depvar_differential.R simulation_base.R grid_sweep.py
333 ${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 $@
335 robustness_4_dv_jobs_p2: grid_sweep.py 04_depvar_differential.R simulation_base.R grid_sweep.py
337 ${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 $@
339 robustness_4_dv_jobs_p3: grid_sweep.py 04_depvar_differential.R simulation_base.R grid_sweep.py
341 ${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 $@
343 robustness_4_dv_jobs_p4: grid_sweep.py 04_depvar_differential.R simulation_base.R grid_sweep.py
345 ${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 $@
347 robustness_4_dv.feather: robustness_4_dv_jobs_p1 robustness_4_dv_jobs_p2 robustness_4_dv_jobs_p3
348 $(eval END_1!=cat robustness_4_dv_jobs_p1 | wc -l)
349 $(eval ITEMS_1!=seq $(START) $(STEP) $(END_1))
350 $(eval END_2!=cat robustness_4_dv_p2 | wc -l)
351 $(eval ITEMS_2!=seq $(START) $(STEP) $(END_2))
352 $(eval END_3!=cat robustness_4_dv_p3 | wc -l)
353 $(eval ITEMS_3!=seq $(START) $(STEP) $(END_3))
355 $(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;)
356 $(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;)
357 $(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;)
360 robustness_4_dv.RDS: plot_dv_example.R robustness_4_dv.feather
362 ${srun} Rscript $< --infile $(word 2, $^) --name "robustness_4" --remember-file $@
369 rm -f robustness*.RDS
371 rm -f robustness_*_jobs_*
372 # sbatch --wait --verbose --array=3001-6001 run_simulation.sbatch 0 example_2_B_jobs
374 # example_2_B_mecor_jobs:
375 # 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
377 # example_2_B_mecor.feather:example_2_B_mecor.R example_2_B_mecor_jobs
378 # rm -f example_2_B_mecor.feather
379 # sbatch --wait --verbose --array=1-3000 run_simulation.sbatch 0 example_2_B_mecor_jobs
380 # sbatch --wait --verbose --array=3001-6001 run_simulation.sbatch 0 example_2_B_mecor_jobs