I leveraged the Drug Use by Age dataset from FiveThirtyEight https://github.com/fivethirtyeight/data. The reason I chose this dataset is because many people are addicted to drugs ranging from multiple ages and I wanted to explore which ages and what types of drugs certain people are addicted to.
This final project utilizes the “Drug Use by Age” dataset from FiveThirtyEight to explore the relationship between age and drug use. The primary research question investigates how drug use varies by age and identifies significant trends and patterns for specific substances. The dataset comprises survey data from the National Survey on Drug Use and Health, covering 17 distinct age groups ranging from 12 to 65+. The study is observational, with age as the independent variable and the percentage of users for various drugs as the dependent variables.
Using linear regression models, I analyzed the use of substances such as crack, alcohol, and heroin across different age groups. Each model revealed a straight line of best fit, indicating linear relationships between age and drug use for these substances. The analysis provided insights into how the propensity for drug use changes with age, highlighting significant relationships where appropriate.
By examining these patterns, the study aims to enhance understanding of drug addiction across age demographics, providing valuable information for public health strategies and interventions. The data and findings underscore the importance of age-specific approaches in addressing substance abuse.
## Warning: package 'DT' was built under R version 4.3.3
## Warning: package 'psych' was built under R version 4.3.3
# Load the data
drug_data <- read.csv("https://raw.githubusercontent.com/fivethirtyeight/data/master/drug-use-by-age/drug-use-by-age.csv")
# View the structure of the data
str(drug_data)## 'data.frame': 17 obs. of 28 variables:
## $ age : chr "12" "13" "14" "15" ...
## $ n : int 2798 2757 2792 2956 3058 3038 2469 2223 2271 2354 ...
## $ alcohol_use : num 3.9 8.5 18.1 29.2 40.1 49.3 58.7 64.6 69.7 83.2 ...
## $ alcohol_frequency : num 3 6 5 6 10 13 24 36 48 52 ...
## $ marijuana_use : num 1.1 3.4 8.7 14.5 22.5 28 33.7 33.4 34 33 ...
## $ marijuana_frequency : num 4 15 24 25 30 36 52 60 60 52 ...
## $ cocaine_use : num 0.1 0.1 0.1 0.5 1 2 3.2 4.1 4.9 4.8 ...
## $ cocaine_frequency : chr "5.0" "1.0" "5.5" "4.0" ...
## $ crack_use : num 0 0 0 0.1 0 0.1 0.4 0.5 0.6 0.5 ...
## $ crack_frequency : chr "-" "3.0" "-" "9.5" ...
## $ heroin_use : num 0.1 0 0.1 0.2 0.1 0.1 0.4 0.5 0.9 0.6 ...
## $ heroin_frequency : chr "35.5" "-" "2.0" "1.0" ...
## $ hallucinogen_use : num 0.2 0.6 1.6 2.1 3.4 4.8 7 8.6 7.4 6.3 ...
## $ hallucinogen_frequency : num 52 6 3 4 3 3 4 3 2 4 ...
## $ inhalant_use : num 1.6 2.5 2.6 2.5 3 2 1.8 1.4 1.5 1.4 ...
## $ inhalant_frequency : chr "19.0" "12.0" "5.0" "5.5" ...
## $ pain_releiver_use : num 2 2.4 3.9 5.5 6.2 8.5 9.2 9.4 10 9 ...
## $ pain_releiver_frequency: num 36 14 12 10 7 9 12 12 10 15 ...
## $ oxycontin_use : num 0.1 0.1 0.4 0.8 1.1 1.4 1.7 1.5 1.7 1.3 ...
## $ oxycontin_frequency : chr "24.5" "41.0" "4.5" "3.0" ...
## $ tranquilizer_use : num 0.2 0.3 0.9 2 2.4 3.5 4.9 4.2 5.4 3.9 ...
## $ tranquilizer_frequency : num 52 25.5 5 4.5 11 7 12 4.5 10 7 ...
## $ stimulant_use : num 0.2 0.3 0.8 1.5 1.8 2.8 3 3.3 4 4.1 ...
## $ stimulant_frequency : num 2 4 12 6 9.5 9 8 6 12 10 ...
## $ meth_use : num 0 0.1 0.1 0.3 0.3 0.6 0.5 0.4 0.9 0.6 ...
## $ meth_frequency : chr "-" "5.0" "24.0" "10.5" ...
## $ sedative_use : num 0.2 0.1 0.2 0.4 0.2 0.5 0.4 0.3 0.5 0.3 ...
## $ sedative_frequency : num 13 19 16.5 30 3 6.5 10 6 4 9 ...
## 'data.frame': 17 obs. of 28 variables:
## $ age : chr "12" "13" "14" "15" ...
## $ n : int 2798 2757 2792 2956 3058 3038 2469 2223 2271 2354 ...
## $ alcohol_use : num 3.9 8.5 18.1 29.2 40.1 49.3 58.7 64.6 69.7 83.2 ...
## $ alcohol_frequency : num 3 6 5 6 10 13 24 36 48 52 ...
## $ marijuana_use : num 1.1 3.4 8.7 14.5 22.5 28 33.7 33.4 34 33 ...
## $ marijuana_frequency : num 4 15 24 25 30 36 52 60 60 52 ...
## $ cocaine_use : num 0.1 0.1 0.1 0.5 1 2 3.2 4.1 4.9 4.8 ...
## $ cocaine_frequency : chr "5.0" "1.0" "5.5" "4.0" ...
## $ crack_use : num 0 0 0 0.1 0 0.1 0.4 0.5 0.6 0.5 ...
## $ crack_frequency : chr "-" "3.0" "-" "9.5" ...
## $ heroin_use : num 0.1 0 0.1 0.2 0.1 0.1 0.4 0.5 0.9 0.6 ...
## $ heroin_frequency : chr "35.5" "-" "2.0" "1.0" ...
## $ hallucinogen_use : num 0.2 0.6 1.6 2.1 3.4 4.8 7 8.6 7.4 6.3 ...
## $ hallucinogen_frequency : num 52 6 3 4 3 3 4 3 2 4 ...
## $ inhalant_use : num 1.6 2.5 2.6 2.5 3 2 1.8 1.4 1.5 1.4 ...
## $ inhalant_frequency : chr "19.0" "12.0" "5.0" "5.5" ...
## $ pain_releiver_use : num 2 2.4 3.9 5.5 6.2 8.5 9.2 9.4 10 9 ...
## $ pain_releiver_frequency: num 36 14 12 10 7 9 12 12 10 15 ...
## $ oxycontin_use : num 0.1 0.1 0.4 0.8 1.1 1.4 1.7 1.5 1.7 1.3 ...
## $ oxycontin_frequency : chr "24.5" "41.0" "4.5" "3.0" ...
## $ tranquilizer_use : num 0.2 0.3 0.9 2 2.4 3.5 4.9 4.2 5.4 3.9 ...
## $ tranquilizer_frequency : num 52 25.5 5 4.5 11 7 12 4.5 10 7 ...
## $ stimulant_use : num 0.2 0.3 0.8 1.5 1.8 2.8 3 3.3 4 4.1 ...
## $ stimulant_frequency : num 2 4 12 6 9.5 9 8 6 12 10 ...
## $ meth_use : num 0 0.1 0.1 0.3 0.3 0.6 0.5 0.4 0.9 0.6 ...
## $ meth_frequency : chr "-" "5.0" "24.0" "10.5" ...
## $ sedative_use : num 0.2 0.1 0.2 0.4 0.2 0.5 0.4 0.3 0.5 0.3 ...
## $ sedative_frequency : num 13 19 16.5 30 3 6.5 10 6 4 9 ...
## age n alcohol_use alcohol_frequency
## Length:17 Min. :2223 Min. : 3.90 Min. : 3.00
## Class :character 1st Qu.:2469 1st Qu.:40.10 1st Qu.:10.00
## Mode :character Median :2798 Median :64.60 Median :48.00
## Mean :3251 Mean :55.43 Mean :33.35
## 3rd Qu.:3058 3rd Qu.:77.50 3rd Qu.:52.00
## Max. :7391 Max. :84.20 Max. :52.00
## marijuana_use marijuana_frequency cocaine_use cocaine_frequency
## Min. : 1.10 Min. : 4.00 Min. :0.000 Length:17
## 1st Qu.: 8.70 1st Qu.:30.00 1st Qu.:0.500 Class :character
## Median :20.80 Median :52.00 Median :2.000 Mode :character
## Mean :18.92 Mean :42.94 Mean :2.176
## 3rd Qu.:28.40 3rd Qu.:52.00 3rd Qu.:4.000
## Max. :34.00 Max. :72.00 Max. :4.900
## crack_use crack_frequency heroin_use heroin_frequency
## Min. :0.0000 Length:17 Min. :0.0000 Length:17
## 1st Qu.:0.0000 Class :character 1st Qu.:0.1000 Class :character
## Median :0.4000 Mode :character Median :0.2000 Mode :character
## Mean :0.2941 Mean :0.3529
## 3rd Qu.:0.5000 3rd Qu.:0.6000
## Max. :0.6000 Max. :1.1000
## hallucinogen_use hallucinogen_frequency inhalant_use inhalant_frequency
## Min. :0.100 Min. : 2.000 Min. :0.000 Length:17
## 1st Qu.:0.600 1st Qu.: 3.000 1st Qu.:0.600 Class :character
## Median :3.200 Median : 3.000 Median :1.400 Mode :character
## Mean :3.394 Mean : 8.412 Mean :1.388
## 3rd Qu.:5.200 3rd Qu.: 4.000 3rd Qu.:2.000
## Max. :8.600 Max. :52.000 Max. :3.000
## pain_releiver_use pain_releiver_frequency oxycontin_use oxycontin_frequency
## Min. : 0.600 Min. : 7.00 Min. :0.0000 Length:17
## 1st Qu.: 3.900 1st Qu.:12.00 1st Qu.:0.4000 Class :character
## Median : 6.200 Median :12.00 Median :1.1000 Mode :character
## Mean : 6.271 Mean :14.71 Mean :0.9353
## 3rd Qu.: 9.000 3rd Qu.:15.00 3rd Qu.:1.4000
## Max. :10.000 Max. :36.00 Max. :1.7000
## tranquilizer_use tranquilizer_frequency stimulant_use stimulant_frequency
## Min. :0.200 Min. : 4.50 Min. :0.000 Min. : 2.00
## 1st Qu.:1.400 1st Qu.: 6.00 1st Qu.:0.600 1st Qu.: 7.00
## Median :3.500 Median :10.00 Median :1.800 Median : 10.00
## Mean :2.806 Mean :11.74 Mean :1.918 Mean : 31.15
## 3rd Qu.:4.200 3rd Qu.:11.00 3rd Qu.:3.000 3rd Qu.: 12.00
## Max. :5.400 Max. :52.00 Max. :4.100 Max. :364.00
## meth_use meth_frequency sedative_use sedative_frequency
## Min. :0.0000 Length:17 Min. :0.0000 Min. : 3.00
## 1st Qu.:0.2000 Class :character 1st Qu.:0.2000 1st Qu.: 6.50
## Median :0.4000 Mode :character Median :0.3000 Median : 10.00
## Mean :0.3824 Mean :0.2824 Mean : 19.38
## 3rd Qu.:0.6000 3rd Qu.:0.4000 3rd Qu.: 17.50
## Max. :0.9000 Max. :0.5000 Max. :104.00
## vars n mean sd median trimmed mad min
## age* 1 17 9.00 5.05 9.0 9.00 5.93 1.0
## n 2 17 3251.06 1297.89 2798.0 3043.60 487.78 2223.0
## alcohol_use 3 17 55.43 26.88 64.6 56.95 23.87 3.9
## alcohol_frequency 4 17 33.35 21.32 48.0 34.13 5.93 3.0
## marijuana_use 5 17 18.92 11.96 20.8 19.11 17.94 1.1
## marijuana_frequency 6 17 42.94 18.36 52.0 43.60 11.86 4.0
## cocaine_use 7 17 2.18 1.82 2.0 2.14 2.82 0.0
## cocaine_frequency* 8 17 6.00 2.52 6.0 6.07 1.48 1.0
## crack_use 9 17 0.29 0.24 0.4 0.29 0.15 0.0
## crack_frequency* 10 17 6.71 4.16 7.0 6.67 5.93 1.0
## heroin_use 11 17 0.35 0.33 0.2 0.33 0.30 0.0
## heroin_frequency* 12 17 9.00 5.05 9.0 9.00 5.93 1.0
## hallucinogen_use 13 17 3.39 2.79 3.2 3.27 3.85 0.1
## hallucinogen_frequency 14 17 8.41 15.00 3.0 5.93 1.48 2.0
## inhalant_use 15 17 1.39 0.93 1.4 1.37 1.19 0.0
## inhalant_frequency* 16 17 6.76 2.93 7.0 6.87 2.97 1.0
## pain_releiver_use 17 17 6.27 3.17 6.2 6.40 4.15 0.6
## pain_releiver_frequency 18 17 14.71 6.94 12.0 13.80 2.97 7.0
## oxycontin_use 19 17 0.94 0.61 1.1 0.95 0.89 0.0
## oxycontin_frequency* 20 17 7.35 4.57 7.0 7.27 5.93 1.0
## tranquilizer_use 21 17 2.81 1.75 3.5 2.81 2.08 0.2
## tranquilizer_frequency 22 17 11.74 11.49 10.0 9.53 4.45 4.5
## stimulant_use 23 17 1.92 1.41 1.8 1.90 1.78 0.0
## stimulant_frequency 24 17 31.15 85.97 10.0 10.90 2.97 2.0
## meth_use 25 17 0.38 0.26 0.4 0.37 0.30 0.0
## meth_frequency* 26 17 7.06 4.15 7.0 7.00 4.45 1.0
## sedative_use 27 17 0.28 0.14 0.3 0.29 0.15 0.0
## sedative_frequency 28 17 19.38 24.83 10.0 14.83 8.90 3.0
## max range skew kurtosis se
## age* 17.0 16.0 0.00 -1.41 1.22
## n 7391.0 5168.0 1.95 3.33 314.78
## alcohol_use 84.2 80.3 -0.63 -1.07 6.52
## alcohol_frequency 52.0 49.0 -0.36 -1.83 5.17
## marijuana_use 34.0 32.9 -0.14 -1.59 2.90
## marijuana_frequency 72.0 68.0 -0.50 -0.84 4.45
## cocaine_use 4.9 4.9 0.20 -1.65 0.44
## cocaine_frequency* 10.0 9.0 -0.22 -0.70 0.61
## crack_use 0.6 0.6 -0.26 -1.85 0.06
## crack_frequency* 13.0 12.0 -0.08 -1.59 1.01
## heroin_use 1.1 1.1 0.74 -0.73 0.08
## heroin_frequency* 17.0 16.0 0.00 -1.41 1.22
## hallucinogen_use 8.6 8.5 0.36 -1.35 0.68
## hallucinogen_frequency 52.0 50.0 2.19 3.07 3.64
## inhalant_use 3.0 3.0 0.12 -1.35 0.22
## inhalant_frequency* 11.0 10.0 -0.50 -1.04 0.71
## pain_releiver_use 10.0 9.4 -0.32 -1.51 0.77
## pain_releiver_frequency 36.0 29.0 1.74 2.64 1.68
## oxycontin_use 1.7 1.7 -0.21 -1.59 0.15
## oxycontin_frequency* 15.0 14.0 0.19 -1.48 1.11
## tranquilizer_use 5.4 5.2 -0.22 -1.53 0.43
## tranquilizer_frequency 52.0 47.5 2.56 6.05 2.79
## stimulant_use 4.1 4.1 0.10 -1.56 0.34
## stimulant_frequency 364.0 362.0 3.40 10.22 20.85
## meth_use 0.9 0.9 0.14 -1.16 0.06
## meth_frequency* 14.0 13.0 0.06 -1.36 1.01
## sedative_use 0.5 0.5 -0.11 -0.89 0.03
## sedative_frequency 104.0 101.0 2.39 5.15 6.02
##
## Descriptive statistics by group
## group: 12
## vars n mean sd median trimmed mad min max range
## age 1 1 1.0 NA 1.0 1.0 0 1.0 1.0 0
## n 2 1 2798.0 NA 2798.0 2798.0 0 2798.0 2798.0 0
## alcohol_use 3 1 3.9 NA 3.9 3.9 0 3.9 3.9 0
## alcohol_frequency 4 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## marijuana_use 5 1 1.1 NA 1.1 1.1 0 1.1 1.1 0
## marijuana_frequency 6 1 4.0 NA 4.0 4.0 0 4.0 4.0 0
## cocaine_use 7 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## cocaine_frequency 8 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## crack_use 9 1 0.0 NA 0.0 0.0 0 0.0 0.0 0
## crack_frequency 10 1 1.0 NA 1.0 1.0 0 1.0 1.0 0
## heroin_use 11 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## heroin_frequency 12 1 8.0 NA 8.0 8.0 0 8.0 8.0 0
## hallucinogen_use 13 1 0.2 NA 0.2 0.2 0 0.2 0.2 0
## hallucinogen_frequency 14 1 52.0 NA 52.0 52.0 0 52.0 52.0 0
## inhalant_use 15 1 1.6 NA 1.6 1.6 0 1.6 1.6 0
## inhalant_frequency 16 1 5.0 NA 5.0 5.0 0 5.0 5.0 0
## pain_releiver_use 17 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## pain_releiver_frequency 18 1 36.0 NA 36.0 36.0 0 36.0 36.0 0
## oxycontin_use 19 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## oxycontin_frequency 20 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## tranquilizer_use 21 1 0.2 NA 0.2 0.2 0 0.2 0.2 0
## tranquilizer_frequency 22 1 52.0 NA 52.0 52.0 0 52.0 52.0 0
## stimulant_use 23 1 0.2 NA 0.2 0.2 0 0.2 0.2 0
## stimulant_frequency 24 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## meth_use 25 1 0.0 NA 0.0 0.0 0 0.0 0.0 0
## meth_frequency 26 1 1.0 NA 1.0 1.0 0 1.0 1.0 0
## sedative_use 27 1 0.2 NA 0.2 0.2 0 0.2 0.2 0
## sedative_frequency 28 1 13.0 NA 13.0 13.0 0 13.0 13.0 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
## ------------------------------------------------------------
## group: 13
## vars n mean sd median trimmed mad min max range
## age 1 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## n 2 1 2757.0 NA 2757.0 2757.0 0 2757.0 2757.0 0
## alcohol_use 3 1 8.5 NA 8.5 8.5 0 8.5 8.5 0
## alcohol_frequency 4 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## marijuana_use 5 1 3.4 NA 3.4 3.4 0 3.4 3.4 0
## marijuana_frequency 6 1 15.0 NA 15.0 15.0 0 15.0 15.0 0
## cocaine_use 7 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## cocaine_frequency 8 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## crack_use 9 1 0.0 NA 0.0 0.0 0 0.0 0.0 0
## crack_frequency 10 1 8.0 NA 8.0 8.0 0 8.0 8.0 0
## heroin_use 11 1 0.0 NA 0.0 0.0 0 0.0 0.0 0
## heroin_frequency 12 1 1.0 NA 1.0 1.0 0 1.0 1.0 0
## hallucinogen_use 13 1 0.6 NA 0.6 0.6 0 0.6 0.6 0
## hallucinogen_frequency 14 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## inhalant_use 15 1 2.5 NA 2.5 2.5 0 2.5 2.5 0
## inhalant_frequency 16 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## pain_releiver_use 17 1 2.4 NA 2.4 2.4 0 2.4 2.4 0
## pain_releiver_frequency 18 1 14.0 NA 14.0 14.0 0 14.0 14.0 0
## oxycontin_use 19 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## oxycontin_frequency 20 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## tranquilizer_use 21 1 0.3 NA 0.3 0.3 0 0.3 0.3 0
## tranquilizer_frequency 22 1 25.5 NA 25.5 25.5 0 25.5 25.5 0
## stimulant_use 23 1 0.3 NA 0.3 0.3 0 0.3 0.3 0
## stimulant_frequency 24 1 4.0 NA 4.0 4.0 0 4.0 4.0 0
## meth_use 25 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## meth_frequency 26 1 13.0 NA 13.0 13.0 0 13.0 13.0 0
## sedative_use 27 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## sedative_frequency 28 1 19.0 NA 19.0 19.0 0 19.0 19.0 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
## ------------------------------------------------------------
## group: 14
## vars n mean sd median trimmed mad min max range
## age 1 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## n 2 1 2792.0 NA 2792.0 2792.0 0 2792.0 2792.0 0
## alcohol_use 3 1 18.1 NA 18.1 18.1 0 18.1 18.1 0
## alcohol_frequency 4 1 5.0 NA 5.0 5.0 0 5.0 5.0 0
## marijuana_use 5 1 8.7 NA 8.7 8.7 0 8.7 8.7 0
## marijuana_frequency 6 1 24.0 NA 24.0 24.0 0 24.0 24.0 0
## cocaine_use 7 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## cocaine_frequency 8 1 7.0 NA 7.0 7.0 0 7.0 7.0 0
## crack_use 9 1 0.0 NA 0.0 0.0 0 0.0 0.0 0
## crack_frequency 10 1 1.0 NA 1.0 1.0 0 1.0 1.0 0
## heroin_use 11 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## heroin_frequency 12 1 5.0 NA 5.0 5.0 0 5.0 5.0 0
## hallucinogen_use 13 1 1.6 NA 1.6 1.6 0 1.6 1.6 0
## hallucinogen_frequency 14 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## inhalant_use 15 1 2.6 NA 2.6 2.6 0 2.6 2.6 0
## inhalant_frequency 16 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## pain_releiver_use 17 1 3.9 NA 3.9 3.9 0 3.9 3.9 0
## pain_releiver_frequency 18 1 12.0 NA 12.0 12.0 0 12.0 12.0 0
## oxycontin_use 19 1 0.4 NA 0.4 0.4 0 0.4 0.4 0
## oxycontin_frequency 20 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## tranquilizer_use 21 1 0.9 NA 0.9 0.9 0 0.9 0.9 0
## tranquilizer_frequency 22 1 5.0 NA 5.0 5.0 0 5.0 5.0 0
## stimulant_use 23 1 0.8 NA 0.8 0.8 0 0.8 0.8 0
## stimulant_frequency 24 1 12.0 NA 12.0 12.0 0 12.0 12.0 0
## meth_use 25 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## meth_frequency 26 1 8.0 NA 8.0 8.0 0 8.0 8.0 0
## sedative_use 27 1 0.2 NA 0.2 0.2 0 0.2 0.2 0
## sedative_frequency 28 1 16.5 NA 16.5 16.5 0 16.5 16.5 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
## ------------------------------------------------------------
## group: 15
## vars n mean sd median trimmed mad min max range
## age 1 1 4.0 NA 4.0 4.0 0 4.0 4.0 0
## n 2 1 2956.0 NA 2956.0 2956.0 0 2956.0 2956.0 0
## alcohol_use 3 1 29.2 NA 29.2 29.2 0 29.2 29.2 0
## alcohol_frequency 4 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## marijuana_use 5 1 14.5 NA 14.5 14.5 0 14.5 14.5 0
## marijuana_frequency 6 1 25.0 NA 25.0 25.0 0 25.0 25.0 0
## cocaine_use 7 1 0.5 NA 0.5 0.5 0 0.5 0.5 0
## cocaine_frequency 8 1 5.0 NA 5.0 5.0 0 5.0 5.0 0
## crack_use 9 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## crack_frequency 10 1 13.0 NA 13.0 13.0 0 13.0 13.0 0
## heroin_use 11 1 0.2 NA 0.2 0.2 0 0.2 0.2 0
## heroin_frequency 12 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## hallucinogen_use 13 1 2.1 NA 2.1 2.1 0 2.1 2.1 0
## hallucinogen_frequency 14 1 4.0 NA 4.0 4.0 0 4.0 4.0 0
## inhalant_use 15 1 2.5 NA 2.5 2.5 0 2.5 2.5 0
## inhalant_frequency 16 1 11.0 NA 11.0 11.0 0 11.0 11.0 0
## pain_releiver_use 17 1 5.5 NA 5.5 5.5 0 5.5 5.5 0
## pain_releiver_frequency 18 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## oxycontin_use 19 1 0.8 NA 0.8 0.8 0 0.8 0.8 0
## oxycontin_frequency 20 1 7.0 NA 7.0 7.0 0 7.0 7.0 0
## tranquilizer_use 21 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## tranquilizer_frequency 22 1 4.5 NA 4.5 4.5 0 4.5 4.5 0
## stimulant_use 23 1 1.5 NA 1.5 1.5 0 1.5 1.5 0
## stimulant_frequency 24 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## meth_use 25 1 0.3 NA 0.3 0.3 0 0.3 0.3 0
## meth_frequency 26 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## sedative_use 27 1 0.4 NA 0.4 0.4 0 0.4 0.4 0
## sedative_frequency 28 1 30.0 NA 30.0 30.0 0 30.0 30.0 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
## ------------------------------------------------------------
## group: 16
## vars n mean sd median trimmed mad min max range
## age 1 1 5.0 NA 5.0 5.0 0 5.0 5.0 0
## n 2 1 3058.0 NA 3058.0 3058.0 0 3058.0 3058.0 0
## alcohol_use 3 1 40.1 NA 40.1 40.1 0 40.1 40.1 0
## alcohol_frequency 4 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## marijuana_use 5 1 22.5 NA 22.5 22.5 0 22.5 22.5 0
## marijuana_frequency 6 1 30.0 NA 30.0 30.0 0 30.0 30.0 0
## cocaine_use 7 1 1.0 NA 1.0 1.0 0 1.0 1.0 0
## cocaine_frequency 8 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## crack_use 9 1 0.0 NA 0.0 0.0 0 0.0 0.0 0
## crack_frequency 10 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## heroin_use 11 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## heroin_frequency 12 1 16.0 NA 16.0 16.0 0 16.0 16.0 0
## hallucinogen_use 13 1 3.4 NA 3.4 3.4 0 3.4 3.4 0
## hallucinogen_frequency 14 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## inhalant_use 15 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## inhalant_frequency 16 1 7.0 NA 7.0 7.0 0 7.0 7.0 0
## pain_releiver_use 17 1 6.2 NA 6.2 6.2 0 6.2 6.2 0
## pain_releiver_frequency 18 1 7.0 NA 7.0 7.0 0 7.0 7.0 0
## oxycontin_use 19 1 1.1 NA 1.1 1.1 0 1.1 1.1 0
## oxycontin_frequency 20 1 8.0 NA 8.0 8.0 0 8.0 8.0 0
## tranquilizer_use 21 1 2.4 NA 2.4 2.4 0 2.4 2.4 0
## tranquilizer_frequency 22 1 11.0 NA 11.0 11.0 0 11.0 11.0 0
## stimulant_use 23 1 1.8 NA 1.8 1.8 0 1.8 1.8 0
## stimulant_frequency 24 1 9.5 NA 9.5 9.5 0 9.5 9.5 0
## meth_use 25 1 0.3 NA 0.3 0.3 0 0.3 0.3 0
## meth_frequency 26 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## sedative_use 27 1 0.2 NA 0.2 0.2 0 0.2 0.2 0
## sedative_frequency 28 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
## ------------------------------------------------------------
## group: 17
## vars n mean sd median trimmed mad min max range
## age 1 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## n 2 1 3038.0 NA 3038.0 3038.0 0 3038.0 3038.0 0
## alcohol_use 3 1 49.3 NA 49.3 49.3 0 49.3 49.3 0
## alcohol_frequency 4 1 13.0 NA 13.0 13.0 0 13.0 13.0 0
## marijuana_use 5 1 28.0 NA 28.0 28.0 0 28.0 28.0 0
## marijuana_frequency 6 1 36.0 NA 36.0 36.0 0 36.0 36.0 0
## cocaine_use 7 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## cocaine_frequency 8 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## crack_use 9 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## crack_frequency 10 1 7.0 NA 7.0 7.0 0 7.0 7.0 0
## heroin_use 11 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## heroin_frequency 12 1 14.0 NA 14.0 14.0 0 14.0 14.0 0
## hallucinogen_use 13 1 4.8 NA 4.8 4.8 0 4.8 4.8 0
## hallucinogen_frequency 14 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## inhalant_use 15 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## inhalant_frequency 16 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## pain_releiver_use 17 1 8.5 NA 8.5 8.5 0 8.5 8.5 0
## pain_releiver_frequency 18 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## oxycontin_use 19 1 1.4 NA 1.4 1.4 0 1.4 1.4 0
## oxycontin_frequency 20 1 13.0 NA 13.0 13.0 0 13.0 13.0 0
## tranquilizer_use 21 1 3.5 NA 3.5 3.5 0 3.5 3.5 0
## tranquilizer_frequency 22 1 7.0 NA 7.0 7.0 0 7.0 7.0 0
## stimulant_use 23 1 2.8 NA 2.8 2.8 0 2.8 2.8 0
## stimulant_frequency 24 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## meth_use 25 1 0.6 NA 0.6 0.6 0 0.6 0.6 0
## meth_frequency 26 1 12.0 NA 12.0 12.0 0 12.0 12.0 0
## sedative_use 27 1 0.5 NA 0.5 0.5 0 0.5 0.5 0
## sedative_frequency 28 1 6.5 NA 6.5 6.5 0 6.5 6.5 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
## ------------------------------------------------------------
## group: 18
## vars n mean sd median trimmed mad min max range
## age 1 1 7.0 NA 7.0 7.0 0 7.0 7.0 0
## n 2 1 2469.0 NA 2469.0 2469.0 0 2469.0 2469.0 0
## alcohol_use 3 1 58.7 NA 58.7 58.7 0 58.7 58.7 0
## alcohol_frequency 4 1 24.0 NA 24.0 24.0 0 24.0 24.0 0
## marijuana_use 5 1 33.7 NA 33.7 33.7 0 33.7 33.7 0
## marijuana_frequency 6 1 52.0 NA 52.0 52.0 0 52.0 52.0 0
## cocaine_use 7 1 3.2 NA 3.2 3.2 0 3.2 3.2 0
## cocaine_frequency 8 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## crack_use 9 1 0.4 NA 0.4 0.4 0 0.4 0.4 0
## crack_frequency 10 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## heroin_use 11 1 0.4 NA 0.4 0.4 0 0.4 0.4 0
## heroin_frequency 12 1 11.0 NA 11.0 11.0 0 11.0 11.0 0
## hallucinogen_use 13 1 7.0 NA 7.0 7.0 0 7.0 7.0 0
## hallucinogen_frequency 14 1 4.0 NA 4.0 4.0 0 4.0 4.0 0
## inhalant_use 15 1 1.8 NA 1.8 1.8 0 1.8 1.8 0
## inhalant_frequency 16 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## pain_releiver_use 17 1 9.2 NA 9.2 9.2 0 9.2 9.2 0
## pain_releiver_frequency 18 1 12.0 NA 12.0 12.0 0 12.0 12.0 0
## oxycontin_use 19 1 1.7 NA 1.7 1.7 0 1.7 1.7 0
## oxycontin_frequency 20 1 14.0 NA 14.0 14.0 0 14.0 14.0 0
## tranquilizer_use 21 1 4.9 NA 4.9 4.9 0 4.9 4.9 0
## tranquilizer_frequency 22 1 12.0 NA 12.0 12.0 0 12.0 12.0 0
## stimulant_use 23 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## stimulant_frequency 24 1 8.0 NA 8.0 8.0 0 8.0 8.0 0
## meth_use 25 1 0.5 NA 0.5 0.5 0 0.5 0.5 0
## meth_frequency 26 1 5.0 NA 5.0 5.0 0 5.0 5.0 0
## sedative_use 27 1 0.4 NA 0.4 0.4 0 0.4 0.4 0
## sedative_frequency 28 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
## ------------------------------------------------------------
## group: 19
## vars n mean sd median trimmed mad min max range
## age 1 1 8.0 NA 8.0 8.0 0 8.0 8.0 0
## n 2 1 2223.0 NA 2223.0 2223.0 0 2223.0 2223.0 0
## alcohol_use 3 1 64.6 NA 64.6 64.6 0 64.6 64.6 0
## alcohol_frequency 4 1 36.0 NA 36.0 36.0 0 36.0 36.0 0
## marijuana_use 5 1 33.4 NA 33.4 33.4 0 33.4 33.4 0
## marijuana_frequency 6 1 60.0 NA 60.0 60.0 0 60.0 60.0 0
## cocaine_use 7 1 4.1 NA 4.1 4.1 0 4.1 4.1 0
## cocaine_frequency 8 1 7.0 NA 7.0 7.0 0 7.0 7.0 0
## crack_use 9 1 0.5 NA 0.5 0.5 0 0.5 0.5 0
## crack_frequency 10 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## heroin_use 11 1 0.5 NA 0.5 0.5 0 0.5 0.5 0
## heroin_frequency 12 1 4.0 NA 4.0 4.0 0 4.0 4.0 0
## hallucinogen_use 13 1 8.6 NA 8.6 8.6 0 8.6 8.6 0
## hallucinogen_frequency 14 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## inhalant_use 15 1 1.4 NA 1.4 1.4 0 1.4 1.4 0
## inhalant_frequency 16 1 7.0 NA 7.0 7.0 0 7.0 7.0 0
## pain_releiver_use 17 1 9.4 NA 9.4 9.4 0 9.4 9.4 0
## pain_releiver_frequency 18 1 12.0 NA 12.0 12.0 0 12.0 12.0 0
## oxycontin_use 19 1 1.5 NA 1.5 1.5 0 1.5 1.5 0
## oxycontin_frequency 20 1 15.0 NA 15.0 15.0 0 15.0 15.0 0
## tranquilizer_use 21 1 4.2 NA 4.2 4.2 0 4.2 4.2 0
## tranquilizer_frequency 22 1 4.5 NA 4.5 4.5 0 4.5 4.5 0
## stimulant_use 23 1 3.3 NA 3.3 3.3 0 3.3 3.3 0
## stimulant_frequency 24 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## meth_use 25 1 0.4 NA 0.4 0.4 0 0.4 0.4 0
## meth_frequency 26 1 4.0 NA 4.0 4.0 0 4.0 4.0 0
## sedative_use 27 1 0.3 NA 0.3 0.3 0 0.3 0.3 0
## sedative_frequency 28 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
## ------------------------------------------------------------
## group: 20
## vars n mean sd median trimmed mad min max range
## age 1 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## n 2 1 2271.0 NA 2271.0 2271.0 0 2271.0 2271.0 0
## alcohol_use 3 1 69.7 NA 69.7 69.7 0 69.7 69.7 0
## alcohol_frequency 4 1 48.0 NA 48.0 48.0 0 48.0 48.0 0
## marijuana_use 5 1 34.0 NA 34.0 34.0 0 34.0 34.0 0
## marijuana_frequency 6 1 60.0 NA 60.0 60.0 0 60.0 60.0 0
## cocaine_use 7 1 4.9 NA 4.9 4.9 0 4.9 4.9 0
## cocaine_frequency 8 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## crack_use 9 1 0.6 NA 0.6 0.6 0 0.6 0.6 0
## crack_frequency 10 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## heroin_use 11 1 0.9 NA 0.9 0.9 0 0.9 0.9 0
## heroin_frequency 12 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## hallucinogen_use 13 1 7.4 NA 7.4 7.4 0 7.4 7.4 0
## hallucinogen_frequency 14 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## inhalant_use 15 1 1.5 NA 1.5 1.5 0 1.5 1.5 0
## inhalant_frequency 16 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## pain_releiver_use 17 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## pain_releiver_frequency 18 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## oxycontin_use 19 1 1.7 NA 1.7 1.7 0 1.7 1.7 0
## oxycontin_frequency 20 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## tranquilizer_use 21 1 5.4 NA 5.4 5.4 0 5.4 5.4 0
## tranquilizer_frequency 22 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## stimulant_use 23 1 4.0 NA 4.0 4.0 0 4.0 4.0 0
## stimulant_frequency 24 1 12.0 NA 12.0 12.0 0 12.0 12.0 0
## meth_use 25 1 0.9 NA 0.9 0.9 0 0.9 0.9 0
## meth_frequency 26 1 5.0 NA 5.0 5.0 0 5.0 5.0 0
## sedative_use 27 1 0.5 NA 0.5 0.5 0 0.5 0.5 0
## sedative_frequency 28 1 4.0 NA 4.0 4.0 0 4.0 4.0 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
## ------------------------------------------------------------
## group: 21
## vars n mean sd median trimmed mad min max range
## age 1 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## n 2 1 2354.0 NA 2354.0 2354.0 0 2354.0 2354.0 0
## alcohol_use 3 1 83.2 NA 83.2 83.2 0 83.2 83.2 0
## alcohol_frequency 4 1 52.0 NA 52.0 52.0 0 52.0 52.0 0
## marijuana_use 5 1 33.0 NA 33.0 33.0 0 33.0 33.0 0
## marijuana_frequency 6 1 52.0 NA 52.0 52.0 0 52.0 52.0 0
## cocaine_use 7 1 4.8 NA 4.8 4.8 0 4.8 4.8 0
## cocaine_frequency 8 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## crack_use 9 1 0.5 NA 0.5 0.5 0 0.5 0.5 0
## crack_frequency 10 1 5.0 NA 5.0 5.0 0 5.0 5.0 0
## heroin_use 11 1 0.6 NA 0.6 0.6 0 0.6 0.6 0
## heroin_frequency 12 1 7.0 NA 7.0 7.0 0 7.0 7.0 0
## hallucinogen_use 13 1 6.3 NA 6.3 6.3 0 6.3 6.3 0
## hallucinogen_frequency 14 1 4.0 NA 4.0 4.0 0 4.0 4.0 0
## inhalant_use 15 1 1.4 NA 1.4 1.4 0 1.4 1.4 0
## inhalant_frequency 16 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## pain_releiver_use 17 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## pain_releiver_frequency 18 1 15.0 NA 15.0 15.0 0 15.0 15.0 0
## oxycontin_use 19 1 1.3 NA 1.3 1.3 0 1.3 1.3 0
## oxycontin_frequency 20 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## tranquilizer_use 21 1 3.9 NA 3.9 3.9 0 3.9 3.9 0
## tranquilizer_frequency 22 1 7.0 NA 7.0 7.0 0 7.0 7.0 0
## stimulant_use 23 1 4.1 NA 4.1 4.1 0 4.1 4.1 0
## stimulant_frequency 24 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## meth_use 25 1 0.6 NA 0.6 0.6 0 0.6 0.6 0
## meth_frequency 26 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## sedative_use 27 1 0.3 NA 0.3 0.3 0 0.3 0.3 0
## sedative_frequency 28 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
## ------------------------------------------------------------
## group: 22-23
## vars n mean sd median trimmed mad min max range
## age 1 1 11.0 NA 11.0 11.0 0 11.0 11.0 0
## n 2 1 4707.0 NA 4707.0 4707.0 0 4707.0 4707.0 0
## alcohol_use 3 1 84.2 NA 84.2 84.2 0 84.2 84.2 0
## alcohol_frequency 4 1 52.0 NA 52.0 52.0 0 52.0 52.0 0
## marijuana_use 5 1 28.4 NA 28.4 28.4 0 28.4 28.4 0
## marijuana_frequency 6 1 52.0 NA 52.0 52.0 0 52.0 52.0 0
## cocaine_use 7 1 4.5 NA 4.5 4.5 0 4.5 4.5 0
## cocaine_frequency 8 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## crack_use 9 1 0.5 NA 0.5 0.5 0 0.5 0.5 0
## crack_frequency 10 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## heroin_use 11 1 1.1 NA 1.1 1.1 0 1.1 1.1 0
## heroin_frequency 12 1 13.0 NA 13.0 13.0 0 13.0 13.0 0
## hallucinogen_use 13 1 5.2 NA 5.2 5.2 0 5.2 5.2 0
## hallucinogen_frequency 14 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## inhalant_use 15 1 1.0 NA 1.0 1.0 0 1.0 1.0 0
## inhalant_frequency 16 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## pain_releiver_use 17 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## pain_releiver_frequency 18 1 15.0 NA 15.0 15.0 0 15.0 15.0 0
## oxycontin_use 19 1 1.7 NA 1.7 1.7 0 1.7 1.7 0
## oxycontin_frequency 20 1 4.0 NA 4.0 4.0 0 4.0 4.0 0
## tranquilizer_use 21 1 4.4 NA 4.4 4.4 0 4.4 4.4 0
## tranquilizer_frequency 22 1 12.0 NA 12.0 12.0 0 12.0 12.0 0
## stimulant_use 23 1 3.6 NA 3.6 3.6 0 3.6 3.6 0
## stimulant_frequency 24 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## meth_use 25 1 0.6 NA 0.6 0.6 0 0.6 0.6 0
## meth_frequency 26 1 11.0 NA 11.0 11.0 0 11.0 11.0 0
## sedative_use 27 1 0.2 NA 0.2 0.2 0 0.2 0.2 0
## sedative_frequency 28 1 52.0 NA 52.0 52.0 0 52.0 52.0 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
## ------------------------------------------------------------
## group: 24-25
## vars n mean sd median trimmed mad min max range
## age 1 1 12.0 NA 12.0 12.0 0 12.0 12.0 0
## n 2 1 4591.0 NA 4591.0 4591.0 0 4591.0 4591.0 0
## alcohol_use 3 1 83.1 NA 83.1 83.1 0 83.1 83.1 0
## alcohol_frequency 4 1 52.0 NA 52.0 52.0 0 52.0 52.0 0
## marijuana_use 5 1 24.9 NA 24.9 24.9 0 24.9 24.9 0
## marijuana_frequency 6 1 60.0 NA 60.0 60.0 0 60.0 60.0 0
## cocaine_use 7 1 4.0 NA 4.0 4.0 0 4.0 4.0 0
## cocaine_frequency 8 1 8.0 NA 8.0 8.0 0 8.0 8.0 0
## crack_use 9 1 0.5 NA 0.5 0.5 0 0.5 0.5 0
## crack_frequency 10 1 11.0 NA 11.0 11.0 0 11.0 11.0 0
## heroin_use 11 1 0.7 NA 0.7 0.7 0 0.7 0.7 0
## heroin_frequency 12 1 17.0 NA 17.0 17.0 0 17.0 17.0 0
## hallucinogen_use 13 1 4.5 NA 4.5 4.5 0 4.5 4.5 0
## hallucinogen_frequency 14 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## inhalant_use 15 1 0.8 NA 0.8 0.8 0 0.8 0.8 0
## inhalant_frequency 16 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## pain_releiver_use 17 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## pain_releiver_frequency 18 1 15.0 NA 15.0 15.0 0 15.0 15.0 0
## oxycontin_use 19 1 1.3 NA 1.3 1.3 0 1.3 1.3 0
## oxycontin_frequency 20 1 5.0 NA 5.0 5.0 0 5.0 5.0 0
## tranquilizer_use 21 1 4.3 NA 4.3 4.3 0 4.3 4.3 0
## tranquilizer_frequency 22 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## stimulant_use 23 1 2.6 NA 2.6 2.6 0 2.6 2.6 0
## stimulant_frequency 24 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## meth_use 25 1 0.7 NA 0.7 0.7 0 0.7 0.7 0
## meth_frequency 26 1 7.0 NA 7.0 7.0 0 7.0 7.0 0
## sedative_use 27 1 0.2 NA 0.2 0.2 0 0.2 0.2 0
## sedative_frequency 28 1 17.5 NA 17.5 17.5 0 17.5 17.5 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
## ------------------------------------------------------------
## group: 26-29
## vars n mean sd median trimmed mad min max range
## age 1 1 13.0 NA 13.0 13.0 0 13.0 13.0 0
## n 2 1 2628.0 NA 2628.0 2628.0 0 2628.0 2628.0 0
## alcohol_use 3 1 80.7 NA 80.7 80.7 0 80.7 80.7 0
## alcohol_frequency 4 1 52.0 NA 52.0 52.0 0 52.0 52.0 0
## marijuana_use 5 1 20.8 NA 20.8 20.8 0 20.8 20.8 0
## marijuana_frequency 6 1 52.0 NA 52.0 52.0 0 52.0 52.0 0
## cocaine_use 7 1 3.2 NA 3.2 3.2 0 3.2 3.2 0
## cocaine_frequency 8 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## crack_use 9 1 0.4 NA 0.4 0.4 0 0.4 0.4 0
## crack_frequency 10 1 11.0 NA 11.0 11.0 0 11.0 11.0 0
## heroin_use 11 1 0.6 NA 0.6 0.6 0 0.6 0.6 0
## heroin_frequency 12 1 12.0 NA 12.0 12.0 0 12.0 12.0 0
## hallucinogen_use 13 1 3.2 NA 3.2 3.2 0 3.2 3.2 0
## hallucinogen_frequency 14 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## inhalant_use 15 1 0.6 NA 0.6 0.6 0 0.6 0.6 0
## inhalant_frequency 16 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## pain_releiver_use 17 1 8.3 NA 8.3 8.3 0 8.3 8.3 0
## pain_releiver_frequency 18 1 13.0 NA 13.0 13.0 0 13.0 13.0 0
## oxycontin_use 19 1 1.2 NA 1.2 1.2 0 1.2 1.2 0
## oxycontin_frequency 20 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## tranquilizer_use 21 1 4.2 NA 4.2 4.2 0 4.2 4.2 0
## tranquilizer_frequency 22 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## stimulant_use 23 1 2.3 NA 2.3 2.3 0 2.3 2.3 0
## stimulant_frequency 24 1 7.0 NA 7.0 7.0 0 7.0 7.0 0
## meth_use 25 1 0.6 NA 0.6 0.6 0 0.6 0.6 0
## meth_frequency 26 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## sedative_use 27 1 0.4 NA 0.4 0.4 0 0.4 0.4 0
## sedative_frequency 28 1 4.0 NA 4.0 4.0 0 4.0 4.0 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
## ------------------------------------------------------------
## group: 30-34
## vars n mean sd median trimmed mad min max range
## age 1 1 14.0 NA 14.0 14.0 0 14.0 14.0 0
## n 2 1 2864.0 NA 2864.0 2864.0 0 2864.0 2864.0 0
## alcohol_use 3 1 77.5 NA 77.5 77.5 0 77.5 77.5 0
## alcohol_frequency 4 1 52.0 NA 52.0 52.0 0 52.0 52.0 0
## marijuana_use 5 1 16.4 NA 16.4 16.4 0 16.4 16.4 0
## marijuana_frequency 6 1 72.0 NA 72.0 72.0 0 72.0 72.0 0
## cocaine_use 7 1 2.1 NA 2.1 2.1 0 2.1 2.1 0
## cocaine_frequency 8 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## crack_use 9 1 0.5 NA 0.5 0.5 0 0.5 0.5 0
## crack_frequency 10 1 4.0 NA 4.0 4.0 0 4.0 4.0 0
## heroin_use 11 1 0.4 NA 0.4 0.4 0 0.4 0.4 0
## heroin_frequency 12 1 15.0 NA 15.0 15.0 0 15.0 15.0 0
## hallucinogen_use 13 1 1.8 NA 1.8 1.8 0 1.8 1.8 0
## hallucinogen_frequency 14 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## inhalant_use 15 1 0.4 NA 0.4 0.4 0 0.4 0.4 0
## inhalant_frequency 16 1 8.0 NA 8.0 8.0 0 8.0 8.0 0
## pain_releiver_use 17 1 5.9 NA 5.9 5.9 0 5.9 5.9 0
## pain_releiver_frequency 18 1 22.0 NA 22.0 22.0 0 22.0 22.0 0
## oxycontin_use 19 1 0.9 NA 0.9 0.9 0 0.9 0.9 0
## oxycontin_frequency 20 1 11.0 NA 11.0 11.0 0 11.0 11.0 0
## tranquilizer_use 21 1 3.6 NA 3.6 3.6 0 3.6 3.6 0
## tranquilizer_frequency 22 1 8.0 NA 8.0 8.0 0 8.0 8.0 0
## stimulant_use 23 1 1.4 NA 1.4 1.4 0 1.4 1.4 0
## stimulant_frequency 24 1 12.0 NA 12.0 12.0 0 12.0 12.0 0
## meth_use 25 1 0.4 NA 0.4 0.4 0 0.4 0.4 0
## meth_frequency 26 1 14.0 NA 14.0 14.0 0 14.0 14.0 0
## sedative_use 27 1 0.4 NA 0.4 0.4 0 0.4 0.4 0
## sedative_frequency 28 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
## ------------------------------------------------------------
## group: 35-49
## vars n mean sd median trimmed mad min max range
## age 1 1 15.0 NA 15.0 15.0 0 15.0 15.0 0
## n 2 1 7391.0 NA 7391.0 7391.0 0 7391.0 7391.0 0
## alcohol_use 3 1 75.0 NA 75.0 75.0 0 75.0 75.0 0
## alcohol_frequency 4 1 52.0 NA 52.0 52.0 0 52.0 52.0 0
## marijuana_use 5 1 10.4 NA 10.4 10.4 0 10.4 10.4 0
## marijuana_frequency 6 1 48.0 NA 48.0 48.0 0 48.0 48.0 0
## cocaine_use 7 1 1.5 NA 1.5 1.5 0 1.5 1.5 0
## cocaine_frequency 8 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## crack_use 9 1 0.5 NA 0.5 0.5 0 0.5 0.5 0
## crack_frequency 10 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## heroin_use 11 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## heroin_frequency 12 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## hallucinogen_use 13 1 0.6 NA 0.6 0.6 0 0.6 0.6 0
## hallucinogen_frequency 14 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## inhalant_use 15 1 0.3 NA 0.3 0.3 0 0.3 0.3 0
## inhalant_frequency 16 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## pain_releiver_use 17 1 4.2 NA 4.2 4.2 0 4.2 4.2 0
## pain_releiver_frequency 18 1 12.0 NA 12.0 12.0 0 12.0 12.0 0
## oxycontin_use 19 1 0.3 NA 0.3 0.3 0 0.3 0.3 0
## oxycontin_frequency 20 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## tranquilizer_use 21 1 1.9 NA 1.9 1.9 0 1.9 1.9 0
## tranquilizer_frequency 22 1 6.0 NA 6.0 6.0 0 6.0 6.0 0
## stimulant_use 23 1 0.6 NA 0.6 0.6 0 0.6 0.6 0
## stimulant_frequency 24 1 24.0 NA 24.0 24.0 0 24.0 24.0 0
## meth_use 25 1 0.2 NA 0.2 0.2 0 0.2 0.2 0
## meth_frequency 26 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## sedative_use 27 1 0.3 NA 0.3 0.3 0 0.3 0.3 0
## sedative_frequency 28 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
## ------------------------------------------------------------
## group: 50-64
## vars n mean sd median trimmed mad min max range
## age 1 1 16.0 NA 16.0 16.0 0 16.0 16.0 0
## n 2 1 3923.0 NA 3923.0 3923.0 0 3923.0 3923.0 0
## alcohol_use 3 1 67.2 NA 67.2 67.2 0 67.2 67.2 0
## alcohol_frequency 4 1 52.0 NA 52.0 52.0 0 52.0 52.0 0
## marijuana_use 5 1 7.3 NA 7.3 7.3 0 7.3 7.3 0
## marijuana_frequency 6 1 52.0 NA 52.0 52.0 0 52.0 52.0 0
## cocaine_use 7 1 0.9 NA 0.9 0.9 0 0.9 0.9 0
## cocaine_frequency 8 1 4.0 NA 4.0 4.0 0 4.0 4.0 0
## crack_use 9 1 0.4 NA 0.4 0.4 0 0.4 0.4 0
## crack_frequency 10 1 12.0 NA 12.0 12.0 0 12.0 12.0 0
## heroin_use 11 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## heroin_frequency 12 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## hallucinogen_use 13 1 0.3 NA 0.3 0.3 0 0.3 0.3 0
## hallucinogen_frequency 14 1 44.0 NA 44.0 44.0 0 44.0 44.0 0
## inhalant_use 15 1 0.2 NA 0.2 0.2 0 0.2 0.2 0
## inhalant_frequency 16 1 4.0 NA 4.0 4.0 0 4.0 4.0 0
## pain_releiver_use 17 1 2.5 NA 2.5 2.5 0 2.5 2.5 0
## pain_releiver_frequency 18 1 12.0 NA 12.0 12.0 0 12.0 12.0 0
## oxycontin_use 19 1 0.4 NA 0.4 0.4 0 0.4 0.4 0
## oxycontin_frequency 20 1 12.0 NA 12.0 12.0 0 12.0 12.0 0
## tranquilizer_use 21 1 1.4 NA 1.4 1.4 0 1.4 1.4 0
## tranquilizer_frequency 22 1 10.0 NA 10.0 10.0 0 10.0 10.0 0
## stimulant_use 23 1 0.3 NA 0.3 0.3 0 0.3 0.3 0
## stimulant_frequency 24 1 24.0 NA 24.0 24.0 0 24.0 24.0 0
## meth_use 25 1 0.2 NA 0.2 0.2 0 0.2 0.2 0
## meth_frequency 26 1 9.0 NA 9.0 9.0 0 9.0 9.0 0
## sedative_use 27 1 0.2 NA 0.2 0.2 0 0.2 0.2 0
## sedative_frequency 28 1 104.0 NA 104.0 104.0 0 104.0 104.0 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
## ------------------------------------------------------------
## group: 65+
## vars n mean sd median trimmed mad min max range
## age 1 1 17.0 NA 17.0 17.0 0 17.0 17.0 0
## n 2 1 2448.0 NA 2448.0 2448.0 0 2448.0 2448.0 0
## alcohol_use 3 1 49.3 NA 49.3 49.3 0 49.3 49.3 0
## alcohol_frequency 4 1 52.0 NA 52.0 52.0 0 52.0 52.0 0
## marijuana_use 5 1 1.2 NA 1.2 1.2 0 1.2 1.2 0
## marijuana_frequency 6 1 36.0 NA 36.0 36.0 0 36.0 36.0 0
## cocaine_use 7 1 0.0 NA 0.0 0.0 0 0.0 0.0 0
## cocaine_frequency 8 1 1.0 NA 1.0 1.0 0 1.0 1.0 0
## crack_use 9 1 0.0 NA 0.0 0.0 0 0.0 0.0 0
## crack_frequency 10 1 1.0 NA 1.0 1.0 0 1.0 1.0 0
## heroin_use 11 1 0.0 NA 0.0 0.0 0 0.0 0.0 0
## heroin_frequency 12 1 3.0 NA 3.0 3.0 0 3.0 3.0 0
## hallucinogen_use 13 1 0.1 NA 0.1 0.1 0 0.1 0.1 0
## hallucinogen_frequency 14 1 2.0 NA 2.0 2.0 0 2.0 2.0 0
## inhalant_use 15 1 0.0 NA 0.0 0.0 0 0.0 0.0 0
## inhalant_frequency 16 1 1.0 NA 1.0 1.0 0 1.0 1.0 0
## pain_releiver_use 17 1 0.6 NA 0.6 0.6 0 0.6 0.6 0
## pain_releiver_frequency 18 1 24.0 NA 24.0 24.0 0 24.0 24.0 0
## oxycontin_use 19 1 0.0 NA 0.0 0.0 0 0.0 0.0 0
## oxycontin_frequency 20 1 1.0 NA 1.0 1.0 0 1.0 1.0 0
## tranquilizer_use 21 1 0.2 NA 0.2 0.2 0 0.2 0.2 0
## tranquilizer_frequency 22 1 5.0 NA 5.0 5.0 0 5.0 5.0 0
## stimulant_use 23 1 0.0 NA 0.0 0.0 0 0.0 0.0 0
## stimulant_frequency 24 1 364.0 NA 364.0 364.0 0 364.0 364.0 0
## meth_use 25 1 0.0 NA 0.0 0.0 0 0.0 0.0 0
## meth_frequency 26 1 1.0 NA 1.0 1.0 0 1.0 1.0 0
## sedative_use 27 1 0.0 NA 0.0 0.0 0 0.0 0.0 0
## sedative_frequency 28 1 15.0 NA 15.0 15.0 0 15.0 15.0 0
## skew kurtosis se
## age NA NA NA
## n NA NA NA
## alcohol_use NA NA NA
## alcohol_frequency NA NA NA
## marijuana_use NA NA NA
## marijuana_frequency NA NA NA
## cocaine_use NA NA NA
## cocaine_frequency NA NA NA
## crack_use NA NA NA
## crack_frequency NA NA NA
## heroin_use NA NA NA
## heroin_frequency NA NA NA
## hallucinogen_use NA NA NA
## hallucinogen_frequency NA NA NA
## inhalant_use NA NA NA
## inhalant_frequency NA NA NA
## pain_releiver_use NA NA NA
## pain_releiver_frequency NA NA NA
## oxycontin_use NA NA NA
## oxycontin_frequency NA NA NA
## tranquilizer_use NA NA NA
## tranquilizer_frequency NA NA NA
## stimulant_use NA NA NA
## stimulant_frequency NA NA NA
## meth_use NA NA NA
## meth_frequency NA NA NA
## sedative_use NA NA NA
## sedative_frequency NA NA NA
##
## 12 13 14 15 16 17 18 19 20 21 22-23 24-25 26-29
## 1 1 1 1 1 1 1 1 1 1 1 1 1
## 30-34 35-49 50-64 65+
## 1 1 1 1
## [1] "age" "n"
## [3] "alcohol_use" "alcohol_frequency"
## [5] "marijuana_use" "marijuana_frequency"
## [7] "cocaine_use" "cocaine_frequency"
## [9] "crack_use" "crack_frequency"
## [11] "heroin_use" "heroin_frequency"
## [13] "hallucinogen_use" "hallucinogen_frequency"
## [15] "inhalant_use" "inhalant_frequency"
## [17] "pain_releiver_use" "pain_releiver_frequency"
## [19] "oxycontin_use" "oxycontin_frequency"
## [21] "tranquilizer_use" "tranquilizer_frequency"
## [23] "stimulant_use" "stimulant_frequency"
## [25] "meth_use" "meth_frequency"
## [27] "sedative_use" "sedative_frequency"
I used density plots to visualize the distribution of drug use percentages across different age groups. They provide a smooth, continuous representation of the data’s distribution, allowing for easier identification of patterns and trends that may not be as apparent in histograms or other types of plots.
# Density plots for each drug
density_plots <- lapply(names(clean_drug_data)[3:ncol(clean_drug_data)], function(drug_name) {
ggplot(clean_drug_data, aes_string(x = drug_name)) +
geom_density(fill = "skyblue", color = "black") +
labs(title = paste("Density Plot of", drug_name, "Use"),
x = paste(drug_name, "Use"),
y = "Density")
})## Warning: `aes_string()` was deprecated in ggplot2 3.0.0.
## ℹ Please use tidy evaluation idioms with `aes()`.
## ℹ See also `vignette("ggplot2-in-packages")` for more information.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## [[1]]
##
## [[2]]
##
## [[3]]
##
## [[4]]
##
## [[5]]
##
## [[6]]
## Warning: Groups with fewer than two data points have been dropped.
## Warning: Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
##
## [[7]]
##
## [[8]]
## Warning: Groups with fewer than two data points have been dropped.
## Warning: Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
##
## [[9]]
##
## [[10]]
## Warning: Groups with fewer than two data points have been dropped.
## Warning: Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning: Position guide is perpendicular to the intended axis
## ℹ Did you mean to specify a different guide `position`?
##
## [[11]]
##
## [[12]]
##
## [[13]]
##
## [[14]]
## Warning: Groups with fewer than two data points have been dropped.
## Warning: Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
##
## [[15]]
##
## [[16]]
##
## [[17]]
##
## [[18]]
## Warning: Groups with fewer than two data points have been dropped.
## Warning: Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
##
## [[19]]
##
## [[20]]
##
## [[21]]
##
## [[22]]
##
## [[23]]
##
## [[24]]
## Warning: Groups with fewer than two data points have been dropped.
## Warning: Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Groups with fewer than two data points have been dropped.
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
## -Inf
##
## [[25]]
##
## [[26]]
I used QQ plots help assess the normality of the data distributions.
# QQ plots for each drug
qq_plots <- lapply(names(clean_drug_data)[3:ncol(clean_drug_data)], function(drug_name) {
ggplot(clean_drug_data, aes_string(sample = drug_name)) +
stat_qq() +
stat_qq_line() +
labs(title = paste("QQ Plot of", drug_name, "Use"),
x = "Theoretical Quantiles",
y = paste("Sample Quantiles of", drug_name))
})
# Output the QQ plots
qq_plots## [[1]]
##
## [[2]]
##
## [[3]]
##
## [[4]]
##
## [[5]]
##
## [[6]]
## Warning: Computation failed in `stat_qq_line()`
## Caused by error in `(1 - h) * qs[i]`:
## ! non-numeric argument to binary operator
##
## [[7]]
##
## [[8]]
## Warning: Computation failed in `stat_qq_line()`
## Caused by error in `(1 - h) * qs[i]`:
## ! non-numeric argument to binary operator
##
## [[9]]
##
## [[10]]
## Warning: Computation failed in `stat_qq_line()`
## Caused by error in `(1 - h) * qs[i]`:
## ! non-numeric argument to binary operator
##
## [[11]]
##
## [[12]]
##
## [[13]]
##
## [[14]]
## Warning: Computation failed in `stat_qq_line()`
## Caused by error in `(1 - h) * qs[i]`:
## ! non-numeric argument to binary operator
##
## [[15]]
##
## [[16]]
##
## [[17]]
##
## [[18]]
## Warning: Computation failed in `stat_qq_line()`
## Caused by error in `(1 - h) * qs[i]`:
## ! non-numeric argument to binary operator
##
## [[19]]
##
## [[20]]
##
## [[21]]
##
## [[22]]
##
## [[23]]
##
## [[24]]
## Warning: Computation failed in `stat_qq_line()`
## Caused by error in `(1 - h) * qs[i]`:
## ! non-numeric argument to binary operator
##
## [[25]]
##
## [[26]]
The summary statistics for each drug and age group provides insights into the typical usage patterns, the range of usage, and the presence of any outliers.
# Summary statistics for each drug
summary_stats <- lapply(names(clean_drug_data)[3:ncol(clean_drug_data)], function(drug_name) {
summary(clean_drug_data[[drug_name]])
})
# Output the summary statistics
summary_stats## [[1]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 3.90 40.10 64.60 55.43 77.50 84.20
##
## [[2]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 3.00 10.00 48.00 33.35 52.00 52.00
##
## [[3]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.10 8.70 20.80 18.92 28.40 34.00
##
## [[4]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 4.00 30.00 52.00 42.94 52.00 72.00
##
## [[5]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.000 0.500 2.000 2.176 4.000 4.900
##
## [[6]]
## Length Class Mode
## 17 character character
##
## [[7]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.0000 0.0000 0.4000 0.2941 0.5000 0.6000
##
## [[8]]
## Length Class Mode
## 17 character character
##
## [[9]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.0000 0.1000 0.2000 0.3529 0.6000 1.1000
##
## [[10]]
## Length Class Mode
## 17 character character
##
## [[11]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.100 0.600 3.200 3.394 5.200 8.600
##
## [[12]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 2.000 3.000 3.000 8.412 4.000 52.000
##
## [[13]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.000 0.600 1.400 1.388 2.000 3.000
##
## [[14]]
## Length Class Mode
## 17 character character
##
## [[15]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.600 3.900 6.200 6.271 9.000 10.000
##
## [[16]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 7.00 12.00 12.00 14.71 15.00 36.00
##
## [[17]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.0000 0.4000 1.1000 0.9353 1.4000 1.7000
##
## [[18]]
## Length Class Mode
## 17 character character
##
## [[19]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.200 1.400 3.500 2.806 4.200 5.400
##
## [[20]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 4.50 6.00 10.00 11.74 11.00 52.00
##
## [[21]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.000 0.600 1.800 1.918 3.000 4.100
##
## [[22]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 2.00 7.00 10.00 31.15 12.00 364.00
##
## [[23]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.0000 0.2000 0.4000 0.3824 0.6000 0.9000
##
## [[24]]
## Length Class Mode
## 17 character character
##
## [[25]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.0000 0.2000 0.3000 0.2824 0.4000 0.5000
##
## [[26]]
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 3.00 6.50 10.00 19.38 17.50 104.00
To analyze the relationship between age and drug use, I created linear regression models for various substances, including cocaine, crack, alcohol, and heroin. The linear regression model for each drug helps to understand how drug use percentage changes with age.
Null Hypothesis (H0): Age has no effect on the percentage of users of inhalant use. Alternative Hypothesis (H1): Age has a significant effect on the percentage of users of Marijuana.
Cocaine Use: H0: Age has no effect on the percentage of cocaine users. H1: Age has a significant effect on the percentage of cocaine users.
# Remove rows with any NA, NaN, or Inf values
clean_drug_data <- drug_data %>%
mutate(across(everything(), ~ifelse(is.nan(.), NA, .))) %>%
filter_all(all_vars(!is.na(.))) %>%
filter_all(all_vars(!is.infinite(.)))
# Verify the cleaned data
summary(clean_drug_data)## age n alcohol_use alcohol_frequency
## Length:17 Min. :2223 Min. : 3.90 Min. : 3.00
## Class :character 1st Qu.:2469 1st Qu.:40.10 1st Qu.:10.00
## Mode :character Median :2798 Median :64.60 Median :48.00
## Mean :3251 Mean :55.43 Mean :33.35
## 3rd Qu.:3058 3rd Qu.:77.50 3rd Qu.:52.00
## Max. :7391 Max. :84.20 Max. :52.00
## marijuana_use marijuana_frequency cocaine_use cocaine_frequency
## Min. : 1.10 Min. : 4.00 Min. :0.000 Length:17
## 1st Qu.: 8.70 1st Qu.:30.00 1st Qu.:0.500 Class :character
## Median :20.80 Median :52.00 Median :2.000 Mode :character
## Mean :18.92 Mean :42.94 Mean :2.176
## 3rd Qu.:28.40 3rd Qu.:52.00 3rd Qu.:4.000
## Max. :34.00 Max. :72.00 Max. :4.900
## crack_use crack_frequency heroin_use heroin_frequency
## Min. :0.0000 Length:17 Min. :0.0000 Length:17
## 1st Qu.:0.0000 Class :character 1st Qu.:0.1000 Class :character
## Median :0.4000 Mode :character Median :0.2000 Mode :character
## Mean :0.2941 Mean :0.3529
## 3rd Qu.:0.5000 3rd Qu.:0.6000
## Max. :0.6000 Max. :1.1000
## hallucinogen_use hallucinogen_frequency inhalant_use inhalant_frequency
## Min. :0.100 Min. : 2.000 Min. :0.000 Length:17
## 1st Qu.:0.600 1st Qu.: 3.000 1st Qu.:0.600 Class :character
## Median :3.200 Median : 3.000 Median :1.400 Mode :character
## Mean :3.394 Mean : 8.412 Mean :1.388
## 3rd Qu.:5.200 3rd Qu.: 4.000 3rd Qu.:2.000
## Max. :8.600 Max. :52.000 Max. :3.000
## pain_releiver_use pain_releiver_frequency oxycontin_use oxycontin_frequency
## Min. : 0.600 Min. : 7.00 Min. :0.0000 Length:17
## 1st Qu.: 3.900 1st Qu.:12.00 1st Qu.:0.4000 Class :character
## Median : 6.200 Median :12.00 Median :1.1000 Mode :character
## Mean : 6.271 Mean :14.71 Mean :0.9353
## 3rd Qu.: 9.000 3rd Qu.:15.00 3rd Qu.:1.4000
## Max. :10.000 Max. :36.00 Max. :1.7000
## tranquilizer_use tranquilizer_frequency stimulant_use stimulant_frequency
## Min. :0.200 Min. : 4.50 Min. :0.000 Min. : 2.00
## 1st Qu.:1.400 1st Qu.: 6.00 1st Qu.:0.600 1st Qu.: 7.00
## Median :3.500 Median :10.00 Median :1.800 Median : 10.00
## Mean :2.806 Mean :11.74 Mean :1.918 Mean : 31.15
## 3rd Qu.:4.200 3rd Qu.:11.00 3rd Qu.:3.000 3rd Qu.: 12.00
## Max. :5.400 Max. :52.00 Max. :4.100 Max. :364.00
## meth_use meth_frequency sedative_use sedative_frequency
## Min. :0.0000 Length:17 Min. :0.0000 Min. : 3.00
## 1st Qu.:0.2000 Class :character 1st Qu.:0.2000 1st Qu.: 6.50
## Median :0.4000 Mode :character Median :0.3000 Median : 10.00
## Mean :0.3824 Mean :0.2824 Mean : 19.38
## 3rd Qu.:0.6000 3rd Qu.:0.4000 3rd Qu.: 17.50
## Max. :0.9000 Max. :0.5000 Max. :104.00
# Create a binary variable for marijuana use (e.g., use > 0%)
clean_drug_data$marijuana_use_binary <- ifelse(clean_drug_data$marijuana_use > 0, 1, 0)
# Check the distribution of the binary variable
table(clean_drug_data$marijuana_use_binary)##
## 1
## 17
# Fit a logistic regression model
logistic_model <- glm(marijuana_use_binary ~ age, data = clean_drug_data, family = binomial)
# Summary of the model
summary(logistic_model)##
## Call:
## glm(formula = marijuana_use_binary ~ age, family = binomial,
## data = clean_drug_data)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 2.557e+01 2.160e+05 0 1
## age13 -2.210e-06 3.055e+05 0 1
## age14 -2.210e-06 3.055e+05 0 1
## age15 -2.210e-06 3.055e+05 0 1
## age16 -2.210e-06 3.055e+05 0 1
## age17 -2.210e-06 3.055e+05 0 1
## age18 -2.210e-06 3.055e+05 0 1
## age19 -2.210e-06 3.055e+05 0 1
## age20 -2.210e-06 3.055e+05 0 1
## age21 -2.210e-06 3.055e+05 0 1
## age22-23 -2.210e-06 3.055e+05 0 1
## age24-25 -2.210e-06 3.055e+05 0 1
## age26-29 -2.210e-06 3.055e+05 0 1
## age30-34 -2.210e-06 3.055e+05 0 1
## age35-49 -2.210e-06 3.055e+05 0 1
## age50-64 -2.210e-06 3.055e+05 0 1
## age65+ -2.210e-06 3.055e+05 0 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 0.0000e+00 on 16 degrees of freedom
## Residual deviance: 2.6809e-10 on 0 degrees of freedom
## AIC: 34
##
## Number of Fisher Scoring iterations: 24
## Warning: NAs introduced by coercion
# Remove rows with any NA, NaN, or Inf values
clean_drug_data <- drug_data %>%
mutate(across(everything(), ~ifelse(is.nan(.), NA, .))) %>%
filter_all(all_vars(!is.na(.))) %>%
filter_all(all_vars(!is.infinite(.)))
# Verify the cleaned data
summary(clean_drug_data)## age n alcohol_use alcohol_frequency
## Min. :12.00 Min. :2223 Min. : 3.90 Min. : 3.0
## 1st Qu.:14.25 1st Qu.:2383 1st Qu.:20.88 1st Qu.: 6.0
## Median :16.50 Median :2774 Median :44.70 Median :11.5
## Mean :16.50 Mean :2672 Mean :42.53 Mean :20.3
## 3rd Qu.:18.75 3rd Qu.:2916 3rd Qu.:63.12 3rd Qu.:33.0
## Max. :21.00 Max. :3058 Max. :83.20 Max. :52.0
## marijuana_use marijuana_frequency cocaine_use cocaine_frequency
## Min. : 1.10 Min. : 4.00 Min. :0.100 Length:10
## 1st Qu.:10.15 1st Qu.:24.25 1st Qu.:0.200 Class :character
## Median :25.25 Median :33.00 Median :1.500 Mode :character
## Mean :21.23 Mean :35.80 Mean :2.080
## 3rd Qu.:33.30 3rd Qu.:52.00 3rd Qu.:3.875
## Max. :34.00 Max. :60.00 Max. :4.900
## crack_use crack_frequency heroin_use heroin_frequency
## Min. :0.000 Length:10 Min. :0.000 Length:10
## 1st Qu.:0.000 Class :character 1st Qu.:0.100 Class :character
## Median :0.100 Mode :character Median :0.150 Mode :character
## Mean :0.220 Mean :0.300
## 3rd Qu.:0.475 3rd Qu.:0.475
## Max. :0.600 Max. :0.900
## hallucinogen_use hallucinogen_frequency inhalant_use inhalant_frequency
## Min. :0.200 Min. : 2.0 Min. :1.400 Length:10
## 1st Qu.:1.725 1st Qu.: 3.0 1st Qu.:1.525 Class :character
## Median :4.100 Median : 3.5 Median :1.900 Mode :character
## Mean :4.200 Mean : 8.4 Mean :2.030
## 3rd Qu.:6.825 3rd Qu.: 4.0 3rd Qu.:2.500
## Max. :8.600 Max. :52.0 Max. :3.000
## pain_releiver_use pain_releiver_frequency oxycontin_use oxycontin_frequency
## Min. : 2.00 Min. : 7.0 Min. :0.100 Length:10
## 1st Qu.: 4.30 1st Qu.:10.0 1st Qu.:0.500 Class :character
## Median : 7.35 Median :12.0 Median :1.200 Mode :character
## Mean : 6.61 Mean :13.7 Mean :1.010
## 3rd Qu.: 9.15 3rd Qu.:13.5 3rd Qu.:1.475
## Max. :10.00 Max. :36.0 Max. :1.700
## tranquilizer_use tranquilizer_frequency stimulant_use stimulant_frequency
## Min. :0.200 Min. : 4.50 Min. :0.200 Min. : 2.000
## 1st Qu.:1.175 1st Qu.: 5.50 1st Qu.:0.975 1st Qu.: 6.000
## Median :2.950 Median : 8.50 Median :2.300 Median : 8.500
## Mean :2.770 Mean :13.85 Mean :2.180 Mean : 7.850
## 3rd Qu.:4.125 3rd Qu.:11.75 3rd Qu.:3.225 3rd Qu.: 9.875
## Max. :5.400 Max. :52.00 Max. :4.100 Max. :12.000
## meth_use meth_frequency sedative_use sedative_frequency
## Min. :0.000 Length:10 Min. :0.10 Min. : 3.000
## 1st Qu.:0.150 Class :character 1st Qu.:0.20 1st Qu.: 6.125
## Median :0.350 Mode :character Median :0.30 Median : 9.500
## Mean :0.380 Mean :0.31 Mean :11.700
## 3rd Qu.:0.575 3rd Qu.:0.40 3rd Qu.:15.625
## Max. :0.900 Max. :0.50 Max. :30.000
# Create a binary variable for marijuana use (e.g., use > 0%)
clean_drug_data$marijuana_use_binary <- ifelse(clean_drug_data$marijuana_use > 0, 1, 0)
# Check the distribution of the binary variable
table(clean_drug_data$marijuana_use_binary)##
## 1
## 10
# Fit a logistic regression model
logistic_model <- glm(marijuana_use_binary ~ age, data = clean_drug_data, family = binomial)
# Summary of the model
summary(logistic_model)##
## Call:
## glm(formula = marijuana_use_binary ~ age, family = binomial,
## data = clean_drug_data)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 2.457e+01 2.416e+05 0 1
## age 1.604e-07 1.442e+04 0 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 0.0000e+00 on 9 degrees of freedom
## Residual deviance: 4.2867e-10 on 8 degrees of freedom
## AIC: 4
##
## Number of Fisher Scoring iterations: 23
# Check for finite min and max values of age
min_age <- min(clean_drug_data$age, na.rm = TRUE)
max_age <- max(clean_drug_data$age, na.rm = TRUE)
# Generate data for prediction
age_seq <- seq(min_age, max_age, by = 1)
pred_data <- data.frame(age = age_seq)
pred_data$predicted_prob <- predict(logistic_model, newdata = pred_data, type = "response")
# Plot the logistic regression curve
ggplot(clean_drug_data, aes(x = age, y = marijuana_use_binary)) +
geom_point(alpha = 0.5) +
geom_line(data = pred_data, aes(x = age, y = predicted_prob), color = "red") +
labs(title = "Logistic Regression: Probability of Marijuana Use by Age",
x = "Age",
y = "Probability of Marijuana Use")# Convert age to numeric if necessary
drug_data$age <- as.numeric(as.character(drug_data$age))
# Remove rows with any NA, NaN, or Inf values
clean_drug_data <- drug_data %>%
mutate(across(everything(), ~ifelse(is.nan(.), NA, .))) %>%
filter_all(all_vars(!is.na(.))) %>%
filter_all(all_vars(!is.infinite(.)))
# Verify the cleaned data
summary(clean_drug_data)## age n alcohol_use alcohol_frequency
## Min. :12.00 Min. :2223 Min. : 3.90 Min. : 3.0
## 1st Qu.:14.25 1st Qu.:2383 1st Qu.:20.88 1st Qu.: 6.0
## Median :16.50 Median :2774 Median :44.70 Median :11.5
## Mean :16.50 Mean :2672 Mean :42.53 Mean :20.3
## 3rd Qu.:18.75 3rd Qu.:2916 3rd Qu.:63.12 3rd Qu.:33.0
## Max. :21.00 Max. :3058 Max. :83.20 Max. :52.0
## marijuana_use marijuana_frequency cocaine_use cocaine_frequency
## Min. : 1.10 Min. : 4.00 Min. :0.100 Length:10
## 1st Qu.:10.15 1st Qu.:24.25 1st Qu.:0.200 Class :character
## Median :25.25 Median :33.00 Median :1.500 Mode :character
## Mean :21.23 Mean :35.80 Mean :2.080
## 3rd Qu.:33.30 3rd Qu.:52.00 3rd Qu.:3.875
## Max. :34.00 Max. :60.00 Max. :4.900
## crack_use crack_frequency heroin_use heroin_frequency
## Min. :0.000 Length:10 Min. :0.000 Length:10
## 1st Qu.:0.000 Class :character 1st Qu.:0.100 Class :character
## Median :0.100 Mode :character Median :0.150 Mode :character
## Mean :0.220 Mean :0.300
## 3rd Qu.:0.475 3rd Qu.:0.475
## Max. :0.600 Max. :0.900
## hallucinogen_use hallucinogen_frequency inhalant_use inhalant_frequency
## Min. :0.200 Min. : 2.0 Min. :1.400 Length:10
## 1st Qu.:1.725 1st Qu.: 3.0 1st Qu.:1.525 Class :character
## Median :4.100 Median : 3.5 Median :1.900 Mode :character
## Mean :4.200 Mean : 8.4 Mean :2.030
## 3rd Qu.:6.825 3rd Qu.: 4.0 3rd Qu.:2.500
## Max. :8.600 Max. :52.0 Max. :3.000
## pain_releiver_use pain_releiver_frequency oxycontin_use oxycontin_frequency
## Min. : 2.00 Min. : 7.0 Min. :0.100 Length:10
## 1st Qu.: 4.30 1st Qu.:10.0 1st Qu.:0.500 Class :character
## Median : 7.35 Median :12.0 Median :1.200 Mode :character
## Mean : 6.61 Mean :13.7 Mean :1.010
## 3rd Qu.: 9.15 3rd Qu.:13.5 3rd Qu.:1.475
## Max. :10.00 Max. :36.0 Max. :1.700
## tranquilizer_use tranquilizer_frequency stimulant_use stimulant_frequency
## Min. :0.200 Min. : 4.50 Min. :0.200 Min. : 2.000
## 1st Qu.:1.175 1st Qu.: 5.50 1st Qu.:0.975 1st Qu.: 6.000
## Median :2.950 Median : 8.50 Median :2.300 Median : 8.500
## Mean :2.770 Mean :13.85 Mean :2.180 Mean : 7.850
## 3rd Qu.:4.125 3rd Qu.:11.75 3rd Qu.:3.225 3rd Qu.: 9.875
## Max. :5.400 Max. :52.00 Max. :4.100 Max. :12.000
## meth_use meth_frequency sedative_use sedative_frequency
## Min. :0.000 Length:10 Min. :0.10 Min. : 3.000
## 1st Qu.:0.150 Class :character 1st Qu.:0.20 1st Qu.: 6.125
## Median :0.350 Mode :character Median :0.30 Median : 9.500
## Mean :0.380 Mean :0.31 Mean :11.700
## 3rd Qu.:0.575 3rd Qu.:0.40 3rd Qu.:15.625
## Max. :0.900 Max. :0.50 Max. :30.000
# Fit a linear regression model for cocaine use
linear_model_cocaine <- lm(cocaine_use ~ age, data = clean_drug_data)
# Summary of the model
summary(linear_model_cocaine)##
## Call:
## lm(formula = cocaine_use ~ age, data = clean_drug_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.76182 -0.39591 0.01091 0.38364 0.88364
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -8.42000 1.07258 -7.850 5.0e-05 ***
## age 0.63636 0.06404 9.937 8.9e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.5817 on 8 degrees of freedom
## Multiple R-squared: 0.925, Adjusted R-squared: 0.9157
## F-statistic: 98.74 on 1 and 8 DF, p-value: 8.9e-06
# Generate predictions for the plot
clean_drug_data$predicted_cocaine_use <- predict(linear_model_cocaine, newdata = clean_drug_data)
# Plot the linear regression model
ggplot(clean_drug_data, aes(x = age, y = cocaine_use)) +
geom_point(alpha = 0.5) +
geom_line(aes(y = predicted_cocaine_use), color = "red") +
labs(title = "Linear Regression: Cocaine Use by Age",
x = "Age",
y = "Cocaine Use (%)") +
theme_minimal()# Fit a linear regression model for cocaine use
linear_model_alcohol <- lm(alcohol_use ~ age, data = clean_drug_data)
# Summary of the model
summary(linear_model_alcohol)##
## Call:
## lm(formula = alcohol_use ~ age, data = clean_drug_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.0606 -1.6512 0.2855 1.9045 2.7855
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -104.7000 4.5491 -23.02 1.35e-08 ***
## age 8.9230 0.2716 32.85 8.04e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.467 on 8 degrees of freedom
## Multiple R-squared: 0.9926, Adjusted R-squared: 0.9917
## F-statistic: 1079 on 1 and 8 DF, p-value: 8.04e-10
# Generate predictions for the plot
clean_drug_data$predicted_alcohol_use <- predict(linear_model_alcohol, newdata = clean_drug_data)
# Plot the linear regression model
ggplot(clean_drug_data, aes(x = age, y = cocaine_use)) +
geom_point(alpha = 0.5) +
geom_line(aes(y = predicted_alcohol_use), color = "red") +
labs(title = "Linear Regression: Alcohol Use by Age",
x = "Age",
y = "Alcohol Use (%)") +
theme_minimal()# Fit a linear regression model for cocaine use
linear_model_heroin <- lm(heroin_use ~ age, data = clean_drug_data)
# Summary of the model
summary(linear_model_heroin)##
## Call:
## lm(formula = heroin_use ~ age, data = clean_drug_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.240606 -0.054545 -0.009394 0.017121 0.315758
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.04000 0.30290 -3.433 0.00891 **
## age 0.08121 0.01809 4.490 0.00203 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1643 on 8 degrees of freedom
## Multiple R-squared: 0.7159, Adjusted R-squared: 0.6804
## F-statistic: 20.16 on 1 and 8 DF, p-value: 0.002028
# Generate predictions for the plot
clean_drug_data$predicted_heroin_use <- predict(linear_model_heroin, newdata = clean_drug_data)
# Plot the linear regression model
ggplot(clean_drug_data, aes(x = age, y = heroin_use)) +
geom_point(alpha = 0.5) +
geom_line(aes(y = predicted_heroin_use), color = "red") +
labs(title = "Linear Regression: Heroin Use by Age",
x = "Age",
y = "Heroin Use (%)") +
theme_minimal()# Fit a linear regression model for cocaine use
linear_model_crack <- lm(crack_use ~ age, data = clean_drug_data)
# Summary of the model
summary(linear_model_crack)##
## Call:
## lm(formula = crack_use ~ age, data = clean_drug_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.18303 -0.04833 0.01485 0.08864 0.12121
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.00000 0.21122 -4.734 0.001474 **
## age 0.07394 0.01261 5.863 0.000377 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1145 on 8 degrees of freedom
## Multiple R-squared: 0.8112, Adjusted R-squared: 0.7876
## F-statistic: 34.37 on 1 and 8 DF, p-value: 0.0003772
# Generate predictions for the plot
clean_drug_data$predicted_crack_use <- predict(linear_model_crack, newdata = clean_drug_data)
# Plot the linear regression model
ggplot(clean_drug_data, aes(x = age, y = crack_use)) +
geom_point(alpha = 0.5) +
geom_line(aes(y = predicted_crack_use), color = "red") +
labs(title = "Linear Regression: Crack Use by Age",
x = "Age",
y = "Crack Use (%)") +
theme_minimal()# Fit linear regression models for each substance use
linear_model_crack <- lm(crack_use ~ age, data = clean_drug_data)
linear_model_alcohol <- lm(alcohol_use ~ age, data = clean_drug_data)
linear_model_heroin <- lm(heroin_use ~ age, data = clean_drug_data)
linear_model_marijuana <- lm(marijuana_use ~ age, data = clean_drug_data)
linear_model_sedative <- lm(sedative_use ~ age, data = clean_drug_data)
linear_model_painreliever <- lm(pain_releiver_use ~ age, data = clean_drug_data)
linear_model_inhalant <- lm(inhalant_use ~ age, data = clean_drug_data)
# Summarize each model
summary(linear_model_crack)##
## Call:
## lm(formula = crack_use ~ age, data = clean_drug_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.18303 -0.04833 0.01485 0.08864 0.12121
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.00000 0.21122 -4.734 0.001474 **
## age 0.07394 0.01261 5.863 0.000377 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1145 on 8 degrees of freedom
## Multiple R-squared: 0.8112, Adjusted R-squared: 0.7876
## F-statistic: 34.37 on 1 and 8 DF, p-value: 0.0003772
##
## Call:
## lm(formula = alcohol_use ~ age, data = clean_drug_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.0606 -1.6512 0.2855 1.9045 2.7855
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -104.7000 4.5491 -23.02 1.35e-08 ***
## age 8.9230 0.2716 32.85 8.04e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.467 on 8 degrees of freedom
## Multiple R-squared: 0.9926, Adjusted R-squared: 0.9917
## F-statistic: 1079 on 1 and 8 DF, p-value: 8.04e-10
##
## Call:
## lm(formula = heroin_use ~ age, data = clean_drug_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.240606 -0.054545 -0.009394 0.017121 0.315758
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.04000 0.30290 -3.433 0.00891 **
## age 0.08121 0.01809 4.490 0.00203 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1643 on 8 degrees of freedom
## Multiple R-squared: 0.7159, Adjusted R-squared: 0.6804
## F-statistic: 20.16 on 1 and 8 DF, p-value: 0.002028
##
## Call:
## lm(formula = marijuana_use ~ age, data = clean_drug_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.9909 -2.0359 -0.9227 2.9527 6.2164
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -47.5600 7.8264 -6.077 0.000297 ***
## age 4.1691 0.4673 8.922 1.98e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.244 on 8 degrees of freedom
## Multiple R-squared: 0.9087, Adjusted R-squared: 0.8973
## F-statistic: 79.6 on 1 and 8 DF, p-value: 1.976e-05
##
## Call:
## lm(formula = sedative_use ~ age, data = clean_drug_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.13273 -0.09182 -0.01455 0.08318 0.17636
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.14000 0.21388 -0.655 0.5311
## age 0.02727 0.01277 2.136 0.0652 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.116 on 8 degrees of freedom
## Multiple R-squared: 0.3631, Adjusted R-squared: 0.2835
## F-statistic: 4.561 on 1 and 8 DF, p-value: 0.06522
##
## Call:
## lm(formula = pain_releiver_use ~ age, data = clean_drug_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.89455 -0.32864 0.06182 0.38682 1.41394
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -9.1000 1.8668 -4.875 0.00123 **
## age 0.9521 0.1115 8.542 2.72e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.012 on 8 degrees of freedom
## Multiple R-squared: 0.9012, Adjusted R-squared: 0.8888
## F-statistic: 72.97 on 1 and 8 DF, p-value: 2.716e-05
##
## Call:
## lm(formula = inhalant_use ~ age, data = clean_drug_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.91818 -0.14818 -0.02152 0.24667 0.91576
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.82000 0.93342 4.092 0.00347 **
## age -0.10848 0.05573 -1.947 0.08746 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.5062 on 8 degrees of freedom
## Multiple R-squared: 0.3214, Adjusted R-squared: 0.2366
## F-statistic: 3.789 on 1 and 8 DF, p-value: 0.08746
# Generate predictions for the plots
clean_drug_data$predicted_crack_use <- predict(linear_model_crack, newdata = clean_drug_data)
clean_drug_data$predicted_alcohol_use <- predict(linear_model_alcohol, newdata = clean_drug_data)
clean_drug_data$predicted_heroin_use <- predict(linear_model_heroin, newdata = clean_drug_data)
clean_drug_data$predicted_marijuana_use <- predict(linear_model_marijuana, newdata = clean_drug_data)
clean_drug_data$predicted_sedative_use <- predict(linear_model_sedative, newdata = clean_drug_data)
clean_drug_data$predicted_painreliever_use <- predict(linear_model_painreliever, newdata = clean_drug_data)
clean_drug_data$predicted_inhalant_use <- predict(linear_model_inhalant, newdata = clean_drug_data)
# Plot the linear regression models
plot_crack <- ggplot(clean_drug_data, aes(x = age, y = crack_use)) +
geom_point(alpha = 0.5) +
geom_line(aes(y = predicted_crack_use), color = "red") +
labs(title = "Linear Regression: Crack Use by Age",
x = "Age",
y = "Crack Use (%)") +
theme_minimal()
plot_alcohol <- ggplot(clean_drug_data, aes(x = age, y = alcohol_use)) +
geom_point(alpha = 0.5) +
geom_line(aes(y = predicted_alcohol_use), color = "red") +
labs(title = "Linear Regression: Alcohol Use by Age",
x = "Age",
y = "Alcohol Use (%)") +
theme_minimal()
plot_heroin <- ggplot(clean_drug_data, aes(x = age, y = heroin_use)) +
geom_point(alpha = 0.5) +
geom_line(aes(y = predicted_heroin_use), color = "red") +
labs(title = "Linear Regression: Heroin Use by Age",
x = "Age",
y = "Heroin Use (%)") +
theme_minimal()
plot_marijuana <- ggplot(clean_drug_data, aes(x = age, y = marijuana_use)) +
geom_point(alpha = 0.5) +
geom_line(aes(y = predicted_heroin_use), color = "red") +
labs(title = "Linear Regression: Marijuana Use by Age",
x = "Age",
y = "Marijuana Use (%)") +
theme_minimal()
plot_sedative <- ggplot(clean_drug_data, aes(x = age, y = sedative_use)) +
geom_point(alpha = 0.5) +
geom_line(aes(y = predicted_sedative_use), color = "red") +
labs(title = "Linear Regression: Sedative Use by Age",
x = "Age",
y = "Sedative Use (%)") +
theme_minimal()
plot_painreliever <- ggplot(clean_drug_data, aes(x = age, y = pain_releiver_use)) +
geom_point(alpha = 0.5) +
geom_line(aes(y = predicted_painreliever_use), color = "red") +
labs(title = "Linear Regression: Pain Reliever Use by Age",
x = "Age",
y = "Pain Reliever Use (%)") +
theme_minimal()
plot_inhalant <- ggplot(clean_drug_data, aes(x = age, y = inhalant_use)) +
geom_point(alpha = 0.5) +
geom_line(aes(y = predicted_inhalant_use), color = "red") +
labs(title = "Linear Regression: Inhalant Use by Age",
x = "Age",
y = "Inhalant Use (%)") +
theme_minimal()
# Output the plots
plot_crack# Summarize each model
summary_crack <- summary(linear_model_crack)
summary_alcohol <- summary(linear_model_alcohol)
summary_heroin <- summary(linear_model_heroin)
summary_marijuana <- summary(linear_model_marijuana)
# Extract the relevant statistics
# For crack use
t_value_crack <- summary_crack$coefficients["age", "t value"]
p_value_crack <- summary_crack$coefficients["age", "Pr(>|t|)"]
conf_int_crack <- confint(linear_model_crack)["age", ]
# For alcohol use
t_value_alcohol <- summary_alcohol$coefficients["age", "t value"]
p_value_alcohol <- summary_alcohol$coefficients["age", "Pr(>|t|)"]
conf_int_alcohol <- confint(linear_model_alcohol)["age", ]
# For heroin use
t_value_heroin <- summary_heroin$coefficients["age", "t value"]
p_value_heroin <- summary_heroin$coefficients["age", "Pr(>|t|)"]
conf_int_heroin <- confint(linear_model_heroin)["age", ]
# For marijuana use
t_value_marijuana <- summary_marijuana$coefficients["age", "t value"]
p_value_marijuana <- summary_marijuana$coefficients["age", "Pr(>|t|)"]
conf_int_marijuana <- confint(linear_model_marijuana)["age", ]
# Output the results
list(
crack_use = list(
t_value = t_value_crack,
p_value = p_value_crack,
conf_int = conf_int_crack
),
alcohol_use = list(
t_value = t_value_alcohol,
p_value = p_value_alcohol,
conf_int = conf_int_alcohol
),
heroin_use = list(
t_value = t_value_heroin,
p_value = p_value_heroin,
conf_int = conf_int_heroin
),
marijuana_use = list(
t_value = t_value_marijuana,
p_value = p_value_marijuana,
conf_int = conf_int_marijuana
)
)## $crack_use
## $crack_use$t_value
## [1] 5.862946
##
## $crack_use$p_value
## [1] 0.000377206
##
## $crack_use$conf_int
## 2.5 % 97.5 %
## 0.04485767 0.10302111
##
##
## $alcohol_use
## $alcohol_use$t_value
## [1] 32.85144
##
## $alcohol_use$p_value
## [1] 8.039608e-10
##
## $alcohol_use$conf_int
## 2.5 % 97.5 %
## 8.296679 9.549382
##
##
## $heroin_use
## $heroin_use$t_value
## [1] 4.490429
##
## $heroin_use$p_value
## [1] 0.0020276
##
## $heroin_use$conf_int
## 2.5 % 97.5 %
## 0.03950664 0.12291760
##
##
## $marijuana_use
## $marijuana_use$t_value
## [1] 8.921706
##
## $marijuana_use$p_value
## [1] 1.975971e-05
##
## $marijuana_use$conf_int
## 2.5 % 97.5 %
## 3.091501 5.246681
Based on the linear regression models, it is evident that there was a linear relationship between age and the use of crack, heroin, and alcohol. For each of these substances, the models demonstrated significant trends with age as a predictor.
Crack Use
The linear regression model for crack use revealed a positive relationship between age and the percentage of users. This suggests that as age increases, the percentage of individuals using crack also tends to increase. The statistical significance of this relationship indicates that age is an important factor in understanding crack use patterns.
To analyze the relationship between age and drug use, I created linear regression models for various substances, including cocaine, crack, alcohol, and heroin. Each model aimed to understand how drug use percentages change with age. The summary output for each model provided key metrics such as coefficients, R-squared value, p-value, and confidence intervals. These metrics helped us evaluate the significance and strength of the relationship between age and drug use. These findings highlight the importance of age-specific interventions and policies. Younger age groups might benefit from different preventive measures compared to older groups. Public health officials and policymakers can use this information to design targeted strategies to reduce drug use among specific age demographics. Tailored education and prevention programs can be more effective in addressing drug abuse.