-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-gigs.log
2411 lines (2209 loc) · 82.9 KB
/
test-gigs.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--------------------------------------------------------------------------------------------------------------
name: GIGS Testing
log: D:\Users\tadeo\Documents\gigs-stata\test-gigs.log
log type: text
opened on: 17 Jan 2025, 08:58:04
.
. // 1. Generate .dta files with standards using "z2v/c2v" conversions,
. // and with .dta files to be tested against R dataframes
. local outputs "tests/outputs"
. cap mkdir "`outputs'"
. foreach aspect in "who_gs" "ig_nbs" "ig_nbs_ext" "ig_png" "ig_fet" ///
> "interpolation" "z_lgls" "classification" {
2. cap mkdir "`outputs'/`aspect'"
3. noi di "Running .dta file generation for `aspect'"
4. frames reset
5. run "tests/test-`aspect'.do"
6. }
Running .dta file generation for who_gs
Running .dta file generation for ig_nbs
Running .dta file generation for ig_nbs_ext
Running .dta file generation for ig_png
Running .dta file generation for ig_fet
Running .dta file generation for interpolation
Running .dta file generation for z_lgls
Running .dta file generation for classification
.
. // 2. Compare to standards in gigs R package
. // a. n.b. Install rsource (R from Stata) if not already installed:
. // . cap ssc install rsource, replace
. local test_rscript "tests/test_stata_outputs.R"
. if "`c(os)'"=="MacOSX" | "`c(os)'"=="UNIX" {
. noi rsource using "`test_rscript'", ///
> noloutput ///
> rpath("/usr/local/bin/R") ///
> roptions(`"--vanilla"')
. }
. else if "`c(os)'"=="Windows" {
. // Windows
. // n.b. Set `rversion' to that of own system - n.b. gigs needs R >=4.1.0
. local rversion "4.3.3"
. noi rsource using "`test_rscript'", ///
> noloutput ///
> rpath("C:\Program Files\R\R-`rversion'\bin\x64\Rterm.exe") ///
> roptions("--vanilla")
Assumed R program path: "C:\Program Files\R\R-4.3.3\bin\x64\Rterm.exe"
── INTERGROWTH-21st Fetal Growth Standards ─────────────────────────────────────
✔ Centiles in hcfga: succeeded
✔ Z-scores in hcfga: succeeded
✔ Centiles in bpdfga: succeeded
✔ Z-scores in bpdfga: succeeded
✔ Centiles in acfga: succeeded
✔ Z-scores in acfga: succeeded
✔ Centiles in flfga: succeeded
✔ Z-scores in flfga: succeeded
✔ Centiles in ofdfga: succeeded
✔ Z-scores in ofdfga: succeeded
✔ Centiles in efwfga: succeeded
✔ Z-scores in efwfga: succeeded
✔ Centiles in sfhfga: succeeded
✔ Z-scores in sfhfga: succeeded
✔ Centiles in crlfga: succeeded
✔ Z-scores in crlfga: succeeded
✔ Centiles in gafcrl: succeeded
✔ Z-scores in gafcrl: succeeded
✔ Centiles in gwgfga: succeeded
✔ Z-scores in gwgfga: succeeded
✔ Centiles in pifga: succeeded
✔ Z-scores in pifga: succeeded
✔ Centiles in rifga: succeeded
✔ Z-scores in rifga: succeeded
✔ Centiles in sdrfga: succeeded
✔ Z-scores in sdrfga: succeeded
✔ Centiles in tcdfga: succeeded
✔ Z-scores in tcdfga: succeeded
✔ Centiles in gaftcd: succeeded
✔ Z-scores in gaftcd: succeeded
✔ Centiles in poffga: succeeded
✔ Z-scores in poffga: succeeded
✔ Centiles in sffga: succeeded
✔ Z-scores in sffga: succeeded
✔ Centiles in avfga: succeeded
✔ Z-scores in avfga: succeeded
✔ Centiles in pvfga: succeeded
✔ Z-scores in pvfga: succeeded
✔ Centiles in cmfga: succeeded
✔ Z-scores in cmfga: succeeded
✔ Centiles in hefwfga: succeeded
✔ Z-scores in hefwfga: succeeded
── INTERGROWTH-21st Newborn Size Standards ─────────────────────────────────────
✔ Male zscores in wfga: succeeded
✔ Male centiles in wfga: succeeded
✔ Female zscores in wfga: succeeded
✔ Female centiles in wfga: succeeded
✔ Male zscores in lfga: succeeded
✔ Male centiles in lfga: succeeded
✔ Female zscores in lfga: succeeded
✔ Female centiles in lfga: succeeded
✔ Male zscores in hcfga: succeeded
✔ Male centiles in hcfga: succeeded
✔ Female zscores in hcfga: succeeded
✔ Female centiles in hcfga: succeeded
✔ Male zscores in wlrfga: succeeded
✔ Male centiles in wlrfga: succeeded
✔ Female zscores in wlrfga: succeeded
✔ Female centiles in wlrfga: succeeded
ℹ File not found: 'tests/outputs/ig_nbs/ffmfga_z2v_male.dta'
✔ Male centiles in ffmfga: succeeded
ℹ File not found: 'tests/outputs/ig_nbs/ffmfga_z2v_female.dta'
✔ Female centiles in ffmfga: succeeded
ℹ File not found: 'tests/outputs/ig_nbs/bfpfga_z2v_male.dta'
✔ Male centiles in bfpfga: succeeded
ℹ File not found: 'tests/outputs/ig_nbs/bfpfga_z2v_female.dta'
✔ Female centiles in bfpfga: succeeded
ℹ File not found: 'tests/outputs/ig_nbs/fmfga_z2v_male.dta'
✔ Male centiles in fmfga: succeeded
ℹ File not found: 'tests/outputs/ig_nbs/fmfga_z2v_female.dta'
✔ Female centiles in fmfga: succeeded
── Extended INTERGROWTH-21st Newborn Size Standards ────────────────────────────
✔ Male zscores in wfga: succeeded
✔ Male centiles in wfga: succeeded
✔ Female zscores in wfga: succeeded
✔ Female centiles in wfga: succeeded
✔ Male zscores in lfga: succeeded
✔ Male centiles in lfga: succeeded
✔ Female zscores in lfga: succeeded
✔ Female centiles in lfga: succeeded
✔ Male zscores in hcfga: succeeded
✔ Male centiles in hcfga: succeeded
✔ Female zscores in hcfga: succeeded
✔ Female centiles in hcfga: succeeded
── INTERGROWTH-21st Postnatal Growth Standards ─────────────────────────────────
✔ Male centiles in wfa: succeeded
✔ Female centiles in wfa: succeeded
✔ Male centiles in lfa: succeeded
✔ Female centiles in lfa: succeeded
✔ Male centiles in hcfa: succeeded
✔ Female centiles in hcfa: succeeded
✔ Male centiles in wfl: succeeded
✔ Female centiles in wfl: succeeded
── WHO Child Growth Standards ──────────────────────────────────────────────────
✔ Male centiles in wfa: succeeded
✔ Female centiles in wfa: succeeded
✔ Male centiles in bfa: succeeded
✔ Female centiles in bfa: succeeded
✔ Male centiles in lhfa: succeeded
✔ Female centiles in lhfa: succeeded
✔ Male centiles in wfl: succeeded
✔ Female centiles in wfl: succeeded
✔ Male centiles in wfh: succeeded
✔ Female centiles in wfh: succeeded
✔ Male centiles in hcfa: succeeded
✔ Female centiles in hcfa: succeeded
✔ Male centiles in acfa: succeeded
✔ Female centiles in acfa: succeeded
✔ Male centiles in ssfa: succeeded
✔ Female centiles in ssfa: succeeded
✔ Male centiles in tsfa: succeeded
✔ Female centiles in tsfa: succeeded
── Interpolation of coefficients ───────────────────────────────────────────────
✔ Interpolation is consistent for males in WHO GS `wfa`.
✔ Interpolation is consistent for females in WHO GS `wfa`.
✔ Interpolation is consistent for males in WHO GS `bfa`.
✔ Interpolation is consistent for females in WHO GS `bfa`.
✔ Interpolation is consistent for males in WHO GS `lhfa`.
✔ Interpolation is consistent for females in WHO GS `lhfa`.
✔ Interpolation is consistent for males in WHO GS `wfl`.
✔ Interpolation is consistent for females in WHO GS `wfl`.
✔ Interpolation is consistent for males in WHO GS `wfh`.
✔ Interpolation is consistent for females in WHO GS `wfh`.
✔ Interpolation is consistent for males in WHO GS `hcfa`.
✔ Interpolation is consistent for females in WHO GS `hcfa`.
✔ Interpolation is consistent for males in WHO GS `acfa`.
✔ Interpolation is consistent for females in WHO GS `acfa`.
✔ Interpolation is consistent for males in WHO GS `ssfa`.
✔ Interpolation is consistent for females in WHO GS `ssfa`.
✔ Interpolation is consistent for males in WHO GS `tsfa`.
✔ Interpolation is consistent for females in WHO GS `tsfa`.
✔ Interpolation is consistent for males in IG NBS `wfga`.
✔ Interpolation is consistent for females in IG NBS `wfga`.
✔ Interpolation is consistent for males in IG NBS `lfga`.
✔ Interpolation is consistent for females in IG NBS `lfga`.
✔ Interpolation is consistent for males in IG NBS `hcfga`.
✔ Interpolation is consistent for females in IG NBS `hcfga`.
── GIGS z-scoring logicals ─────────────────────────────────────────────────────
✔ GIGS zscoring logicals are consistent.
Warning messages:
1: In compare_gigs_z_lgls() :
There were 7 'at birth' observations where `age_days` > 0.5.
ℹ This occurred for IDs 83, 312, 377, 678, 736, 838, and 916.
2: In compare_gigs_z_lgls() :
There was 1 birth observation where `gest_age` > 300. The WHO Growth standards
were used for this observation instead of the INTERGROWTH-21st Newborn Size
standards.
ℹ This occurred for ID 874.
── GIGS classification ─────────────────────────────────────────────────────────
! Unused factor levels kept after small vulnerable newborn categorisation:
"Term LGA".
! Unused factor levels kept after weight-for-age (underweight) categorisation:
"outlier".
✔ GIGS classification is consistent.
Warning message:
In eval(substitute(expr), data, enclos = parent.frame()) :
There were 134 'at birth' observations where `age_days` > 0.5.
ℹ This occurred for IDs 2, 3, 6, 7, 12, 13, 14, 16, 20, 21, 22, 23, 24, …, 295,
and 298.
── Overall ─────────────────────────────────────────────────────────────────────
✔ All tests passed!
. }
.
. // Stop logging
. log close
no log file open
r(606);
end of do-file
r(606);
. do "D:\Users\tadeo\Documents\gigs-stata\benchmarking\benchmark.do"
. /*
> The benchmarking code here is used to compare and contrast different versions
> of the Stata code with each other, and with R implementations.
>
> The benchmarking table used is the same used to compare the R/SAS
> implementations of these growth standards against each other. The generation
> process for this table can be checked out on the R package website in the
> benchmarking article
> (https://docs.ropensci.org/gigs/articles/benchmarking.html).
>
> It is assumed that a user running this script has gigs installed, either as a
> stable release or dev version from GitHub.
> */
.
. clear all
.
. local bench_folder = "D:\Users\tadeo\Documents\gigs-stata\benchmarking"
. log using "`bench_folder'\statabench.log", replace text nomsg
(file D:\Users\tadeo\Documents\gigs-stata\benchmarking\statabench.log not found)
.
. // WHO Child Growth Standards
. foreach i in 1 10 100 500 1000 5000 10000 25000 50000 75000 100000 {
2. use "`bench_folder'/bench_ds_who_gs.dta", clear
3. qui drop if _n > `i'
4. di "Number of inputs: `i'"
5. bench, reps(25) restore last: ///
> qui egen double z_gigs = who_gs(y, "wfa", "v2z"), ///
> xvar(x) sex(sex) sexcode(m=M, f=F)
6. }
Number of inputs: 1
Average over 25 runs: 0.010 seconds
Number of inputs: 10
Average over 25 runs: 0.009 seconds
Number of inputs: 100
Average over 25 runs: 0.010 seconds
Number of inputs: 500
Average over 25 runs: 0.010 seconds
Number of inputs: 1000
Average over 25 runs: 0.012 seconds
Number of inputs: 5000
Average over 25 runs: 0.025 seconds
Number of inputs: 10000
Average over 25 runs: 0.041 seconds
Number of inputs: 25000
Average over 25 runs: 0.088 seconds
Number of inputs: 50000
Average over 25 runs: 0.169 seconds
Number of inputs: 75000
Average over 25 runs: 0.256 seconds
Number of inputs: 100000
Average over 25 runs: 0.351 seconds
.
. foreach i in 1 10 100 500 1000 5000 10000 25000 50000 75000 100000 {
2. use "`bench_folder'/bench_ds_who_gs.dta", clear
3. qui drop if _n > `i'
4. di "Number of inputs: `i'"
5. bench, reps(25) restore last: ///
> qui egen z_anthro = zanthro(y, wa, WHO), xvar(x) gender(sex) ///
> gencode(male=M, female=F) ageunit(day)
6. }
Number of inputs: 1
Average over 25 runs: 0.008 seconds
Number of inputs: 10
Average over 25 runs: 0.008 seconds
Number of inputs: 100
Average over 25 runs: 0.009 seconds
Number of inputs: 500
Average over 25 runs: 0.013 seconds
Number of inputs: 1000
Average over 25 runs: 0.018 seconds
Number of inputs: 5000
Average over 25 runs: 0.060 seconds
Number of inputs: 10000
Average over 25 runs: 0.111 seconds
Number of inputs: 25000
Average over 25 runs: 0.268 seconds
Number of inputs: 50000
Average over 25 runs: 0.541 seconds
Number of inputs: 75000
Average over 25 runs: 1.243 seconds
Number of inputs: 100000
Average over 25 runs: 1.349 seconds
.
. // IG-21st Newborn Size Standards
. foreach i in 1 10 100 500 1000 5000 10000 25000 50000 75000 100000 {
2. use "`bench_folder'/bench_ds_ig_nbs.dta", clear
3. qui drop if _n > `i'
4. di "Number of inputs: `i'"
5. bench, reps(25) restore last: ///
> qui egen double z_gigs = ig_nbs(y, "wfga", "v2z"), ///
> gest_days(gest_days) sex(sex) sexcode(m=M, f=F)
6. }
Number of inputs: 1
variable gest_days not found
(error in option gest_days())
r(111);
end of do-file
r(111);
. use life6mo
no; dataset in memory has changed since last saved
r(4);
. log close
. di "`bench_folder'\statabench.log"
\statabench.log
. cd
D:\Users\tadeo\Documents\gigs-stata
.
. do "C:\Users\tadeo\AppData\Local\Temp\STDfbc_000001.tmp"
. local bench_folder "D:\Users\tadeo\Documents\gigs-stata\benchmarking"
.
end of do-file
. di "`bench_folder'"
. local bench_folder = "D:\Users\tadeo\Documents\gigs-stata\benchmarking"
. di "`bench_folder'"
D:\Users\tadeo\Documents\gigs-stata\benchmarking
.
. do "D:\Users\tadeo\Documents\gigs-stata\benchmarking\benchmark.do"
. /*
> The benchmarking code here is used to compare and contrast different versions
> of the Stata code with each other, and with R implementations.
>
> The benchmarking table used is the same used to compare the R/SAS
> implementations of these growth standards against each other. The generation
> process for this table can be checked out on the R package website in the
> benchmarking article
> (https://docs.ropensci.org/gigs/articles/benchmarking.html).
>
> It is assumed that a user running this script has gigs installed, either as a
> stable release or dev version from GitHub.
> */
.
. clear all
.
. local bench_folder "D:\Users\tadeo\Documents\gigs-stata\benchmarking"
. log using "`bench_folder'\statabench.log", replace text nomsg
.
. // WHO Child Growth Standards
. foreach i in 1 10 100 500 1000 5000 10000 25000 50000 75000 100000 {
2. use "`bench_folder'/bench_ds_who_gs.dta", clear
3. qui drop if _n > `i'
4. di "Number of inputs: `i'"
5. bench, reps(50) restore last: ///
> qui egen double z_gigs = who_gs(y, "wfa", "v2z"), ///
> xvar(x) sex(sex) sexcode(m=M, f=F)
6. }
Number of inputs: 1
Average over 50 runs: 0.009 seconds
Number of inputs: 10
Average over 50 runs: 0.009 seconds
Number of inputs: 100
Average over 50 runs: 0.009 seconds
Number of inputs: 500
Average over 50 runs: 0.010 seconds
Number of inputs: 1000
Average over 50 runs: 0.011 seconds
Number of inputs: 5000
Average over 50 runs: 0.024 seconds
Number of inputs: 10000
Average over 50 runs: 0.040 seconds
Number of inputs: 25000
Average over 50 runs: 0.089 seconds
Number of inputs: 50000
Average over 50 runs: 0.171 seconds
Number of inputs: 75000
Average over 50 runs: 0.257 seconds
Number of inputs: 100000
Average over 50 runs: 0.349 seconds
.
. foreach i in 1 10 100 500 1000 5000 10000 25000 50000 75000 100000 {
2. use "`bench_folder'/bench_ds_who_gs.dta", clear
3. qui drop if _n > `i'
4. di "Number of inputs: `i'"
5. bench, reps(50) restore last: ///
> qui egen z_anthro = zanthro(y, wa, WHO), xvar(x) gender(sex) ///
> gencode(male=M, female=F) ageunit(day)
6. }
Number of inputs: 1
Average over 50 runs: 0.008 seconds
Number of inputs: 10
Average over 50 runs: 0.008 seconds
Number of inputs: 100
Average over 50 runs: 0.009 seconds
Number of inputs: 500
Average over 50 runs: 0.013 seconds
Number of inputs: 1000
Average over 50 runs: 0.018 seconds
Number of inputs: 5000
Average over 50 runs: 0.060 seconds
Number of inputs: 10000
Average over 50 runs: 0.114 seconds
Number of inputs: 25000
Average over 50 runs: 0.279 seconds
Number of inputs: 50000
Average over 50 runs: 0.545 seconds
Number of inputs: 75000
Average over 50 runs: 0.800 seconds
Number of inputs: 100000
Average over 50 runs: 1.104 seconds
.
. // IG-21st Newborn Size Standards
. foreach i in 1 10 100 500 1000 5000 10000 25000 50000 75000 100000 {
2. use "`bench_folder'/bench_ds_ig_nbs.dta", clear
3. qui drop if _n > `i'
4. di "Number of inputs: `i'"
5. bench, reps(50) restore last: ///
> qui egen double z_gigs = ig_nbs(y, "wfga", "v2z"), ///
> gest_days(x) sex(sex) sexcode(m=M, f=F)
6. }
Number of inputs: 1
Average over 50 runs: 0.004 seconds
Number of inputs: 10
Average over 50 runs: 0.004 seconds
Number of inputs: 100
Average over 50 runs: 0.005 seconds
Number of inputs: 500
Average over 50 runs: 0.006 seconds
Number of inputs: 1000
Average over 50 runs: 0.007 seconds
Number of inputs: 5000
Average over 50 runs: 0.022 seconds
Number of inputs: 10000
Average over 50 runs: 0.041 seconds
Number of inputs: 25000
Average over 50 runs: 0.095 seconds
Number of inputs: 50000
Average over 50 runs: 0.187 seconds
Number of inputs: 75000
Average over 50 runs: 0.282 seconds
Number of inputs: 100000
Average over 50 runs: 0.383 seconds
.
. // IG-21st Postnatal Growth Standards
. foreach i in 1 10 100 500 1000 5000 10000 25000 50000 75000 100000 {
2. use "`bench_folder'/bench_ds_ig_png.dta", clear
3. qui drop if _n > `i'
4. di "Number of inputs: `i'"
5. bench, reps(50) restore last: ///
> qui egen double z_gigs = ig_png(y, "wfa", "v2z"), ///
> xvar(x) sex(sex) sexcode(m=M, f=F)
6. }
Number of inputs: 1
Average over 50 runs: 0.002 seconds
Number of inputs: 10
Average over 50 runs: 0.003 seconds
Number of inputs: 100
Average over 50 runs: 0.003 seconds
Number of inputs: 500
Average over 50 runs: 0.003 seconds
Number of inputs: 1000
Average over 50 runs: 0.003 seconds
Number of inputs: 5000
Average over 50 runs: 0.008 seconds
Number of inputs: 10000
Average over 50 runs: 0.014 seconds
Number of inputs: 25000
Average over 50 runs: 0.030 seconds
Number of inputs: 50000
Average over 50 runs: 0.057 seconds
Number of inputs: 75000
Average over 50 runs: 0.081 seconds
Number of inputs: 100000
Average over 50 runs: 0.109 seconds
.
. // IG-21st Fetal Standards
. foreach i in 1 10 100 500 1000 5000 10000 25000 50000 75000 100000 {
2. use "`bench_folder'/bench_ds_ig_fet.dta", clear
3. qui drop if _n > `i'
4. di "Number of inputs: `i'"
5. bench, reps(50) restore last: ///
> qui egen double z_gigs = ig_fet(y, "ofdfga", "v2z"), xvar(x)
6. }
Number of inputs: 1
Average over 50 runs: 0.002 seconds
Number of inputs: 10
Average over 50 runs: 0.002 seconds
Number of inputs: 100
Average over 50 runs: 0.002 seconds
Number of inputs: 500
Average over 50 runs: 0.003 seconds
Number of inputs: 1000
Average over 50 runs: 0.003 seconds
Number of inputs: 5000
Average over 50 runs: 0.005 seconds
Number of inputs: 10000
Average over 50 runs: 0.008 seconds
Number of inputs: 25000
Average over 50 runs: 0.017 seconds
Number of inputs: 50000
Average over 50 runs: 0.030 seconds
Number of inputs: 75000
Average over 50 runs: 0.042 seconds
Number of inputs: 100000
Average over 50 runs: 0.058 seconds
.
. log close
.
.
.
. // OLD VERSIONS OF GIGS --------------------------------------------------------
. // Kept to note how development is progressing
.
.
.
. // gigs 0.4.0
. // Number of inputs: 1
. // Average over 25 runs: 0.009 seconds
. // Number of inputs: 10
. // Average over 25 runs: 0.008 seconds
. // Number of inputs: 100
. // Average over 25 runs: 0.009 seconds
. // Number of inputs: 500
. // Average over 25 runs: 0.010 seconds
. // Number of inputs: 1000
. // Average over 25 runs: 0.012 seconds
. // Number of inputs: 5000
. // Average over 25 runs: 0.028 seconds
. // Number of inputs: 10000
. // Average over 25 runs: 0.047 seconds
. // Number of inputs: 25000
. // Average over 25 runs: 0.104 seconds
. // Number of inputs: 50000
. // Average over 25 runs: 0.198 seconds
. // Number of inputs: 75000
. // Average over 25 runs: 0.296 seconds
. // Number of inputs: 100000
. // Average over 25 runs: 0.405 seconds
.
. // gigs 0.3.2:
. // Number of inputs: 1
. // Average over 25 runs: 0.008 seconds
. // Number of inputs: 10
. // Average over 25 runs: 0.009 seconds
. // Number of inputs: 100
. // Average over 25 runs: 0.009 seconds
. // Number of inputs: 500
. // Average over 25 runs: 0.010 seconds
. // Number of inputs: 1000
. // Average over 25 runs: 0.012 seconds
. // Number of inputs: 5000
. // Average over 25 runs: 0.027 seconds
. // Number of inputs: 10000
. // Average over 25 runs: 0.045 seconds
. // Number of inputs: 25000
. // Average over 25 runs: 0.101 seconds
. // Number of inputs: 50000
. // Average over 25 runs: 0.195 seconds
. // Number of inputs: 75000
. // Average over 25 runs: 0.294 seconds
. // Number of inputs: 100000
. // Average over 25 runs: 0.405 seconds
.
. // gigs 0.3.1:
. // Number of inputs: 1
. // Average over 25 runs: 0.008 seconds
. // Number of inputs: 10
. // Average over 25 runs: 0.009 seconds
. // Number of inputs: 100
. // Average over 25 runs: 0.009 seconds
. // Number of inputs: 500
. // Average over 25 runs: 0.010 seconds
. // Number of inputs: 1000
. // Average over 25 runs: 0.012 seconds
. // Number of inputs: 5000
. // Average over 25 runs: 0.028 seconds
. // Number of inputs: 10000
. // Average over 25 runs: 0.047 seconds
. // Number of inputs: 25000
. // Average over 25 runs: 0.106 seconds
. // Number of inputs: 50000
. // Average over 25 runs: 0.204 seconds
. // Number of inputs: 75000
. // Average over 25 runs: 0.310 seconds
. // Number of inputs: 100000
. // Average over 25 runs: 0.410 seconds
.
. // gigs 0.3.0:
. // Number of inputs: 1
. // Average over 25 runs: 0.008 seconds
. // Number of inputs: 10
. // Average over 25 runs: 0.010 seconds
. // Number of inputs: 100
. // Average over 25 runs: 0.010 seconds
. // Number of inputs: 500
. // Average over 25 runs: 0.011 seconds
. // Number of inputs: 1000
. // Average over 25 runs: 0.013 seconds
. // Number of inputs: 5000
. // Average over 25 runs: 0.028 seconds
. // Number of inputs: 10000
. // Average over 25 runs: 0.048 seconds
. // Number of inputs: 25000
. // Average over 25 runs: 0.107 seconds
. // Number of inputs: 50000
. // Average over 25 runs: 0.205 seconds
. // Number of inputs: 75000
. // Average over 25 runs: 0.313 seconds
. // Number of inputs: 100000
. // Average over 25 runs: 0.431 seconds
.
. // gigs 0.2.4:
. // Number of inputs: 1
. // Average over 25 runs: 0.016 seconds
. // Number of inputs: 10
. // Average over 25 runs: 0.015 seconds
. // Number of inputs: 100
. // Average over 25 runs: 0.017 seconds
. // Number of inputs: 500
. // Average over 25 runs: 0.039 seconds
. // Number of inputs: 1000
. // Average over 25 runs: 0.079 seconds
. // Number of inputs: 5000
. // Average over 25 runs: 1.007 seconds
. // --> Crashed on 10000 or more inputs
.
end of do-file
. clear all
. do "C:\Users\tadeo\AppData\Local\Temp\STDfbc_000002.tmp"
. local bench_folder "D:\Users\tadeo\Documents\gigs-stata\benchmarking"
.
end of do-file
. do "C:\Users\tadeo\AppData\Local\Temp\STDfbc_000003.tmp"
. clear all
.
. local bench_folder "D:\Users\tadeo\Documents\gigs-stata\benchmarking"
.
end of do-file
. do "C:\Users\tadeo\AppData\Local\Temp\STDfbc_000004.tmp"
. local benchmarking_rscript "`bench_folder'\statabench2csv.R"
. if "`c(os)'"=="MacOSX" | "`c(os)'"=="UNIX" {
. noi rsource using "`benchmarking_rscript'", ///
> noloutput ///
> rpath("/usr/local/bin/R") ///
> roptions(`"--vanilla"')
. }
. else if "`c(os)'"=="Windows" {
. // Windows
. // n.b. Set `rversion' to that of own system - n.b. gigs needs R >=4.1.0
. local rversion "4.3.3"
. noi rsource using "`benchmarking_rscript'", ///
> noloutput ///
> rpath("C:\Program Files\R\R-`rversion'\bin\x64\Rterm.exe") ///
> roptions("--vanilla")
file \statabench2csv.R not found
r(601);
. }
r(601);
end of do-file
r(601);
. di "`benchmarking_rscript'"
. local benchmarking_rscript = "`bench_folder'\statabench2csv.R"
. di "`benchmarking_rscript'"
D:\Users\tadeo\Documents\gigs-stata\benchmarking\statabench2csv.R
. do "C:\Users\tadeo\AppData\Local\Temp\STDfbc_000005.tmp"
. local benchmarking_rscript = "`bench_folder'\statabench2csv.R"
. if "`c(os)'"=="MacOSX" | "`c(os)'"=="UNIX" {
. noi rsource using "`benchmarking_rscript'", ///
> noloutput ///
> rpath("/usr/local/bin/R") ///
> roptions(`"--vanilla"')
. }
. else if "`c(os)'"=="Windows" {
. // Windows
. // n.b. Set `rversion' to that of own system - n.b. gigs needs R >=4.1.0
. local rversion "4.3.3"
. noi rsource using "`benchmarking_rscript'", ///
> noloutput ///
> rpath("C:\Program Files\R\R-`rversion'\bin\x64\Rterm.exe") ///
> roptions("--vanilla")
file \statabench2csv.R not found
r(601);
. }
r(601);
end of do-file
r(601);
. di "`benchmarking_rscript'"
D:\Users\tadeo\Documents\gigs-stata\benchmarking\statabench2csv.R
. set trace on
. "`benchmarking_rscript'"
"D:\Users\tadeo\Documents\gigs-stata\benchmarking\statabench2csv.R is not a valid command name
r(199);
. do "C:\Users\tadeo\AppData\Local\Temp\STDfbc_000006.tmp"
. if "`c(os)'"=="MacOSX" | "`c(os)'"=="UNIX" {
. noi rsource using "`benchmarking_rscript'", ///
> noloutput ///
> rpath("/usr/local/bin/R") ///
> roptions(`"--vanilla"')
. }
. else if "`c(os)'"=="Windows" {
. // Windows
. // n.b. Set `rversion' to that of own system - n.b. gigs needs R >=4.1.0
. local rversion "4.3.3"
. noi rsource using "`benchmarking_rscript'", ///
> noloutput ///
> rpath("C:\Program Files\R\R-`rversion'\bin\x64\Rterm.exe") ///
> roptions("--vanilla")
--------------------------------------------------------------------------------------------------------------------------- begin rsource ---
- version 10.0
- syntax [ using/ ] [ , TErminator(string) MAXlines(numlist min=1 max=1 >=0) RPath(string) ROptions(string) noLOutput LSource ]
invalid file specification
----------------------------------------------------------------------------------------------------------------------------- end rsource ---
r(198);
. }
r(198);
end of do-file
r(198);
. set trace off
. do "C:\Users\tadeo\AppData\Local\Temp\STDfbc_000007.tmp"
. if "`c(os)'"=="MacOSX" | "`c(os)'"=="UNIX" {
. noi rsource using "`benchmarking_rscript'", ///
> noloutput ///
> rpath("/usr/local/bin/R") ///
> roptions(`"--vanilla"')
. }
. else if "`c(os)'"=="Windows" {
. // Windows
. // n.b. Set `rversion' to that of own system - n.b. gigs needs R >=4.1.0
. local rversion "4.3.3"
. noi rsource using "`benchmarking_rscript'", ///
> noloutput ///
> rpath("C:\Program Files\R\R-`rversion'\bin\x64\Rterm.exe") ///
> roptions("--vanilla")
invalid file specification
r(198);
. }
r(198);
end of do-file
r(198);
. do "C:\Users\tadeo\AppData\Local\Temp\STDfbc_000008.tmp"
. noi rsource using "`benchmarking_rscript'", ///
end of do-file
. noi rsource using "`benchmarking_rscript'", noloutput rpath("C:\Program Files\R\R-`rversion'\bin\x64\Rterm.exe") roptions("--vanilla")
Assumed R program path: "C:\Program Files\R\R-\bin\x64\Rterm.exe"
The system cannot find the path specified.
. local rversion "4.3.3"
. noi rsource using "`benchmarking_rscript'", noloutput rpath("C:\Program Files\R\R-`rversion'\bin\x64\Rterm.exe") roptions("--vanilla")
Assumed R program path: "C:\Program Files\R\R-4.3.3\bin\x64\Rterm.exe"
Error in `map()`:
ℹ In index: 1.
Caused by error in `data.frame()`:
! arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. ├─purrr::map_dfr(...)
2. │ └─purrr::map(.x, .f, ...)
3. │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
4. │ ├─purrr:::with_indexed_errors(...)
5. │ │ └─base::withCallingHandlers(...)
6. │ ├─purrr:::call_with_cleanup(...)
7. │ └─global .f(.x[[i]], ...)
8. │ └─global logfile_to_df(logfile, acronym)
9. │ └─base::data.frame(...)
10. │ └─base::stop(...)
11. └─base::.handleSimpleError(...)
12. └─purrr (local) h(simpleError(msg, call))
13. └─cli::cli_abort(...)
14. └─rlang::abort(...)
Execution halted
. noi rsource using "`benchmarking_rscript'", noloutput rpath("C:\Program Files\R\R-`rversion'\bin\x64\Rterm.exe") roptions("--vanilla")
Assumed R program path: "C:\Program Files\R\R-4.3.3\bin\x64\Rterm.exe"
Error in `map()`:
ℹ In index: 1.
Caused by error in `data.frame()`:
! arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. ├─purrr::map_dfr(...)
2. │ └─purrr::map(.x, .f, ...)
3. │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
4. │ ├─purrr:::with_indexed_errors(...)
5. │ │ └─base::withCallingHandlers(...)
6. │ ├─purrr:::call_with_cleanup(...)
7. │ └─global .f(.x[[i]], ...)
8. │ └─global logfile_to_df(logfile, acronym)
9. │ └─base::data.frame(...)
10. │ └─base::stop(...)
11. └─base::.handleSimpleError(...)
12. └─purrr (local) h(simpleError(msg, call))
13. └─cli::cli_abort(...)
14. └─rlang::abort(...)
Execution halted
. noi rsource using "`benchmarking_rscript'", noloutput rpath("C:\Program Files\R\R-`rversion'\bin\x64\Rterm.exe") roptions("--vanilla")
Assumed R program path: "C:\Program Files\R\R-4.3.3\bin\x64\Rterm.exe"
→ D:/Users/tadeo/Documents/gigs-stata
Error in `map()`:
ℹ In index: 1.
Caused by error in `data.frame()`:
! arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. ├─purrr::map_dfr(...)
2. │ └─purrr::map(.x, .f, ...)
3. │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
4. │ ├─purrr:::with_indexed_errors(...)
5. │ │ └─base::withCallingHandlers(...)
6. │ ├─purrr:::call_with_cleanup(...)
7. │ └─global .f(.x[[i]], ...)
8. │ └─global logfile_to_df(logfile, acronym)
9. │ └─base::data.frame(...)
10. │ └─base::stop(...)
11. └─base::.handleSimpleError(...)
12. └─purrr (local) h(simpleError(msg, call))
13. └─cli::cli_abort(...)
14. └─rlang::abort(...)
Execution halted
. noi rsource using "`benchmarking_rscript'", noloutput rpath("C:\Program Files\R\R-`rversion'\bin\x64\Rterm.exe") roptions("--vanilla")
Assumed R program path: "C:\Program Files\R\R-4.3.3\bin\x64\Rterm.exe"
Error in `map()`:
ℹ In index: 1.
Caused by error in `data.frame()`:
! arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. ├─purrr::map_dfr(...)
2. │ └─purrr::map(.x, .f, ...)
3. │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
4. │ ├─purrr:::with_indexed_errors(...)
5. │ │ └─base::withCallingHandlers(...)
6. │ ├─purrr:::call_with_cleanup(...)
7. │ └─global .f(.x[[i]], ...)
8. │ └─global logfile_to_df(logfile, acronym)
9. │ └─base::data.frame(...)
10. │ └─base::stop(...)
11. └─base::.handleSimpleError(...)
12. └─purrr (local) h(simpleError(msg, call))
13. └─cli::cli_abort(...)
14. └─rlang::abort(...)
Execution halted
. noi rsource using "`benchmarking_rscript'", noloutput rpath("C:\Program Files\R\R-`rversion'\bin\x64\Rterm.exe") roptions("--vanilla")
Assumed R program path: "C:\Program Files\R\R-4.3.3\bin\x64\Rterm.exe"
Warning message:
. . // WHO Child Growth Standards. foreach i in 1 10 100 500 1000 5000 10000 25000 50000 75000 100000 { 2. use "`bench_folder'/bench_d
> s_who_gs.dta", clear 3. qui drop if _n > `i' 4. di "Number of inputs: `i'" 5. bench, reps(50) restore last: ///>
> qui egen double z_gigs = who_gs(y, "wfa", "v2z"), ///> xvar(x) sex(sex) sexcode(m=M, f=F) 6. }Number
> of inputs: 1Average over 50 runs: 0.009 secondsNumber of inputs: 10Average over 50 runs: 0.009 secondsNumber of inputs: 100Average over 50 ru
> ns: 0.009 secondsNumber of inputs: 500Average over 50 runs: 0.010 secondsNumber of inputs: 1000Average over 50 runs: 0.011 secondsNumber of i
> nputs: 5000Average over 50 runs: 0.024 secondsNumber of inputs: 10000Average over 50 runs: 0.040 secondsNumber of inputs: 25000Average over 5
> 0 runs: 0.089 secondsNumber of inputs: 50000Average over 50 runs: 0.171 secondsNumber of inputs: 75000Average over 50 runs: 0.257 secondsNumb
> er of input [... truncated]
Error in `map()`:
ℹ In index: 1.
Caused by error in `data.frame()`:
! arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. ├─purrr::map_dfr(...)
2. │ └─purrr::map(.x, .f, ...)
3. │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
4. │ ├─purrr:::with_indexed_errors(...)
5. │ │ └─base::withCallingHandlers(...)
6. │ ├─purrr:::call_with_cleanup(...)
7. │ └─global .f(.x[[i]], ...)
8. │ └─global logfile_to_df(logfile, acronym)
9. │ └─base::data.frame(...)
10. │ └─base::stop(...)
11. └─base::.handleSimpleError(...)
12. └─purrr (local) h(simpleError(msg, call))
13. └─cli::cli_abort(...)
14. └─rlang::abort(...)
Execution halted
. do "C:\Users\tadeo\AppData\Local\Temp\STDfbc_000009.tmp"
. clear all
.
. local bench_folder "D:\Users\tadeo\Documents\gigs-stata\benchmarking"
. log using "`bench_folder'\statabench.log", replace text nomsg
.
. // WHO Child Growth Standards
. foreach i in 1 10 100 500 1000 5000 10000 25000 50000 75000 100000 {
2. use "`bench_folder'/bench_ds_who_gs.dta", clear
3. qui drop if _n > `i'
4. di "For who_gs: Number of inputs: `i'"
5. bench, reps(50) restore last: ///
> qui egen double z_gigs = who_gs(y, "wfa", "v2z"), ///
> xvar(x) sex(sex) sexcode(m=M, f=F)
6. }
For who_gs: Number of inputs: 1
Average over 50 runs: 0.008 seconds
For who_gs: Number of inputs: 10
Average over 50 runs: 0.009 seconds
For who_gs: Number of inputs: 100
Average over 50 runs: 0.009 seconds