QuestionQuestion

Transcribed TextTranscribed Text

Use R for Q1-Q3 1. Use R to randomly assign 10 experimental units to each of three treatments (1, 2. and 3). Then simulate responses for the 30 experimental units satisfying the one-way ANOVA model: v f 1,2, 7, Git vid N(0,²) with u = 4.7, o2 = 4, and treatment effects T1 = -3, 72 = 5, and 73 = -2. Your solution should include your R code and a plot of the simulated values. 2. Consider the situation in Problem 1. The experimenter wants to consider a reduced model where T1 = T2 = 73 = 0. Simulate responses for the 30 experimental units satisfying this reduced model. Compare boxplots of simulated responses under this reduced model with boxplots of simulated responses under the full model described in Problem 1 (where there are differences in the treatment effects). 3. Now explore what happens to data simulated from the model in Problem 1 when the error variance increases. Try multiple values for o2 and find a value of o2 for which you cannot see any noticable difference in the boxplota of response values from the three treatments. 4. Under the model in Problem 1, what is the distribution of Y23, the response from the 3rd experimental unit to receive treatment 2? 5. Under the model in Problem 1, what is the distribution of = Y22? 6. Under the model in Problem 1, what is the distribution of the difference between an experimental unit receiving treatment 1 and an experimental unit receiving treatment 2? 6

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.

## Question 1

```{r}
treatments.not.random <- c(rep(1,10), rep(2, 10), rep(3, 10))

treatment = sample(treatments.not.random)
n = length(treatment)
Exp.Unit = 1:n
CRD.table = data.frame(Exp.Unit, treatment, row.names = NULL)
CRD.table
mu = 4.7
s2 = 4
tau.1 = -3
tau.2 = 5
tau.3 = -2
means = rep(NA, n)
means[treatment == 1] = mu + tau.1
means[treatment == 2] = mu + tau.2
means[treatment == 3] = mu + tau.3
Y.sim = means + rnorm(n, mean = 0, sd = sqrt(s2))
SimData = data.frame(Exp.Unit, treatment, Y.sim)
SimData
boxplot(Y.sim ~ treatment, main = "Boxplot of Simulated ANOVA Data")
```...

By purchasing this solution you'll be able to access the following files:
Solution.docx and Solution.Rmd.

$35.00
for this solution

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.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
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