ods html; ods graphics on; data vote; input state district democA voteA expendA expendB prtystrA lexpendA lexpendB shareA; datalines; AL 7 1.00 68.00 328.30 8.74 41.00 5.793916 2.167567 97.41 AK 1 0.00 62.00 626.38 402.48 60.00 6.439952 5.997638 60.88 AZ 2 1.00 73.00 99.61 3.07 55.00 4.601233 1.120048 97.01 AZ 3 0.00 69.00 319.69 26.28 64.00 5.767352 3.268846 92.40 AR 3 0.00 75.00 159.22 60.05 66.00 5.070293 4.095244 72.61 AR 4 1.00 69.00 570.16 21.39 46.00 6.345908 3.063064 96.38 CA 2 0.00 59.00 696.75 193.91 58.00 6.546424 5.26742 78.23 CA 3 1.00 71.00 638.69 7.70 49.00 6.459416 2.040571 98.81 CA 5 1.00 76.00 616.94 19.25 71.00 6.424765 2.957251 96.97 CA 6 1.00 73.00 351.69 50.53 64.00 5.862741 3.922607 87.44 CA 7 1.00 68.00 269.89 14.71 53.00 5.598003 2.688528 94.83 CA 11 1.00 71.00 269.51 95.57 58.00 5.596605 4.559911 73.82 CA 12 0.00 52.00 1440.64 1089.57 49.00 7.272842 6.993538 56.94 CA 16 1.00 79.00 252.34 69.56 54.00 5.530762 4.242233 78.39 CA 19 0.00 50.00 1470.67 1548.19 54.00 7.293476 7.344844 48.72 CA 23 1.00 64.00 140.49 100.96 56.00 4.945108 4.614685 58.19 CA 24 1.00 72.00 191.33 15.45 65.00 5.254021 2.737544 92.53 CA 27 1.00 68.00 398.60 15.24 54.00 5.987951 2.723858 96.32 CA 30 1.00 60.00 460.62 382.11 53.00 6.132578 5.945711 54.66 CA 32 1.00 67.00 457.41 20.61 49.00 6.12558 3.025679 95.69 CA 34 1.00 63.00 227.10 149.89 50.00 5.425382 5.009875 60.24 CA 36 1.00 54.00 532.90 218.70 47.00 6.278328 5.387682 70.90 CA 37 0.00 64.00 122.84 13.56 68.00 4.810874 2.606977 90.06 CA 40 0.00 67.00 1110.13 47.75 68.00 7.012229 3.865895 95.88 CA 42 0.00 64.00 494.49 11.89 65.00 6.203521 2.475614 97.65 CO 1 1.00 70.00 217.50 26.04 61.00 5.382213 3.259634 89.31 CO 2 1.00 63.00 721.65 85.10 50.00 6.581536 4.443769 89.45 CO 3 1.00 78.00 482.79 17.94 46.00 6.17958 2.88681 96.42 CO 5 0.00 75.00 183.23 0.93 67.00 5.210737 -.0725707 99.50 CO 6 0.00 63.00 636.20 489.30 57.00 6.455519 6.192982 56.53 CT 2 1.00 64.00 727.92 246.90 49.00 6.59019 5.508996 74.67 CT 4 0.00 72.00 372.68 44.41 57.00 5.92072 3.793465 89.35 CT 6 0.00 66.00 399.37 128.85 53.00 5.989888 4.858672 75.61 DE 1 1.00 68.00 371.75 184.71 43.00 5.918213 5.218798 66.81 FL 1 1.00 67.00 210.94 23.91 27.00 5.351574 3.174381 89.82 FL 4 0.00 50.00 313.42 1069.70 36.00 5.747528 6.975132 22.66 FL 6 0.00 54.00 408.29 503.65 61.00 6.011982 6.221889 44.77 FL 14 1.00 55.00 971.88 777.99 47.00 6.879235 6.656711 55.54 FL 19 1.00 72.00 337.60 4.91 41.00 5.82185 1.590663 98.57 GA 1 1.00 67.00 337.05 40.46 39.00 5.820225 3.700339 89.28 GA 4 1.00 60.00 516.74 696.30 41.00 6.247534 6.545782 42.60 GA 5 1.00 78.00 101.54 6.05 68.00 4.620453 1.799562 94.38 GA 6 0.00 59.00 838.71 358.35 67.00 6.731863 5.881521 70.06 GA 7 1.00 65.00 382.28 60.69 29.00 5.946156 4.105845 86.30 GA 9 1.00 63.00 405.04 64.40 29.00 6.003986 4.165113 86.28 GA 10 1.00 64.00 193.12 6.76 35.00 5.263327 1.911023 96.62 ID 2 1.00 63.00 502.08 206.96 33.00 6.218765 5.332526 70.81 IL 4 1.00 50.00 359.94 348.34 44.00 5.885943 5.853176 50.82 IL 5 1.00 61.00 165.14 48.94 48.00 5.106818 3.890595 77.14 IL 6 0.00 74.00 281.23 26.56 68.00 5.639169 3.279218 91.37 IL 9 1.00 66.00 122.90 28.32 61.00 4.811371 3.343709 81.27 IL 11 1.00 65.00 239.16 41.26 46.00 5.477124 3.719869 85.29 IL 17 1.00 65.00 471.23 124.13 53.00 6.155353 4.821353 79.15 IL 19 1.00 64.00 193.21 16.24 45.00 5.263752 2.787539 92.25 IL 20 1.00 69.00 251.63 57.71 49.00 5.527976 4.055396 81.34 IL 21 1.00 53.00 394.41 69.49 54.00 5.977396 4.241125 85.02 IN 2 1.00 53.00 444.42 332.88 35.00 6.096775 5.807782 57.17 IN 5 1.00 56.00 689.09 244.99 35.00 6.535366 5.501197 73.77 IN 6 0.00 73.00 333.72 11.74 69.00 5.810311 2.463257 96.60 IN 8 1.00 62.00 551.48 130.24 42.00 6.312613 4.869402 80.90 IN 10 1.00 61.00 35.79 24.92 51.00 3.577557 3.215631 58.95 IA 5 0.00 64.00 420.73 115.70 47.00 6.041991 4.751009 78.43 IA 6 0.00 64.00 523.11 175.95 50.00 6.259788 5.170206 74.83 KS 2 1.00 73.00 388.87 119.26 46.00 5.963235 4.781331 76.53 KS 3 0.00 74.00 234.58 13.48 54.00 5.457809 2.60143 94.56 KS 4 1.00 64.00 545.76 149.04 43.00 6.30217 5.004181 78.55 KY 2 1.00 61.00 8.40 84.10 41.00 2.127875 4.43203 9.08 KY 3 1.00 70.00 371.43 4.93 53.00 5.917363 1.595542 98.69 KY 4 0.00 74.00 468.87 23.64 65.00 6.150325 3.162771 95.20 KY 7 1.00 59.00 411.70 432.40 55.00 6.020292 6.069358 48.77 ME 2 0.00 66.00 202.32 68.39 55.00 5.309836 4.225226 74.74 MD 3 1.00 73.00 354.70 18.89 54.00 5.871275 2.938792 94.94 MA 4 1.00 60.00 343.10 34.37 57.00 5.838013 3.537126 90.90 MA 5 1.00 84.00 344.93 15.40 47.00 5.843341 2.734108 95.73 MA 6 1.00 70.00 337.20 63.01 50.00 5.820673 4.143341 84.26 MA 10 1.00 67.00 235.95 121.06 51.00 5.463603 4.796253 66.09 MI 2 0.00 54.00 876.78 750.49 58.00 6.776255 6.62073 53.88 MI 3 1.00 57.00 600.94 164.86 45.00 6.398495 5.105072 78.47 MI 4 0.00 71.00 323.83 8.58 63.00 5.780216 2.149084 97.42 MI 7 1.00 76.00 150.59 1.31 55.00 5.014587 .2700271 99.14 MI 8 1.00 72.00 128.40 2.19 50.00 4.85515 .7829879 98.32 MI 9 0.00 70.00 450.80 14.87 62.00 6.111026 2.699077 96.81 MI 11 0.00 60.00 680.82 415.66 52.00 6.523296 6.029868 62.09 MI 12 1.00 54.00 434.20 143.89 39.00 6.073505 4.969021 75.11 MI 14 1.00 63.00 137.56 3.54 44.00 4.92406 1.263279 97.49 MI 15 1.00 64.00 234.43 7.99 45.00 5.457178 2.078566 96.70 MI 18 1.00 23.00 9.46 77.10 30.00 2.246967 4.345142 10.93 MN 2 1.00 42.00 152.29 623.78 49.00 5.025819 6.435791 19.62 MN 4 0.00 28.00 35.79 216.17 39.00 3.577641 5.376074 14.20 MN 5 0.00 28.00 16.92 281.45 35.00 2.828201 5.639973 5.67 MN 6 0.00 35.00 100.94 320.22 49.00 4.614536 5.769005 23.97 MN 8 0.00 25.00 7.74 157.80 40.00 2.046789 5.061341 4.68 MO 3 0.00 37.00 202.52 512.21 53.00 5.310858 6.238727 28.34 MO 6 1.00 41.00 198.62 341.34 50.00 5.291378 5.832891 36.78 MO 7 1.00 47.00 215.06 338.13 39.00 5.370935 5.823416 38.88 MO 8 1.00 42.00 516.24 768.79 45.00 6.24657 6.64482 40.17 MO 9 0.00 32.00 9.56 210.84 55.00 2.258111 5.351104 4.34 MT 1 0.00 39.00 58.20 250.28 52.00 4.063954 5.522564 18.87 MT 2 1.00 45.00 394.10 380.93 46.00 5.97661 5.94261 50.85 NE 1 1.00 33.00 96.28 221.53 44.00 4.56724 5.400558 30.29 NE 2 0.00 49.00 1158.29 858.76 58.00 7.054703 6.755492 57.42 NV 1 0.00 36.00 147.89 652.20 58.00 4.996476 6.48035 18.48 NJ 3 0.00 48.00 981.86 678.65 63.00 6.889454 6.520101 59.13 NJ 4 1.00 34.00 53.96 252.82 45.00 3.988317 5.53269 17.59 NJ 6 0.00 38.00 38.92 123.63 54.00 3.661483 4.817309 23.94 NJ 9 0.00 32.00 57.26 403.06 54.00 4.047602 5.999083 12.44 NM 1 1.00 49.00 576.68 559.13 46.00 6.357282 6.326389 50.77 NM 3 0.00 27.00 41.67 267.63 46.00 3.729757 5.589617 13.47 NY 3 0.00 43.00 90.89 364.09 60.00 4.509672 5.897393 19.98 NY 5 1.00 35.00 35.63 337.79 44.00 3.573104 5.82243 9.54 NY 15 1.00 39.00 162.16 602.94 67.00 5.088565 6.401821 21.19 NY 17 0.00 16.00 2.85 170.57 22.00 1.04767 5.139128 1.64 NY 22 1.00 29.00 10.43 411.06 43.00 2.344398 6.01873 2.47 NY 23 0.00 38.00 174.79 273.51 44.00 5.163585 5.61132 38.99 NY 24 1.00 28.00 15.94 151.28 42.00 2.768581 5.019106 9.53 NY 27 1.00 43.00 645.12 594.97 48.00 6.469441 6.388503 52.02 NY 30 0.00 43.00 310.70 802.89 55.00 5.738841 6.688213 27.90 NY 31 1.00 47.00 453.46 688.38 44.00 6.116911 6.534344 39.71 NC 1 0.00 35.00 16.76 82.15 54.00 2.818876 4.40851 16.94 NC 4 0.00 42.00 745.73 1006.64 56.00 6.614358 6.914374 42.56 NC 5 0.00 47.00 718.02 756.11 60.00 6.57649 6.628193 48.71 NC 6 1.00 38.00 583.01 738.09 39.00 6.368209 6.604063 44.13 NC 8 0.00 48.00 242.78 581.89 62.00 5.492164 6.366278 29.44 NC 10 1.00 39.00 44.33 302.21 35.00 3.791639 5.711139 12.79 ND 1 0.00 29.00 1.15 143.21 57.00 .1432342 4.964312 0.80 OH 2 1.00 28.00 13.96 125.68 38.00 2.636268 4.833755 10.00 OH 6 1.00 26.00 43.49 884.75 36.00 3.772416 6.78531 4.68 OH 9 0.00 19.00 47.94 244.03 47.00 3.870054 5.497291 16.42 OH 11 0.00 38.00 860.77 561.07 56.00 6.757823 6.329846 60.54 OH 14 0.00 25.00 13.24 419.01 48.00 2.583545 6.037883 3.06 OH 15 1.00 25.00 6.68 211.96 38.00 1.899417 5.356412 3.06 OH 17 0.00 23.00 2.39 96.00 38.00 .8717117 4.564379 2.43 OH 19 0.00 30.00 0.52 226.09 55.00 -.6500877 5.420916 0.23 OK 1 1.00 48.00 253.59 484.58 39.00 5.535699 6.183293 34.35 OK 2 0.00 35.00 81.63 358.70 53.00 4.402246 5.8825 18.54 OK 5 1.00 28.00 0.30 318.82 33.00 -1.197328 5.764633 0.09 OR 4 0.00 28.00 58.56 279.81 46.00 4.070103 5.634107 17.31 PA 1 0.00 24.00 1.64 234.96 34.00 .4965239 5.459403 0.69 PA 3 0.00 37.00 23.10 250.48 52.00 3.139876 5.523379 8.44 PA 6 0.00 37.00 12.00 121.43 62.00 2.485073 4.799379 8.99 PA 7 1.00 32.00 203.58 507.36 40.00 5.316069 6.229221 28.64 PA 8 0.00 43.00 507.68 1089.61 62.00 6.229855 6.993577 31.78 PA 13 1.00 33.00 60.67 225.41 44.00 4.105482 5.41793 21.21 PA 15 1.00 43.00 355.02 752.33 45.00 5.872163 6.623178 32.06 PA 23 1.00 38.00 106.46 336.67 44.00 4.667798 5.819118 24.02 RI 1 1.00 44.00 801.29 385.40 58.00 6.686222 5.954287 67.52 SC 1 1.00 36.00 82.04 118.70 39.00 4.407146 4.776616 40.87 SC 3 0.00 46.00 354.58 641.43 67.00 5.87092 6.463698 35.60 SC 4 0.00 48.00 630.91 1143.35 68.00 6.447168 7.041718 35.56 SD 1 0.00 28.00 199.42 632.10 53.00 5.295413 6.449056 23.98 TN 6 0.00 24.00 12.62 454.35 61.00 2.535521 6.118859 2.70 TX 1 0.00 38.00 94.48 505.61 53.00 4.548357 6.225768 15.74 TX 5 0.00 39.00 179.20 646.22 50.00 5.188508 6.471137 21.71 TX 6 1.00 32.00 17.41 654.26 38.00 2.857275 6.483505 2.59 TX 13 0.00 48.00 476.22 384.74 64.00 6.16588 5.952563 55.31 TX 14 0.00 47.00 645.99 600.11 58.00 6.470781 6.39712 51.84 TX 23 0.00 35.00 6.36 187.30 51.00 1.850814 5.232722 3.29 TX 26 1.00 31.00 189.78 314.90 32.00 5.245865 5.752264 37.60 UT 1 1.00 40.00 391.93 426.90 28.00 5.971078 6.056554 47.86 UT 2 0.00 43.00 254.82 676.47 60.00 5.540569 6.516891 27.36 VA 1 1.00 27.00 30.30 284.70 40.00 3.411214 5.651443 9.62 VA 10 1.00 32.00 241.45 758.36 43.00 5.486642 6.631165 24.15 WA 1 1.00 45.00 625.93 1321.02 51.00 6.439232 7.18616 32.15 WA 3 0.00 50.00 354.14 684.21 49.00 5.869698 6.528259 34.11 WA 5 0.00 24.00 13.53 476.46 52.00 2.605205 6.166384 2.76 WA 6 0.00 32.00 37.62 288.17 50.00 3.627536 5.663544 11.55 WA 8 1.00 29.00 12.60 300.05 44.00 2.533776 5.703942 4.03 WV 1 0.00 25.00 15.22 103.15 49.00 2.72261 4.636223 12.86 WV 4 0.00 39.00 32.04 152.27 42.00 3.466954 5.025662 17.38 WI 3 1.00 32.00 22.63 359.80 53.00 3.1191 5.885551 5.92 WI 5 0.00 36.00 197.46 1278.53 36.00 5.285536 7.153463 13.38 WI 7 0.00 38.00 202.59 450.72 46.00 5.311189 6.110837 31.01 WI 8 1.00 30.00 14.42 227.82 47.00 2.668685 5.428569 5.95 ; /* Method 1 Direct Calculation of t-statistic */ /* This output allows you to calculate the t-statistic directly. */ title 'Direct Calculation of t-statistic'; proc reg data=vote; model voteA = lexpendA lexpendB prtystrA/covb; run; /* Method 2 Reparameterization Approach */ /* Here we construct a variable for the reparameterized model. */ data vote; set vote; z = lexpendB - lexpendA; /* Here we estimate the reparametrized model. The coefficient on the lexpendA variable in this reparameterized model is the parameter (theta) representing the sum of beta1 and beta2. We just observe the t-statistic on the lexpendA variable. Up to minute rounding error, this t-statistic should be the same as the one you obtain in calculating the t-statistic directly the variance-covariance matrix in the first approach above. */ title 'Reparametrization Approach'; proc reg data=vote; model voteA = lexpendA z prtystrA; run; /* Method 3 Restricted vs. Unrestricted Models */ title 'Unrestricted Model'; proc reg data=vote; model voteA = lexpendA lexpendB prtystrA; title 'The unrestricted model and its SSR'; title 'Restricted Model'; proc reg data=vote; model voteA = z prtystrA; title 'The restricted model and its SSR'; run;