For discussion questions, write legibly or type in your own words; use correct syntax and complete sentences. For questions requiring problem-solving, calculations, or derivations, always show your work and explain your reasoning.

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)
[1] 2

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

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.


# 1.
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 ...

# 2.
fit <- aov(days ~ agent, data=soft_drink)

qqPlot(fit, main="QQ Plot")
residualPlot(fit, type="rstudent")...

By purchasing this solution you'll be able to access the following files:

for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Statistics-R Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats