Describing Univariate Distributions

villegas_castro

library(ggplot2);library(descr);library(knitr)
load("~/Math 315/Projects/addhealth_clean2.Rdata")

Intro

Write a short summary paragraph as an intro letting the reader know what what variables you are exploring.

library(ggplot2);library(descr);library(knitr);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

data.plot.CHECK321<-na.omit(mydata[,c( "CHECK321")])
levels(data.plot.CHECK321)<-c("No", "Yes")
ggplot(mydata=data.plot.CHECK321) + geom_bar(aes(x=data.plot.CHECK321))+xlab("Have you smoked within a year?")+ylab("Count")

Description: This graph shows results of asking the question of whether participants have smoked within a year. The graph indicated that responses were answered closely within each others range. There is no skewed here. The graph displays a symmetric distribution between the responses.

library(ggplot2);library(descr);library(knitr);library(dplyr)
data.plot.S3AQ1C<-na.omit(mydata[,c("S3AQ1C")])
levels(data.plot.S3AQ1C)<-c("Yes", "No")
ggplot(mydata=data.plot.S3AQ1C) + geom_bar(aes(x=data.plot.S3AQ1C))+xlab("EVER SMOKED A PIPE 50+ TIMES?")+ylab("Count")

Description: This graph shows results for asking participants if they have ever smoked a pipe 50 times or more. The graph shows a clear unimodal. Responses are coded as yes or no. Most participants indicated that they have no smoked 50 or more pipes.

library(ggplot2);library(descr);library(knitr);library(dplyr)
data.plot.S3AQ3B1<-na.omit(mydata[,c("S3AQ3B1")])
levels(data.plot.S3AQ3B1)<-c("1", "2", "3", "4", "5", "6")
ggplot(mydata=data.plot.S3AQ3B1) + geom_bar(aes(x=data.plot.S3AQ3B1))+xlab("USUAL FREQUENCY WHEN SMOKED CIGARETTES")+ylab("Count")

Description: This graph is a unimodal and skewed to the right showing the frequency when cigarettes smoked. There is not much a variety in this graph. The range is between 1 through 6 showing a variety.

library(ggplot2);library(descr);library(knitr);library(dplyr)
data.plot.S3BD5Q2C<-na.omit(mydata[,c("S3BD5Q2C")])
levels(data.plot.S3BD5Q2C)<-c("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11")
ggplot(mydata=data.plot.S3BD5Q2C) + geom_bar(aes(x=data.plot.S3BD5Q2C))+xlab("HOW OFTEN USED CANNABIS IN THE LAST 12 MONTHS")+ylab("Count")

Description: This graph shows participants response on how often they used cannabis in the last 12 months. The graph shows symmetric distribution. The midpoint is at 5 for this graph. The range of responses are from 1-10, being a fair amount of variability. There is no outliers.

save(mydata, file="~/Math 315/Projects/addhealth_clean3.html")