The response is the length of odontoblasts (cells responsible for tooth growth) in 60 guinea pigs. Each animal received one of three dose levels of vitamin C (0.5, 1, and 2 mg/day) by one of two delivery methods, orange juice or ascorbic acid (a form of vitamin C and coded as VC). The dataset used for this homework is ToothGrowth from packagedatasets.
data("ToothGrowth", package = "datasets")
This data has 60 rows and 3 columns. So, the dimension is 60, 3. This is where I put inline code.
The three variables are:
The code below lists the first 5 observation of the data.
head(ToothGrowth)
## len supp dose
## 1 4.2 VC 0.5
## 2 11.5 VC 0.5
## 3 7.3 VC 0.5
## 4 5.8 VC 0.5
## 5 6.4 VC 0.5
## 6 10.0 VC 0.5
summary(ToothGrowth)
## len supp dose
## Min. : 4.20 OJ:30 Min. :0.500
## 1st Qu.:13.07 VC:30 1st Qu.:0.500
## Median :19.25 Median :1.000
## Mean :18.81 Mean :1.167
## 3rd Qu.:25.27 3rd Qu.:2.000
## Max. :33.90 Max. :2.000
The mean length is 18.8133333 and the mean dose is 1.1666667. The two supp categories are OJ & VC.
boxplot(len~supp*dose, data=ToothGrowth, col=(c("red", "green")), main= "Box Plot of Tooth Growth" , xlab="Doses by Supplement", ylab="Tooth Growth")