Effectiveness of Adolescent Sexual Education

Effectiveness of Adolescent Sexual Education
C. Combs, N. O’Connor, J. Salazar, M. Spencer.
February 19, 2017
library(ggplot2)
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(RColorBrewer)
kir <- read.delim("/Users/Michael/Desktop/Spring 2017/MATH
315/youth29jul15.txt", sep="\t")
kir$GENDER <- factor(kir$GENDER, levels = c(0,1), labels =
c("Male","Female"))
kir$twoparent <- factor(kir$twoparent, levels = c(0,1), labels = c("< 2
Parents","2 Parents"))
kir$CON8 <- factor(kir$CON8, levels = c(0,1,2,3), labels = c("Not
True","Little True", "Pretty True", "Very True"))
kir$intervention <- factor(kir$intervention, levels = c(0,1), labels = c("No
Intervention", "Intervention"))
kirsub <- subset(kir, select= c(twoparent, CON8, GENDER, RHC_UNW,
intervention))
kirsub <- na.omit(kirsub)
# Multiple plot function
#
# ggplot objects can be passed in ..., or to plotlist (as a list of ggplot
objects)
# - cols:
Number of columns in layout
# - layout: A matrix specifying the layout. If present, 'cols' is ignored.
#
# If the layout is something like matrix(c(1,2,3,3), nrow=2, byrow=TRUE),
# then plot 1 will go in the upper left, 2 will go in the upper right, and
# 3 will go all the way across the bottom.
#
multiplot <- function(..., plotlist=NULL, file, cols=1, layout=NULL) {
library(grid)
# Make a list from the ... arguments and plotlist
plots <- c(list(...), plotlist)
numPlots = length(plots)
# If layout is NULL, then use 'cols' to determine layout
if (is.null(layout)) {
# Make the panel
# ncol: Number of columns of plots
# nrow: Number of rows needed, calculated from # of cols
layout <- matrix(seq(1, cols * ceiling(numPlots/cols)),
ncol = cols, nrow = ceiling(numPlots/cols))
}
if (numPlots==1) {
print(plots[[1]])
} else {
# Set up the page
grid.newpage()
pushViewport(viewport(layout = grid.layout(nrow(layout), ncol(layout))))
# Make each plot, in the correct location
for (i in 1:numPlots) {
# Get the i,j matrix positions of the regions that contain this subplot
matchidx <- as.data.frame(which(layout == i, arr.ind = TRUE))
print(plots[[i]], vp = viewport(layout.pos.row = matchidx$row,
layout.pos.col = matchidx$col))
}
}
}
Introduction
The purpose of this report is to look for correlations between characteristics of students to
the number of students seeking reproductive health care. We also want to compare this
correlation of students that received the intervention with the students that then sought
sex-related health care.
The data has been collected from 10 different middle schools’ 7th and 8th grade students,
and subsequently data on 9th graders for several years. In their 7th and 8th grade years, an
intervention program was implemented to teach students about sex education. Then, in the
following years, 9th graders were surveyed about their knowledge, comfortability, and use
of sex-related health care. Characteristics measured are things such as demographics like
ethnicity, age, gender, etc... or answers to questions pertaining to college goals or home life..
For our purposes, we are looking specifically at gender, two parent homes versus one or
none at all, and college goals after high school. This report’s grant proposal hypothesizes
that a significantly larger percentage of intervention participants will report ever receiving
reproductive health care services compared to baseline participants. The additional
variables we are exploring include age, two parent homes versus one or none at all, and
college goals after high school. The first two are demographic, while the last is nondemographic. Although the last variable is non-demographic, we still think it is significant
since plans for your future, like attending a college or university, could indicate logical and
well-thought plans for sex and therefore sex-related health care. We are not analyzing a
subset of the entire sample. The variables we are analyzing apply to all of the students in
the study
Tables
Gender
table(kir$GENDER)
##
##
##
Male Female
3293
3106
Two Parent
table(kir$twoparent)
##
## < 2 Parents
##
1946
2 Parents
4407
Gender & Two Parent
table(kir$GENDER, kir$twoparent)
##
##
##
##
Male
Female
< 2 Parents 2 Parents
921
2343
1025
2064
After High School Plans for College
table(kir$CON8)
##
##
##
Not True Little True Pretty True
184
771
1424
table(kir$intervention)
##
## No Intervention
##
3168
Graphs
Intervention
3231
Very True
4008
After High School Plans for College
pt <- table(kir$CON8); pie(pt)
A. The pie chart visually shows the amounts of students who have goals after highschool.
ggplot(kirsub, aes(x=CON8,fill=GENDER)) + geom_bar(aes(fill=GENDER),
position="dodge") + scale_fill_brewer(palette="Set1") + xlab("Plans for
College?") + ylab("") + ggtitle("College Plans by Gender") +
guides(fill=guide_legend(title=NULL))
B. The bar graph shows the students who have goals after highschool, and is then further
divided into both males and females.
ggplot(kirsub, aes(x=twoparent,fill=GENDER)) + geom_bar(aes(fill=GENDER),
position="dodge") + scale_fill_brewer(palette="Set1") + xlab("Number of
Parents") + ylab("") + ggtitle("Two Parent Homes by Gender") +
guides(fill=guide_legend(title=NULL))
C. The above shows the distribution of students with one or two parents, divided into
gender.
ggplot(kirsub, aes(x=CON8,fill=twoparent)) + geom_bar(aes(fill=twoparent),
position="dodge") + scale_fill_brewer(palette="Set2")+ xlab("Plans for
College?") + ylab("") + ggtitle("College Plans by Two Parent Home") +
guides(fill=guide_legend(title=NULL))
D. The bar graph shows student goals after highschool, for both one parent and twoparents.
ggplot(kirsub, aes(x=GENDER, fill=twoparent)) + geom_bar(aes(fill=twoparent),
position="dodge") + facet_wrap(~CON8, ncol=2) +
scale_fill_brewer(palette="Set1") + scale_fill_brewer(palette="Set2")+
xlab("") + ylab("") + ggtitle("College Plans by Gender and Two Parent Home")
+ guides(fill=guide_legend(title=NULL))
## Scale for 'fill' is already present. Adding another scale for 'fill',
## which will replace the existing scale.
E. The bar charts show how students goals after highschool, are grouped by gender, and
split by the number of parents the student has.
ggplot(kirsub, aes(x=RHC_UNW)) + geom_density(color="blue") +
geom_histogram(aes(y=..density..), color="black", fill=NA, binwidth=.1) +
scale_fill_brewer(palette="Set2") + xlab("Average Score") + ylab("Density") +
ggtitle("Self-efficacy to seek reproductive health care")
F. The above histogram with overlaying density shows the distribution of students who
have the know how to revcieve the reproductive health care they desire.
ggplot(kirsub, aes(RHC_UNW, color=twoparent)) + geom_density() +
xlab("Average Score") + ylab("Density") + ggtitle("Self-efficacy to seek
reproductive health care with Two Parents") +
guides(color=guide_legend(title=NULL))
G. The overlaying densitys of students self-efficacy to recieve reproductive healthcare by
students having one or two parents.
ggplot(kirsub, aes(RHC_UNW, color=intervention)) + geom_density() +
xlab("Average Score") + ylab("Density") + ggtitle("Self-efficacy to seek
reproductive health care with Intervention") +
guides(color=guide_legend(title=NULL))
H.
The overlapping density plots above show the self-efficacy for students to recieve
reproductive healthcare. Each density plot relates to students who have had the
intervention to those without the intervention.
ggplot(kirsub, aes(x=twoparent, y=RHC_UNW, fill=twoparent)) + geom_boxplot()
+ geom_violin(alpha=.3) + scale_fill_brewer(palette="Pastel2") +
ylab("Average Score") + xlab("")+ ggtitle("Self-efficacy to seek reproductive
health care with Two Parents") + theme(legend.position="none")
I. The side-by-side boxplots show the means and IQR values for both students self-efficacy
to recieve reproductive healthcare, compared to the number of parents for each student.
ggplot(kirsub, aes(x=intervention, y=RHC_UNW, fill=intervention)) +
geom_boxplot() + geom_violin(alpha=.3) + scale_fill_brewer(palette="Pastel1")
+ ylab("Average Score") + xlab("")+ ggtitle("Self-efficacy to seek
reproductive health care with Intervention") + theme(legend.position="none")
J. The side-by-side boxplot shows the students self-efficacy for recieving reproductive
health care. This graph compares the students with the intervention to the students
without the intervention.
ggplot(kirsub, aes(x=CON8, fill=intervention)) +
geom_bar(aes(fill=intervention), position="dodge") + facet_wrap(~GENDER,
ncol=2) + scale_fill_brewer(palette="Accent") + xlab("Plans for College?") +
ylab("") + ggtitle("College Plans by Gender and Intervention") +
guides(fill=guide_legend(title=NULL))
K. The above bar chart identifies the which students have goals after highschool, comparing
both males and females in seperate tiles. and within those tiles the goals are divided into
those that have had the intervention and those without the intervention.
plot1 <- ggplot(kirsub, aes(RHC_UNW, color=twoparent)) + geom_density() +
xlab("Average Score") + ylab("Density") + ggtitle("Side by Side Above
Graphs") + guides(color=guide_legend(title=NULL))
plot2 <- ggplot(kirsub, aes(RHC_UNW, color=intervention)) + geom_density() +
xlab("Average Score") + ylab("Density") + ggtitle("") +
guides(color=guide_legend(title=NULL))
multiplot(plot1, plot2, cols=2)
L. The graph above shows the overlapping densities of the students self_efficacy to recieve
reproductive health care. The first tile shows overlapping densities for students with either
one or two parents. the second tile shows students with and without the intervention.
plot1 <- ggplot(kirsub, aes(x=twoparent, y=RHC_UNW, fill=twoparent)) +
geom_boxplot() + geom_violin(alpha=.3) + scale_fill_brewer(palette="Pastel2")
+ ylab("Average Score") + xlab("")+ ggtitle("Side by Side of Above Plots") +
theme(legend.position="none")
plot2 <- ggplot(kirsub, aes(x=intervention, y=RHC_UNW, fill=intervention)) +
geom_boxplot() + geom_violin(alpha=.3) + scale_fill_brewer(palette="Pastel1")
+ ylab("") + xlab("")+ ggtitle("") + theme(legend.position="none")
multiplot(plot1, plot2, cols=2)
Conclusions
Using summary statistics and visual data we wanted see there is a higher tendency for
students who have used the intervention to also receive reproductive health care. when
comparing the students by gender to see their goals after highschool(B), there is no real
difference between the two. When comparing students students goals by the students who
have one parent versus two parents there was no distinguishing differnces supporting the
grant hypothesis. Looking at the data (J,K,L,M,N) there is no trend showing signs for the
effectiveness of the intervention.