-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGardasil.R
24 lines (16 loc) · 813 Bytes
/
Gardasil.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Uncomment and run this if you haven't already run this command in your R session
# library(epiDisplay)
## Read the data from a CSV file into the dataframe named gv
gv <- read.csv("GardasilVaccine.csv")
## Define three factor variables for categorical analysis
gv$Race <- factor(gv$Race,
levels=c(0, 1, 2, 3),
labels=c( 'White', 'Black', 'Hispanic', 'other/unknown'))
gv$Completed <- factor(gv$Completed,
levels=c(0, 1),
labels=c( 'No', 'Yes'))
gv$InsuranceType <- factor(gv$InsuranceType,
levels=c(0, 1, 2, 3),
labels=c('med asst', 'private', 'hospital', 'military'))
## Two-way analysis with Race as explanatory variable
## InsuranceType as explanatory variable