how do I test a single category of a categorical variables coefficients statistical significance ?
-
Login or Register
- Log in with
. sysuse auto.dta (1978 automobile data) . regress price i.rep78 Source | SS df MS Number of obs = 69 -------------+---------------------------------- F(4, 64) = 0.24 Model | 8360542.63 4 2090135.66 Prob > F = 0.9174 Residual | 568436416 64 8881819 R-squared = 0.0145 -------------+---------------------------------- Adj R-squared = -0.0471 Total | 576796959 68 8482308.22 Root MSE = 2980.2 ------------------------------------------------------------------------------ price | Coefficient Std. err. t P>|t| [95% conf. interval] -------------+---------------------------------------------------------------- rep78 | 2 | 1403.125 2356.085 0.60 0.554 -3303.696 6109.946 3 | 1864.733 2176.458 0.86 0.395 -2483.242 6212.708 4 | 1507 2221.338 0.68 0.500 -2930.633 5944.633 5 | 1348.5 2290.927 0.59 0.558 -3228.153 5925.153 | _cons | 4564.5 2107.347 2.17 0.034 354.5913 8774.409 ------------------------------------------------------------------------------ . mat list e(b) e(b)[1,6] 1b. 2. 3. 4. 5. rep78 rep78 rep78 rep78 rep78 _cons y1 0 1403.125 1864.7333 1507 1348.5 4564.5 . test 2.rep78 ( 1) 2.rep78 = 0 F( 1, 64) = 0.35 Prob > F = 0.5536 .
* Example generated by -dataex-. For more info, type help dataex clear input long pidp float(netpay_may netpay_base ghq_may ghq_base ______________) int age float female byte(region qual health job_status urban ethnic marstat life_sat) float(vaccine furloughed_may pay wellbeing) byte Gender float(qual1 age2) 76165 109.80058 111.70615 12 11 0 35 1 5 3 2 1 1 1 1 6 0 0 -1.905571 1 1 2 1225 280165 82.13687 68.99497 7 7 0 39 1 8 4 2 1 0 1 1 5 0 1 13.1419 0 1 2 1521 599765 84.23958 85.12666 7 7 0 31 1 5 2 2 1 1 1 5 7 0 0 -.8870773 0 1 1 961 732365 . . 31 22 0 33 0 2 9 5 4 1 1 5 2 0 0 . 9 1 3 1089 1587125 85.71429 85.71429 12 23 0 52 1 1 2 3 1 1 3 5 4 0 0 0 -11 1 1 2704 4849085 103.49246 95.60732 15 35 0 35 0 11 1 3 1 1 1 1 2 1 0 7.885139 -20 1 1 1225 68002725 . . 6 11 0 64 1 7 3 4 4 1 3 4 4 0 . . -5 1 2 4096 68010887 459.9665 42.71117 18 7 0 54 1 1 1 2 3 1 1 1 6 1 0 417.2553 11 1 1 2916 68031967 . . 10 23 0 70 1 5 4 4 4 1 1 3 3 0 0 . -13 1 2 4900 68035365 . . 11 7 0 66 0 7 5 3 4 1 1 3 5 0 0 . 4 1 2 4356 68035367 128.13351 121.56257 30 12 0 37 0 1 1 3 1 0 1 1 7 0 0 6.570946 18 1 1 1369 68041487 101.84972 105.1352 5 10 0 48 1 11 1 2 1 0 1 1 6 0 0 -3.285477 -5 1 1 2304 68045567 77.57006 77.27437 5 7 0 56 1 1 1 2 1 0 1 1 6 0 0 .29569244 -2 1 1 3136 68046247 . . 6 9 0 75 0 1 3 2 4 0 1 1 6 0 0 . -3 1 2 5625 68046251 . . 8 8 0 73 1 1 4 2 4 0 1 1 6 0 0 . 0 1 2 5329 68051007 23.622564 23.622564 20 19 0 57 0 1 1 3 1 1 1 1 3 0 0 0 1 1 1 3249 68051011 68.99497 75.565926 21 9 0 50 1 1 2 2 1 1 1 1 6 1 0 -6.570953 12 1 1 2500 68058487 . . 13 10 0 78 0 1 1 3 4 0 1 1 6 1 0 . 3 1 1 6084 68058491 . . 23 22 0 69 1 1 4 3 4 0 1 1 6 0 0 . 1 1 2 4761 68060527 88.70782 95.27877 10 7 0 44 0 1 1 2 1 0 1 1 6 0 0 -6.570946 3 1 1 1936 68060533 . . 8 21 0 62 1 7 4 3 3 1 2 1 5 0 0 . -13 1 2 3844 68060537 . . 7 7 0 74 0 7 1 2 4 1 3 1 6 1 0 . 0 1 1 5476 68061288 12.221967 25.85669 13 11 0 32 1 1 1 3 2 1 1 2 5 0 0 -13.63472 2 1 1 1024 68063247 17.714285 19.285715 6 6 0 51 1 2 4 2 4 1 1 1 7 0 0 -1.5714302 0 1 2 2601 68063927 . . 10 7 0 48 1 2 5 1 1 1 1 1 6 1 0 . 3 1 2 2304 68063931 39.4257 36.140224 12 8 0 50 0 2 2 3 1 1 1 1 4 0 0 3.285473 4 1 1 2500 68064605 . . 7 6 0 69 0 7 2 4 4 1 1 1 7 1 0 . 1 1 1 4761 68064609 . . 6 7 0 66 1 7 4 3 4 1 1 1 1 1 0 . -1 1 2 4356 68068007 68.99497 68.99497 6 6 0 51 0 2 4 3 4 1 1 1 6 0 0 0 0 1 2 2601 68068011 60.78128 60.78128 7 9 0 51 1 2 4 3 1 1 1 1 6 0 0 0 -2 1 2 2601 68068015 56.31304 52.5676 10 6 0 26 1 2 3 2 4 1 1 2 6 0 0 3.7454414 4 1 2 676 68097245 . . 20 10 0 68 1 7 4 2 4 1 1 4 7 0 0 . 10 1 2 4624 68097927 . . 13 11 0 68 1 2 3 5 2 1 1 4 5 1 0 . 2 1 2 4624 68112211 19.71285 32.854748 26 25 0 32 1 2 3 3 1 1 1 1 3 0 1 -13.1419 1 1 2 1024 68120367 . . 6 8 0 67 1 2 5 4 4 0 1 4 7 0 0 . -2 1 2 4489 68120375 62.5883 60.78128 8 9 0 38 1 2 3 1 1 1 1 5 6 0 0 1.8070145 -1 1 2 1444 68125127 42.71117 42.71117 7 7 0 52 1 2 3 3 1 1 1 4 6 0 0 0 0 1 2 2704 68125131 55.52452 49.57782 10 9 0 27 0 2 1 2 1 1 1 5 6 0 0 5.946709 1 1 1 729 68125135 59.13855 52.5676 11 9 0 22 1 2 1 2 1 1 1 5 7 0 0 6.57095 2 1 1 484 68133285 . . 9 11 0 69 1 8 3 3 4 1 1 4 6 0 0 . -2 1 2 4761 68133289 . . 27 24 0 33 1 7 1 3 2 1 1 1 6 0 0 . 3 1 1 1089 68136009 34.85889 34.497486 6 6 0 66 1 7 4 2 2 0 1 3 6 0 0 .3614044 0 1 2 4356 68137365 . . 11 9 0 64 1 8 9 2 4 1 1 3 5 0 0 . 2 1 3 4096 68138045 . . 9 6 0 69 0 8 2 4 4 0 1 1 6 0 0 . 3 1 1 4761 68138049 . . 8 7 0 68 1 8 5 2 4 0 1 1 6 0 0 . 1 1 2 4624 68138051 . . 7 10 0 64 1 2 4 4 4 1 1 2 5 0 0 . -3 1 2 4096 68144847 90.48198 95.27877 7 8 0 50 0 2 3 3 3 1 1 1 6 0 0 -4.796791 -1 1 2 2500 68144851 166.14647 162.17104 10 12 0 42 1 2 1 2 1 1 1 1 5 0 0 3.975433 -2 1 1 1764 68148247 . . 6 6 0 70 0 2 3 3 4 1 1 1 6 1 0 . 0 1 2 4900 68148251 . . 11 9 0 71 1 2 5 3 4 1 1 1 6 0 0 . 2 1 2 5041 68150967 45.71429 39.4257 7 11 0 56 0 2 4 2 3 1 1 1 6 0 0 6.288589 -4 1 2 3136 68150971 52.5676 52.5676 12 15 0 59 1 2 4 3 1 1 1 1 6 0 0 0 -3 1 2 3481 68150975 59.13855 57.49581 25 5 0 30 0 2 4 2 1 1 1 5 6 0 0 1.6427383 20 1 2 900 68155047 . . 1 12 0 61 1 2 4 3 4 1 1 1 6 1 . . -11 1 2 3721 68155051 88.70782 85.42235 8 6 0 66 0 2 5 2 1 1 1 1 6 0 0 3.285477 2 1 2 4356 68155055 45.99665 39.4257 12 8 0 29 1 2 1 2 3 1 1 5 5 0 0 6.570953 4 1 1 841 68155731 116.3058 110.39196 9 10 0 49 1 2 1 3 1 1 1 1 5 0 0 5.913849 -1 1 1 2401 68157767 68.99497 91.46762 15 17 0 53 1 2 3 3 2 1 1 5 6 0 0 -22.47265 -2 1 2 2809 68159131 61.5698 59.13855 14 19 0 38 1 2 1 3 1 1 1 1 2 1 0 2.4312515 -5 1 1 1444 68160485 17.79603 . 31 18 0 67 1 8 4 3 3 1 1 4 4 1 0 . 13 1 2 4489 68160489 105.1352 158.79535 7 12 0 42 0 8 1 2 1 1 1 5 5 0 0 -53.66015 -5 1 1 1764 68173407 . . 13 10 0 61 1 2 5 3 4 1 1 1 2 0 0 . 3 1 2 3721 68180887 12.857142 10.857142 26 19 0 48 1 2 1 4 2 1 1 1 4 0 0 2 7 1 1 2304 68180891 122.02254 124.84805 13 9 0 46 0 2 1 2 1 1 1 1 6 0 0 -2.825508 4 1 1 2116 68184971 26.678057 26.2838 11 11 0 43 1 2 1 1 4 1 1 1 2 1 0 .3942566 0 1 1 1849 68185647 . . 9 7 0 56 1 2 1 2 1 1 1 4 4 1 0 . 2 1 1 3136 68187687 . . 6 6 0 63 0 2 1 2 4 1 1 1 6 0 0 . 0 1 1 3969 68187691 . 1.8070112 21 12 0 59 1 2 1 3 4 1 1 1 5 0 0 . 9 1 1 3481 68191771 64.36246 120.46543 21 8 0 46 1 2 2 2 1 1 1 4 4 0 0 -56.10297 13 1 1 2116 68193127 . . 5 3 0 65 1 2 3 2 4 1 1 4 6 0 0 . 2 1 2 4225 68195167 . . 11 11 0 75 0 2 4 3 4 1 1 1 6 1 0 . 0 1 2 5625 68195171 . . 10 8 0 75 1 2 5 3 4 1 1 1 6 1 0 . 2 1 2 5625 68195851 65.54523 60.78128 8 14 0 44 1 2 3 4 1 1 1 1 5 0 0 4.7639427 -6 1 2 1936 68197211 44.35391 45.99665 14 10 0 45 1 2 2 2 2 1 1 2 6 0 0 -1.6427383 4 1 1 2025 68197887 63.50823 63.50823 12 9 0 57 1 2 4 3 2 1 1 4 5 0 0 0 3 1 2 3249 68197903 32.854748 . 5 13 0 20 0 2 9 2 4 1 1 5 4 0 0 . -8 1 3 400 68199247 98.56425 131.41899 5 10 0 34 0 8 3 2 1 1 1 2 6 0 0 -32.854744 -5 1 2 1156 68202647 82.13687 75.565926 8 7 0 43 1 2 1 2 1 1 1 2 5 0 0 6.570946 1 1 1 1849 68207407 . . 9 10 0 74 1 2 4 2 4 1 1 1 4 1 0 . -1 1 2 5476 68207411 . . 9 8 0 79 0 2 4 3 4 1 1 1 6 1 0 . 1 1 2 6241 68211487 . . 7 7 0 66 0 2 1 3 4 1 1 5 6 0 0 . 0 1 1 4356 68213527 . . 22 4 0 40 1 2 1 2 1 1 1 1 6 0 . . 18 1 1 1600 68214207 52.5676 55.85307 16 11 0 59 0 2 9 3 3 1 1 4 6 1 0 -3.285473 5 1 3 3481 68214887 180.70113 180.70113 16 9 0 47 0 2 1 1 1 1 1 1 6 0 0 0 7 1 1 2209 68214891 180.70113 147.84637 8 15 0 45 1 2 1 2 1 1 2 1 6 0 0 32.85475 -7 1 1 2025 68216247 94.49026 93.40605 23 19 0 44 1 2 1 3 2 1 1 2 3 0 0 1.0842056 4 1 1 1936 68216251 78.85139 88.70782 21 13 0 43 0 2 1 2 1 1 1 2 6 0 0 -9.85643 8 1 1 1849 68219647 91.9933 88.70782 6 13 0 48 1 2 1 2 1 1 2 2 6 0 0 3.285477 -7 1 1 2304 68231223 . . 12 16 0 19 1 3 2 4 4 1 1 5 3 0 0 . -4 1 1 361 68238011 46.09521 42.64547 12 11 0 60 1 3 1 4 3 1 1 1 5 1 0 3.449749 1 1 1 3600 68262487 42.85714 39.4257 7 6 0 48 0 3 5 3 2 0 1 2 4 0 0 3.431446 1 1 2 2304 68266567 . . 21 15 0 81 1 3 2 3 4 0 1 3 5 1 0 . 6 1 1 6561 68278127 . . 13 9 0 71 1 3 4 3 4 1 1 4 6 1 0 . 4 1 2 5041 68288327 72.28045 65.709496 8 9 0 45 1 3 1 3 1 1 1 1 5 1 0 6.570953 -1 1 1 2025 68288331 77.63577 77.53721 5 5 0 45 0 3 1 3 1 1 1 1 6 0 0 .09856415 0 1 1 2025 68291731 . 18.760061 18 18 0 63 1 3 3 2 4 1 1 3 1 0 0 . 0 1 2 3969 68293087 . . 8 8 0 50 1 3 9 2 4 1 1 1 6 0 0 . 0 1 3 2500 68293095 . 45.99665 9 6 0 30 0 3 3 4 1 1 1 1 6 0 0 . 3 1 2 900 68293099 52.5676 52.5676 8 5 0 27 0 3 1 2 2 1 1 5 6 0 0 0 3 1 1 729 68293103 47.44226 49.28212 10 4 0 16 1 3 4 2 2 1 3 5 6 1 0 -1.8398666 6 1 2 256 end label values age j_dvage label values region j_gor_dv label def j_gor_dv 1 "North East", modify label def j_gor_dv 2 "North West", modify label def j_gor_dv 3 "Yorkshire and the Humber", modify label def j_gor_dv 5 "West Midlands", modify label def j_gor_dv 7 "London", modify label def j_gor_dv 8 "South East", modify label def j_gor_dv 11 "Scotland", modify label values qual j_hiqual_dv label def j_hiqual_dv 1 "Degree", modify label def j_hiqual_dv 2 "Other higher degree", modify label def j_hiqual_dv 3 "A-level etc", modify label def j_hiqual_dv 4 "GCSE etc", modify label def j_hiqual_dv 5 "Other qualification", modify label def j_hiqual_dv 9 "No qualification", modify label values health j_scsf1 label def j_scsf1 1 "Excellent", modify label def j_scsf1 2 "Very good", modify label def j_scsf1 3 "Good", modify label def j_scsf1 4 "Fair", modify label def j_scsf1 5 "Poor", modify label values job_status job_status label def job_status 1 "Managerial/Professional", modify label def job_status 2 "Intermediate", modify label def job_status 3 "Routine", modify label def job_status 4 "No job", modify label values urban j_urban_dv label def j_urban_dv 1 "urban area", modify label values ethnic ethnic label def ethnic 1 "White", modify label def ethnic 2 "Mixed", modify label def ethnic 3 "Asian", modify label values marstat marstat label def marstat 1 "Married", modify label def marstat 2 "Living as couple", modify label def marstat 3 "Widowed", modify label def marstat 4 "Divorced/Separated", modify label def marstat 5 "Never married", modify label values life_sat j_sclfsato label def j_sclfsato 1 "Completely dissatisfied", modify label def j_sclfsato 2 "Mostly dissatisfied", modify label def j_sclfsato 3 "Somewhat dissatisfied", modify label def j_sclfsato 4 "Neither Sat nor Dissat", modify label def j_sclfsato 5 "Somewhat satisfied", modify label def j_sclfsato 6 "Mostly satisfied", modify label def j_sclfsato 7 "Completely satisfied", modify label values qual1 qual1_label label def qual1_label 1 "Degree or other Higher Degree", modify label def qual1_label 2 "A-Level GCSE and Other", modify label def qual1_label 3 "No Qualification", modify
test 1.qual1
. reg wellbeing female age age2 ib3.qual1 ib3.health ib6.region, allbase note: 6b.region identifies no observations in the sample. note: 11.region omitted because of collinearity. Source | SS df MS Number of obs = 100 -------------+---------------------------------- F(15, 84) = 1.47 Model | 773.63066 15 51.5753773 Prob > F = 0.1337 Residual | 2938.20934 84 34.9786826 R-squared = 0.2084 -------------+---------------------------------- Adj R-squared = 0.0671 Total | 3711.84 99 37.4933333 Root MSE = 5.9143 ------------------------------------------------------------------------------------------------ wellbeing | Coefficient Std. err. t P>|t| [95% conf. interval] -------------------------------+---------------------------------------------------------------- female | -.5832279 1.297474 -0.45 0.654 -3.163398 1.996942 age | -.0648296 .2504649 -0.26 0.796 -.5629065 .4332474 age2 | .0005408 .0024678 0.22 0.827 -.0043666 .0054483 | qual1 | Degree or other Higher Degree | 2.560799 3.016708 0.85 0.398 -3.438255 8.559854 A-Level GCSE and Other | .8276746 3.012341 0.27 0.784 -5.162697 6.818046 No Qualification | 0 (base) | health | Excellent | 1.405571 3.210649 0.44 0.663 -4.979156 7.790299 Very good | 1.489965 1.39135 1.07 0.287 -1.276888 4.256818 Good | 0 (base) Fair | -2.014972 2.10495 -0.96 0.341 -6.200896 2.170953 Poor | 5.722094 4.550506 1.26 0.212 -3.327087 14.77127 | region | North East | 15.98857 4.572078 3.50 0.001 6.896493 25.08065 North West | 15.16272 4.341384 3.49 0.001 6.529398 23.79604 Yorkshire and the Humber | 15.76608 4.635664 3.40 0.001 6.547555 24.98461 West Midlands | 10.29572 5.576221 1.85 0.068 -.7932058 21.38465 6 | 0 (empty) London | 14.47203 4.778035 3.03 0.003 4.970379 23.97367 South East | 15.00662 4.822408 3.11 0.003 5.416734 24.59651 Scotland | 0 (omitted) | _cons | -13.77806 7.987487 -1.72 0.088 -29.66205 2.105937 ------------------------------------------------------------------------------------------------ . mat list e(b) e(b)[1,20] 1. 2. 3b. 1. 2. 3b. 4. 5. female age age2 qual1 qual1 qual1 health health health health health y1 -.58322794 -.06482955 .00054084 2.5607991 .82767458 0 1.4055713 1.4899646 0 -2.0149717 5.7220942 1. 2. 3. 5. 6b. 7. 8. 11o. region region region region region region region region _cons y1 15.988571 15.162717 15.766081 10.295721 0 14.472026 15.006622 0 -13.778056 . nlcom _b[1.qual1]*_b[7.region] _nl_1: _b[1.qual1]*_b[7.region] ------------------------------------------------------------------------------ wellbeing | Coefficient Std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- _nl_1 | 37.05995 45.95018 0.81 0.420 -53.00075 127.1207 ------------------------------------------------------------------------------ .
Comment