-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCTOverdoseOutput.txt
99 lines (89 loc) · 3.41 KB
/
CTOverdoseOutput.txt
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
> # Will Clifford
> # ECON403 Econometrics I
> ### Display Tables
> # Gender:
Male 3780
Female 1325
> # Race:
White 4004
Hispanic 585
Black 433
Unknown.Other 49
Asian 34
> # Drug:
Heroin 2529
Cocaine 1521
Fentanyl 2228
FentanylAnalogue 389
Oxycodone 607
Oxymorphone 108
Ethanol 1247
Hydrocodone 118
Benzodiazepine 1343
Methadone 474
Amphet 159
Tramad 130
Morphine_NotHeroin 38
Hydromorphone 25
OpiateNOS 88
> # Number of drugs detected after overdose
1 1581
2 1861
3 1130
4 409
5 97
6 26
7 7
> ### Display Model Summaries
> bptest(ods_lm1)
studentized Breusch-Pagan test
BP = 63.605, df = 19, p-value = 1.027e-06
> coeftest(ods_lm1, hccm(ods_lm1))
t test of coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 39.717353 0.363025 109.4068 < 2.2e-16 ***
Female 0.066196 0.392022 0.1689 0.8659149
Black 5.137992 0.619214 8.2976 < 2.2e-16 ***
Hispanic 1.593790 0.522551 3.0500 0.0023001 **
Asian -6.252299 2.023934 -3.0892 0.0020179 **
Unknown.Other -0.362033 1.941468 -0.1865 0.8520805
Cocaine 1.734470 0.371796 4.6651 3.164e-06 ***
Fentanyl -2.108386 0.367344 -5.7395 1.004e-08 ***
FentanylAnalogue 0.623177 0.658693 0.9461 0.3441522
Oxycodone 4.151014 0.579529 7.1627 9.039e-13 ***
Oxymorphone -0.516896 1.262623 -0.4094 0.6822760
Ethanol 2.443670 0.375848 6.5018 8.700e-11 ***
Hydrocodone 5.381447 1.068608 5.0359 4.919e-07 ***
Benzodiazepine 1.385497 0.401691 3.4492 0.0005669 ***
Methadone 2.734988 0.564318 4.8465 1.294e-06 ***
Amphet -2.456259 0.921716 -2.6649 0.0077260 **
Tramad 6.620966 1.154707 5.7339 1.038e-08 ***
Morphine_NotHeroin 4.346455 1.553313 2.7982 0.0051585 **
Hydromorphone 6.841557 2.423727 2.8227 0.0047800 **
OpiateNOS 1.853343 1.383835 1.3393 0.1805394
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> bptest(ods_quad)
studentized Breusch-Pagan test
BP = 13.374, df = 7, p-value = 0.0635
> coeftest(ods_quad, hccm(ods_quad))
t test of coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.1995e+00 1.5256e-01 7.8621 4.576e-15 ***
Age 4.6211e-02 7.5498e-03 6.1208 1.001e-09 ***
I(Age^2) -5.0472e-04 8.8003e-05 -5.7353 1.030e-08 ***
Female -7.6302e-02 3.4171e-02 -2.2329 0.02560 *
Black -1.3214e-01 5.6534e-02 -2.3373 0.01946 *
Hispanic -8.4975e-02 4.5186e-02 -1.8806 0.06009 .
Asian 5.1126e-02 2.1723e-01 0.2354 0.81394
Unknown.Other 2.9000e-02 1.5962e-01 0.1817 0.85585
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> tp <- coefficients(ods_quad)["Age"]/(-2*coefficients(ods_quad)["I(Age^2)"])
> perc_tp <- ifelse(tp > 0, sum(ifelse(is.na(ods_csv$Age), 0, ods_csv$Age > tp)) / length(ods_csv$Age), "Negative Turning Point")
> tp
Age
45.77859
> perc_tp
Age
0.4150833