About this analysis
This analysis seeks to examine the limitations that exists between those who have taken pain killers, and those who have not taken pain killers, over the past month. Particularly, this analysis examines the mental and physical limitations on those who took and misused pain killers over the past month as opposed to those who did not misuse pain killers over the past month.
library(readr)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(knitr)
library(kableExtra)
library(ggplot2)
library(gridExtra)
##
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
##
## combine
Drugdata <-read_csv("/Users/juliushunte/Desktop/NSDUH-2015-DS0001-data.csv")
druglife <-Drugdata%>%
mutate(PainRlvMonth = ifelse(pnrnmmon==1,"Misused pain relievers in past 30 days",
ifelse(pnrnmmon==0,"Correctly used pain relievers in past 30 days",NA)),
PainRlvAddict = ifelse(pnrllottm==1,"Spent more time chasing pain reliever in year",
ifelse(pnrllottm==2,"Spent no time chasing pain reliever in year",NA)),
PainRlvProb = ifelse(pnrlserpb==1,"Pain reliever caused serious problems at hm, wk & sch",
ifelse(pnrlserpb==2,"Pain reliever caused no problem at hm, wk & sch",NA)),
PainRlvCogn = ifelse(diffthink==1,"Have serious difficulty concentrating",
ifelse(diffthink==2,"Have no difficulty concentrating",NA)),
PainRlvDangr = ifelse(pnrlpdang==1,"Used pain reliever while doing dangerous activities",
ifelse(pnrlpdang==2,"Used no pain relievers while doing dangerous activities",NA)),
PainRlvWalk = ifelse(diffwalk==1,"Have serious difficulty walking or climbing stairs",
ifelse(diffwalk==2,"Have no difficulty waking or climbing stairs",NA)),
PainRlvDress = ifelse(diffdress==1,"Have serious difficulty dressing or bathing",
ifelse(diffdress==2,"Have no difficulty dressing or bathing",NA)),
PainRlvErand = ifelse(differand==1,"Have difficulty doing errands",
ifelse(differand==2,"Have no difficulty doing errands",NA)))%>%
select(PainRlvAddict,PainRlvProb,PainRlvCogn,PainRlvDangr,PainRlvWalk,PainRlvDress,PainRlvErand,PainRlvMonth)
Social Problems
Addiction
- How misusing pain killers over the past month [PNRNMMON] causes addiction to pain killers over the year [PNRLLOTTM].
Table findings
unique(druglife$PainRlvMonth)
## [1] "Correctly used pain relievers in past 30 days"
## [2] "Misused pain relievers in past 30 days"
prop.table(table(druglife$PainRlvAddict, druglife$PainRlvMonth),1)%>%round(3)%>%kable()
|
|
Correctly used pain relievers in past 30 days
|
Misused pain relievers in past 30 days
|
|
Spent more time chasing pain reliever in year
|
0.468
|
0.532
|
|
Spent no time chasing pain reliever in year
|
0.742
|
0.258
|
Chart Indicators
druglife%>%
filter(PainRlvMonth%in%c("Misused pain relievers in past 30 days","Correctly used pain relievers in past 30 days"))%>%
group_by(PainRlvAddict, PainRlvMonth)%>%
summarize(n=n())%>%
mutate(percent = n/sum(n))%>%
filter(PainRlvAddict=="Spent more time chasing pain reliever in year")%>%
ggplot()+
geom_col(aes(x=PainRlvMonth,y=percent,fill=percent))+
coord_flip()+
ggtitle("53% of those who misused pain relievers in the past
30 days, spent more time chasing pain
relievers in the past year, as opposed
to 47% who did not misuse pain relievers")

Chi-Square Test
chisq.test(druglife$PainRlvAddict, druglife$PainRlvMonth)
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: druglife$PainRlvAddict and druglife$PainRlvMonth
## X-squared = 139.18, df = 1, p-value < 2.2e-16
Problems at Home/Work/School
- How misusing pain killers over the past month [PNRNMMON] causes serious problems at home, work, or school [PNRLSERPB].
Table findings
unique(druglife$PainRlvMonth)
## [1] "Correctly used pain relievers in past 30 days"
## [2] "Misused pain relievers in past 30 days"
prop.table(table(druglife$PainRlvProb, druglife$PainRlvMonth),1)%>%round(3)%>%kable()
|
|
Correctly used pain relievers in past 30 days
|
Misused pain relievers in past 30 days
|
|
Pain reliever caused no problem at hm, wk & sch
|
0.718
|
0.282
|
|
Pain reliever caused serious problems at hm, wk & sch
|
0.484
|
0.516
|
Chart Indicators
druglife%>%
filter(PainRlvMonth%in%c("Misused pain relievers in past 30 days","Correctly used pain relievers in past 30 days"))%>%
group_by(PainRlvProb, PainRlvMonth)%>%
summarize(n=n())%>%
mutate(percent = n/sum(n))%>%
filter(PainRlvProb=="Pain reliever caused serious problems at hm, wk & sch")%>%
ggplot()+
geom_col(aes(x=PainRlvMonth,y=percent,fill=percent))+
coord_flip()+
ggtitle("51% of those who misused pain relievers
in the past 30 days reported serious
problems at home, work or school,
as opposed to 48% who did not misuse
pain relievers")

Chi-Square Test
chisq.test(druglife$PainRlvMonth, druglife$PainRlvProb)
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: druglife$PainRlvMonth and druglife$PainRlvProb
## X-squared = 52.936, df = 1, p-value = 3.445e-13
Risky Behaviors
- How misusing pain killers over the past month [PNRNMMON] increases risky behaviors leading to dangerous activities [PNRLPDANG].
Table findings
unique(druglife$PainRlvMonth)
## [1] "Correctly used pain relievers in past 30 days"
## [2] "Misused pain relievers in past 30 days"
prop.table(table(druglife$PainRlvDangr, druglife$PainRlvMonth),1)%>%round(3)%>%kable()
|
|
Correctly used pain relievers in past 30 days
|
Misused pain relievers in past 30 days
|
|
Used no pain relievers while doing dangerous activities
|
0.715
|
0.285
|
|
Used pain reliever while doing dangerous activities
|
0.477
|
0.523
|
Chart Indicators
druglife%>%
filter(PainRlvMonth%in%c("Misused pain relievers in past 30 days","Correctly used pain relievers in past 30 days"))%>%
group_by(PainRlvDangr, PainRlvMonth)%>%
summarize(n=n())%>%
mutate(percent = n/sum(n))%>%
filter(PainRlvDangr=="Used pain reliever while doing dangerous activities")%>%
ggplot()+
geom_col(aes(x=PainRlvMonth,y=percent,fill=percent))+
coord_flip()+
ggtitle("52% reported doing dangerous
activities while misusing pain
relievers in the past 30 days, as
opposed to 48% who did not
misuse pain relievers")

Chi-Square Test
chisq.test(druglife$PainRlvDangr, druglife$PainRlvMonth)
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: druglife$PainRlvDangr and druglife$PainRlvMonth
## X-squared = 43.272, df = 1, p-value = 4.764e-11
Cognitive Problems
Difficulty Concentrating
- How misusing pain killers over the past month [PNRNMMON] causes serious difficulty in concentration [DIFFTHINK].
Table findings
unique(druglife$PainRlvMonth)
## [1] "Correctly used pain relievers in past 30 days"
## [2] "Misused pain relievers in past 30 days"
prop.table(table(druglife$PainRlvCogn, druglife$PainRlvMonth),1)%>%round(3)%>%kable()
|
|
Correctly used pain relievers in past 30 days
|
Misused pain relievers in past 30 days
|
|
Have no difficulty concentrating
|
0.986
|
0.014
|
|
Have serious difficulty concentrating
|
0.959
|
0.041
|
Chart Indicators
druglife%>%
filter(PainRlvMonth%in%c("Misused pain relievers in past 30 days","Correctly used pain relievers in past 30 days"))%>%
group_by(PainRlvCogn, PainRlvMonth)%>%
summarize(n=n())%>%
mutate(percent = n/sum(n))%>%
filter(PainRlvCogn=="Have serious difficulty concentrating")%>%
ggplot()+
geom_col(aes(x=PainRlvMonth,y=percent,fill=percent))+
coord_flip()+
ggtitle("Only 4% reported serious difficulty
concentrating misusing pain
relievers in the past 30 days, as
opposed to 96% who did not misuse
pain relievers")

Chi-Square Test
chisq.test(druglife$PainRlvMonth, druglife$PainRlvCogn)
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: druglife$PainRlvMonth and druglife$PainRlvCogn
## X-squared = 201.53, df = 1, p-value < 2.2e-16
Physical Challenges
To see how excessive use of pain killers can affect one physically over a month.
Difficulty Walking
- How misusing pain killers over the past month [PNRNMMON] causes difficulty in walking and climbing stairs [DIFFWALK].
Table findings
unique(druglife$PainRlvMonth)
## [1] "Correctly used pain relievers in past 30 days"
## [2] "Misused pain relievers in past 30 days"
prop.table(table(druglife$PainRlvWalk, druglife$PainRlvMonth),1)%>%round(3)%>%kable()
|
|
Correctly used pain relievers in past 30 days
|
Misused pain relievers in past 30 days
|
|
Have no difficulty waking or climbing stairs
|
0.984
|
0.016
|
|
Have serious difficulty walking or climbing stairs
|
0.972
|
0.028
|
Chart Indicators
druglife%>%
filter(PainRlvMonth%in%c("Misused pain relievers in past 30 days","Correctly used pain relievers in past 30 days"))%>%
group_by(PainRlvWalk, PainRlvMonth)%>%
summarize(n=n())%>%
mutate(percent = n/sum(n))%>%
filter(PainRlvWalk=="Have serious difficulty walking or climbing stairs")%>%
ggplot()+
geom_col(aes(x=PainRlvMonth,y=percent,fill=percent))+
coord_flip()+
ggtitle("Only 3% reported having difficulty
walking or climbing stairs while
misusing pain relievers in the past 30 days,
as opposed to 97% who did not misuse
pain relievers")

Chi-Square Test
chisq.test(druglife$PainRlvMonth, druglife$PainRlvWalk)
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: druglife$PainRlvMonth and druglife$PainRlvWalk
## X-squared = 22.666, df = 1, p-value = 1.927e-06
Difficulty Dressing/Bathing
- How misusing pain killers over the past month [PNRNMMON] causes difficulty in dressing or bathing [DIFFDRESS].
Table findings
unique(druglife$PainRlvMonth)
## [1] "Correctly used pain relievers in past 30 days"
## [2] "Misused pain relievers in past 30 days"
prop.table(table(druglife$PainRlvDress, druglife$PainRlvMonth),1)%>%round(3)%>%kable()
|
|
Correctly used pain relievers in past 30 days
|
Misused pain relievers in past 30 days
|
|
Have no difficulty dressing or bathing
|
0.984
|
0.016
|
|
Have serious difficulty dressing or bathing
|
0.958
|
0.042
|
Chart Indicators
druglife%>%
filter(PainRlvMonth%in%c("Misused pain relievers in past 30 days","Correctly used pain relievers in past 30 days"))%>%
group_by(PainRlvDress, PainRlvMonth)%>%
summarize(n=n())%>%
mutate(percent = n/sum(n))%>%
filter(PainRlvDress=="Have serious difficulty dressing or bathing")%>%
ggplot()+
geom_col(aes(x=PainRlvMonth,y=percent,fill=percent))+
coord_flip()+
ggtitle("Only 4% reported having serious
difficulty dressing or bathing while
misusing pain relievers in the past 30 days,
as opposed to 96% who did not misuse
pain relievers")

Chi-Square Test
chisq.test(druglife$PainRlvMonth, druglife$PainRlvDress)
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: druglife$PainRlvMonth and druglife$PainRlvDress
## X-squared = 33.971, df = 1, p-value = 5.595e-09
Difficulty Doing Errands
- How misusing pain killers over the past month [PNRNMMON] causes difficulty in doing errands [DIFFERAND].
Table findings
unique(druglife$PainRlvMonth)
## [1] "Correctly used pain relievers in past 30 days"
## [2] "Misused pain relievers in past 30 days"
prop.table(table(druglife$PainRlvErand, druglife$PainRlvMonth),1)%>%round(3)%>%kable()
|
|
Correctly used pain relievers in past 30 days
|
Misused pain relievers in past 30 days
|
|
Have difficulty doing errands
|
0.953
|
0.047
|
|
Have no difficulty doing errands
|
0.983
|
0.017
|
Chart Indicators
druglife%>%
filter(PainRlvMonth%in%c("Misused pain relievers in past 30 days","Correctly used pain relievers in past 30 days"))%>%
group_by(PainRlvErand, PainRlvMonth)%>%
summarize(n=n())%>%
mutate(percent = n/sum(n))%>%
filter(PainRlvErand=="Have difficulty doing errands")%>%
ggplot()+
geom_col(aes(x=PainRlvMonth,y=percent,fill=percent))+
coord_flip()+
ggtitle("Only 2% reported having
difficulty doing errands while
misusing pain relievers in the past 30 days,
as opposed to 98% who did not misuse
pain relievers")

Chi-Square Test
chisq.test(druglife$PainRlvMonth, druglife$PainRlvErand)
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: druglife$PainRlvMonth and druglife$PainRlvErand
## X-squared = 116.51, df = 1, p-value < 2.2e-16
Conclusion
Misusing pain relievers over a 30 day period has a marginally stronger negative effect on one socially, but has little to significantly no effect on one cognitively and physically.
Social Problems
Addiction
Table findings
Chart Indicators
Chi-Square Test
Problems at Home/Work/School
Table findings
Chart Indicators
Chi-Square Test
Risky Behaviors
Table findings
Chart Indicators
Chi-Square Test