/* NIST StRD benchmark from http://www.nist.gov/itl/div898/strd/ Univariate Summary Statistics Difficulty=Lower N=218 Observed File Name: lottery.dat Dataset Name: Maryland Pick-3 Lottery Description: This is an observed/"real world" data set consisting of 218 Maryland Pick-3 Lottery values from September 3, 1989 to April 14, 1990 (32 weeks). One 3-digit random number (from 000 to 999) is drawn per day, 7 days per week for most weeks, but fewer days per week for some weeks. We here use this data to test accuracy in summary statistics calculations. Stat Category: Univariate: Summary Statistics Reference: None Data: "Real World" 1 Response : y = 3-digit random number 0 Predictors 218 Observations Model: Lower Level of Difficulty 2 Parameters : mu, sigma 1 Response Variable : y 0 Predictor Variables y = mu + e Certified Values Sample Mean ybar: 518.958715596330 Sample Standard Deviation (denom. = n-1) s: 291.699727470969 Sample Autocorrelation Coefficient (lag 1) r(1): -0.120948622967393 Number of Observations: 218 */ clear scalar N = 218 scalar mean = 518.958715596330 scalar sd = 291.699727470969 scalar rho1 = -0.120948622967393 qui input int y 162 671 933 414 788 730 817 33 536 875 670 236 473 167 877 980 316 950 456 92 517 557 956 954 104 178 794 278 147 773 437 435 502 610 582 780 689 562 964 791 28 97 848 281 858 538 660 972 671 613 867 448 738 966 139 636 847 659 754 243 122 455 195 968 793 59 730 361 574 522 97 762 431 158 429 414 22 629 788 999 187 215 810 782 47 34 108 986 25 644 829 630 315 567 919 331 207 412 242 607 668 944 749 168 864 442 533 805 372 63 458 777 416 340 436 140 919 350 510 572 905 900 85 389 473 758 444 169 625 692 140 897 672 288 312 860 724 226 884 508 976 741 476 417 831 15 318 432 241 114 799 955 833 358 935 146 630 830 440 642 356 373 271 715 367 393 190 669 8 861 108 795 269 590 326 866 64 523 862 840 219 382 998 4 628 305 747 247 34 747 729 645 856 974 24 568 24 694 608 480 410 729 947 293 53 930 223 203 677 227 62 455 387 318 562 242 428 968 end summarize y assert scalar(N) == r(N) lrecomp r(mean) mean sqrt(r(Var)) sd gen time = _n tsset time corrgram y, lag(1) lrecomp r(ac1) rho1