Define and identify clearly all variables you use. A numerical answer with no work shown, will earn a score of zero.
Format for R part of homework:
Number the items in your homework paper to show which questions you are answering. Show the R commands that produce the relevant output. Make sure you have the right commands associated with the output you report. There are examples of how to do this in the lecture notes. Regarding the presentation, the basic requirements are clarity, neatness, and space efficiency. One common way to show more clearly which lines are code and which are output, is to use a different font for the two parts. You can also cut-and-paste code and output from the console, where commands start with the greater-than symbol, which distinguishes them from the output, e.g.
> x <- - 1:3
> mean (x)
Be attentive to the sizing and spacing of plots. If plots are too big, your paper becomes more difficult to read. There are almost no instances in the course where you should use an entire page for a single graph. However, graphs must be big enough to be legible. Points will be taken off for low-resolution graphics, for missing titles, missing or bad x-labels, missing or bad y-labels
soft_drink <- read.table("CH16PR12.txt", header=FALSE, col.names = c("days", "agent", "transaction"))
soft_drink$agent <- as.factor(soft_drink$agent)
# 'data.frame': 100 obs. of 3 variables:
# $ days : num 24 24 29 20 21 25 28 27 23 21 ...
# $ agent : int 1 1 1 1 1 1 1 1 1 1 ...
# $ transaction: int 1 2 3 4 5 6 7 8 9 10 ...
fit <- aov(days ~ agent, data=soft_drink)
qqPlot(fit, main="QQ Plot")
By purchasing this solution you'll be able to access the following files: