Dorian Allen
November 14, 2022
DECS 431
Professor Deserranno
DECS431 Assignment 7
Part 1:
Question 1:
a) 1182.9666 HP, [1029.1019 HP, 1336.8313 HP]
. reg lnhp enginesize cylinders rpm manual manuales
Source | SS df MS Number of obs = 82
-------------+---------------------------------- F(5, 76) = 196.13
Model | 9.67711682 5 1.93542336 Prob > F = 0.0000
Residual | .749989535 76 .009868283 R-squared = 0.9281
-------------+---------------------------------- Adj R-squared = 0.9233
Total | 10.4271064 81 .128729708 Root MSE = .09934
------------------------------------------------------------------------------
lnhp | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
enginesize | .2195166 .0334462 6.56 0.000 .1529027 .2861306
cylinders | .0485263 .0192086 2.53 0.014 .010269 .0867835
rpm | .2948873 .0231289 12.75 0.000 .248822 .3409526
manual | -.6735393 .0917133 -7.34 0.000 -.8562022 -.4908764
manuales | .2745843 .0304751 9.01 0.000 .2138878 .3352807
_cons | 2.564791 .1567421 16.36 0.000 2.252612 2.87697
------------------------------------------------------------------------------
lnhp = 2.564791 + 0.2195166*enginesize + 0.0485263*cylinders + 0.2948873*rpm -
0.6735393*manual + 0.2745843*manueles
lnhp = 2.564791 + 0.2195166*3 + 0.0485263*4 + 0.2948873*4000 - 0.6735393*0 +
0.2745843*(0*3)
. di 2.564791 + 0.2195166*3 + 0.0485263*4 + 0.2948873*4000 - 0.6735393*0 + 0.2745
> 843*(0*3)
1182.9666
. kpredint _b[_cons] + _b[enginesize]*3 + _b[cylinders]*4 + _b[rpm]*4000 +
_b[manual]*0 + _b[manuales]*0, level (90)
Estimate: 1182.9666
Standard Error of Individual Prediction: 92.402818
Individual Prediction Interval (90%): [ 1029.1019 , 1336.8313 ]
t-ratio: 12.802279
If Ha: < then Pr(T < t) = 1
If Ha: not = then Pr(|T| > |t|) = 0
If Ha: > then Pr(T > t) = 0
b) Manual: 1184.2991 HP
Automatic: 1183.5998 HP
. kpredint _b[_cons] + _b[enginesize]*5 + _b[cylinders]*8 + _b[rpm]*4000 +
_b[manual]*0 + _b[manuales]*0
Estimate: 1183.5998
Standard Error of Individual Prediction: 92.409543
Individual Prediction Interval (95%): [ 999.55021 , 1367.6493 ]
t-ratio: 12.808198
If Ha: < then Pr(T < t) = 1
If Ha: not = then Pr(|T| > |t|) = 0
If Ha: > then Pr(T > t) = 0
. kpredint _b[_cons] + _b[enginesize]*5 + _b[cylinders]*8 + _b[rpm]*4000 +
_b[manual]*1 + _b[manuales]*1*5
Estimate: 1184.2991
Standard Error of Individual Prediction: 92.399846
Individual Prediction Interval (95%): [ 1000.2689 , 1368.3294 ]
t-ratio: 12.817112
If Ha: < then Pr(T < t) = 1
If Ha: not = then Pr(|T| > |t|) = 0
If Ha: > then Pr(T > t) = 0
Part II:
1.
Using a fixed effect model, we estimate that hiring 10 additional nurses and holding caseweight,
residency, and percent of patients on medicare constant will increase I recommend hiring the 10
additional nurses will increase mortality by 0.00965800666% and decrease the hospital’s bonus
by $48,290.03. We are 95% confident that the change in mortality will be between -0.1039917%
and 0.1233077% and the change in bonus will be between -$519958.5 and $616538.6.
Because of the estimated increase in mortality and decrease in bonus, along with the widespread
95% confidence intervals for mortality and bonus, we recommend that the hospital does not hire
10 more nurses.
. xi: regress mortality nsr caseweight residency pctMedicare i.hospname
i.hospname _Ihospname_1-42 (_Ihospname_1 for hos~e==AC HOSPITAL omitte
> d)
Source | SS df MS Number of obs = 420
-------------+---------------------------------- F(45, 374) = 49.18
Model | 1060.91986 45 23.5759968 Prob > F = 0.0000
Residual | 179.282149 374 .479364034 R-squared = 0.8554
-------------+---------------------------------- Adj R-squared = 0.8380
Total | 1240.20201 419 2.95990932 Root MSE = .69236
-------------------------------------------------------------------------------
mortality | Coefficient Std. err. t P>|t| [95% conf. interval]
--------------+----------------------------------------------------------------
nsr | .1448701 .8669695 0.17 0.867 -1.559876 1.849616
caseweight | .2974003 .1272929 2.34 0.020 .0471009 .5476997
residency | -.2710708 .3474306 -0.78 0.436 -.954233 .4120914
pctMedicare | .1062218 .0163883 6.48 0.000 .0739971 .1384465
_Ihospname_2 | .3037307 .3460192 0.88 0.381 -.3766562 .9841176
_Ihospname_3 | -1.355884 .3401894 -3.99 0.000 -2.024808 -.6869602
_Ihospname_4 | -.4989155 .5099315 -0.98 0.329 -1.501608 .5037766
_Ihospname_5 | -.4372591 .3354039 -1.30 0.193 -1.096773 .2222548
_Ihospname_6 | .165895 .5629181 0.29 0.768 -.9409862 1.272776
_Ihospname_7 | .3994051 .3514217 1.14 0.256 -.291605 1.090415
_Ihospname_8 | 2.128898 .3475411 6.13 0.000 1.445518 2.812277
_Ihospname_9 | .9930904 .4409635 2.25 0.025 .1260119 1.860169
_Ihospname_10 | .9996087 .4060764 2.46 0.014 .2011296 1.798088
_Ihospname_11 | .5629445 .3147577 1.79 0.075 -.0559722 1.181861
_Ihospname_12 | 2.210086 .5138345 4.30 0.000 1.199719 3.220453
_Ihospname_13 | 1.604368 .327361 4.90 0.000 .9606687 2.248066
_Ihospname_14 | .8758878 .3142792 2.79 0.006 .257912 1.493864
_Ihospname_15 | 1.185085 .4668106 2.54 0.012 .2671829 2.102987
_Ihospname_16 | 1.939404 .5292903 3.66 0.000 .8986459 2.980162
_Ihospname_17 | -1.024885 .3364378 -3.05 0.002 -1.686432 -.363338
_Ihospname_18 | 1.598328 .3205018 4.99 0.000 .9681161 2.228539
_Ihospname_19 | -.3150782 .3705605 -0.85 0.396 -1.043721 .413565
_Ihospname_20 | 1.385918 .3688801 3.76 0.000 .6605791 2.111257
_Ihospname_21 | 2.224351 .4784183 4.65 0.000 1.283624 3.165078
_Ihospname_22 | -3.364465 .4720691 -7.13 0.000 -4.292707 -2.436223
_Ihospname_23 | 1.389077 .3331095 4.17 0.000 .7340748 2.044079
_Ihospname_24 | -1.661441 .3487237 -4.76 0.000 -2.347146 -.9757365
_Ihospname_25 | -2.691871 .3665034 -7.34 0.000 -3.412536 -1.971205
_Ihospname_26 | 1.741766 .4818951 3.61 0.000 .7942028 2.68933
_Ihospname_27 | -2.169044 .3869555 -5.61 0.000 -2.929925 -1.408163
_Ihospname_28 | -1.001063 .4410777 -2.27 0.024 -1.868366 -.1337599
_Ihospname_29 | -.5832321 .3695564 -1.58 0.115 -1.309901 .1434366
_Ihospname_30 | .230334 .5285832 0.44 0.663 -.8090335 1.269701
_Ihospname_31 | .6990217 .4861926 1.44 0.151 -.2569921 1.655035
_Ihospname_32 | .185398 .4858674 0.38 0.703 -.7699762 1.140772
_Ihospname_33 | -3.367132 .3810545 -8.84 0.000 -4.11641 -2.617855
_Ihospname_34 | -1.058751 .3264561 -3.24 0.001 -1.70067 -.4168315
_Ihospname_35 | 1.843225 .4893121 3.77 0.000 .881077 2.805372
_Ihospname_36 | -3.08848 .3834834 -8.05 0.000 -3.842533 -2.334426
_Ihospname_37 | .0977259 .3549504 0.28 0.783 -.6002226 .7956745
_Ihospname_38 | .1946616 .4241953 0.46 0.647 -.6394451 1.028768
_Ihospname_39 | 1.252776 .3557511 3.52 0.000 .5532527 1.952299
_Ihospname_40 | .8152586 .3778435 2.16 0.032 .0722946 1.558223
_Ihospname_41 | -3.314349 .4594495 -7.21 0.000 -4.217777 -2.410921
_Ihospname_42 | 1.255065 .3130669 4.01 0.000 .6394735 1.870657
_cons | 2.501244 .5114636 4.89 0.000 1.495539 3.506949
-------------------------------------------------------------------------------
. areg mortality nsr caseweight residency pctMedicare, absorb(hospname)
Linear regression, absorbing indicators Number of obs = 420
Absorbed variable: hospname No. of categories = 42
F(4, 374) = 17.71
Prob > F = 0.0000
R-squared = 0.8554
Adj R-squared = 0.8380
Root MSE = 0.6924
------------------------------------------------------------------------------
mortality | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
nsr | .1448701 .8669695 0.17 0.867 -1.559876 1.849616
caseweight | .2974003 .1272929 2.34 0.020 .0471009 .5476997
residency | -.2710708 .3474306 -0.78 0.436 -.954233 .4120914
pctMedicare | .1062218 .0163883 6.48 0.000 .0739971 .1384465
_cons | 2.557183 .5549132 4.61 0.000 1.466043 3.648324
------------------------------------------------------------------------------
F test of absorbed indicators: F(41, 374) = 40.748 Prob > F = 0.000
Mortality = 2.557183 + 0.1448701*nsr + 0.2974003*caseweight – 0.2710708*residency +
0.1062218*pctMedicare
Δmortality = 0.1448701*Δnsr + 0.2974003*Δcasewight – 0.2710708*Δresidency +
0.1062218*Δpctmedicare
Δmortality = 0.1448701*(10/150)
Δmortality = 0.00965800666
Bonus = $5 million*mortality
ΔBonus = $5 million*Δmortality
ΔBonus = $5 million*0.00965800666
ΔBonus = $48,290.0333333
. klincom _b[nsr]*(10/150)
( 1) .0666667*nsr = 0
------------------------------------------------------------------------------
mortality | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
(1) | .009658 .057798 0.17 0.867 -.1039917 .1233077
------------------------------------------------------------------------------
If Ha: < then Pr(T < t) = .566
If Ha: not = then Pr(|T| > |t|) = .867
If Ha: > then Pr(T > t) = .434
. klincom _b[nsr]*(10/150)*5000000
( 1) 333333.3*nsr = 0
------------------------------------------------------------------------------
mortality | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
(1) | 48290.05 288989.8 0.17 0.867 -519958.5 616538.6
------------------------------------------------------------------------------
If Ha: < then Pr(T < t) = .566
If Ha: not = then Pr(|T| > |t|) = .867
If Ha: > then Pr(T > t) = .434
2.
a. Within hospitals: As nsr increases, on average, caseweight increases as well. We gather this by
looking at the coefficient for nsr (0.1448701) with a fixed effects regression model that holds
hospitals constant.
b. Across hospitals: As nsr increases, on average, caseweight decreases. We gather this by
looking at the coefficient for nsr (-6.292554) for a regression model that does not hold hospitals
constant.
. areg mortality nsr caseweight residency pctMedicare, absorb(hospname)
Linear regression, absorbing indicators Number of obs = 420
Absorbed variable: hospname No. of categories = 42
F(4, 374) = 17.71
Prob > F = 0.0000
R-squared = 0.8554
Adj R-squared = 0.8380
Root MSE = 0.6924
------------------------------------------------------------------------------
mortality | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
nsr | .1448701 .8669695 0.17 0.867 -1.559876 1.849616
caseweight | .2974003 .1272929 2.34 0.020 .0471009 .5476997
residency | -.2710708 .3474306 -0.78 0.436 -.954233 .4120914
pctMedicare | .1062218 .0163883 6.48 0.000 .0739971 .1384465
_cons | 2.557183 .5549132 4.61 0.000 1.466043 3.648324
------------------------------------------------------------------------------
F test of absorbed indicators: F(41, 374) = 40.748 Prob > F = 0.000
. regress mortality nsr caseweight residency pctMedicare
Source | SS df MS Number of obs =
> 420
-------------+---------------------------------- F(4, 415) =
> 27.53
Model | 260.066352 4 65.0165879 Prob > F =
> 0.0000
Residual | 980.135654 415 2.36177266 R-squared =
> 0.2097
-------------+---------------------------------- Adj R-squared =
> 0.2021
Total | 1240.20201 419 2.95990932 Root MSE =
> 1.5368
---------------------------------------------------------------------
> ---------
mortality | Coefficient Std. err. t P>|t| [95% conf.
> interval]
-------------+-------------------------------------------------------
> ---------
nsr | -6.292554 .7977454 -7.89 0.000 -7.86068
> -4.724429
caseweight | .6231484 .1189139 5.24 0.000 .3893997
> .8568971
residency | 1.08284 .1757261 6.16 0.000 .737416
> 1.428264
pctMedicare | .0812151 .0145813 5.57 0.000 .0525526
> .1098776
_cons | 5.929582 .432559 13.71 0.000 5.079303
> 6.779862
---------------------------------------------------------------------
> ---------