Statistics 3022 Fall 2018


Statistics 3022 Fall 2018
ANOVA project
Due: Wednesday, November 21
st at 5:00 pm
For this project, you will need the data set MentalHealth in the Stat2Data package. This data
set is from a study of the phases of the moon (before the full moon, during the full moon, and
after the full moon) to see if there is a relationship between hospital admissions and moon phase.
The month of the year was also recorded to see if there were any seasonal effects.
You are expected to build three models for this project: a One-Way ANOVA and two Two-Way
ANOVAs. But before you can do that, you will need to subset and edit your data.
• This dataset is for all 12 months of the year. I would like you to focus on only six:
o For Lab Sec 002: 3 months of winter (December, January, and February) & 3
months of summer (June, July, and August)
o For Lab Sec 003: 3 months of winter (December, January, and February) & 3
months of spring (March, April, and May).
o For Lab Sec 005: 3 months of winter (December, January, and February) & 3
months of fall (September, October, and November).
o For Lab Sec 006: 3 months of spring (March, April, and May) & 3 months of
fall (September, October, and November).
• You will need to create a new variable, season, which contains the names of the two
seasons. (2 points: 1 for subsetting, 1 for season variable)
All analysis must be done on your subsetted data.
Model 1: Perform a One-Way ANOVA to see if there is a difference in hospital admissions for
the different
phases of the moon. Be sure to outline all steps.
(4 points: 1 point for choosing ANOVA or the Kruskall-Wallace test,
1 point for fitting the model in R,
1 point for doing diagnostics,
1 point for reaching conclusion – whether there is a difference or not.
If you start with ANOVA and switch to Kruskall-Wallace after checking assumptions, that’s
Statistics 3022作业代做、代写data留学生作业
fine. If you decide to remove an outlier, you need to prove it with the Cook’s Distance or the 1.5
× IQR test.)
If there is a difference, use Tukey’s HSD to figure out which phase(s) of the moon have MORE
hospital admissions.
(1 point: If you found a difference, you should discuss which phase had.
If you did not find a significant difference in your conclusion, you should NOT do
Tukey’s HSD.)
Model 2: Perform a Two-Way ANOVA to control for the month of the year.
(1 point for creating the model
Note: As we did not learn a non-parametric method for data with two predictors, you may
presume that the data satisfies the ANOVA assumptions and use the regular Two-Way
ANOVA.)
Can you include an interaction term? Why or why not?
(2 points: 1 point for decision
1 point for explanation)
For your model, explain how the month variable is functioning in your model.
(1 point for describing how “Month” works as the block in the model)
Model 3: Perform a Two-Way ANOVA to control for the season of the year. Perform a test to
see if you need an interaction.
(2 points for either: a) creating the model with interaction and using the test in the interaction
line of the ANOVA output to determine if an interaction is needed or not OR b) creating both
the additive and the interaction models and doing a nested F-test on them.)
For your final model, answer the following questions: Does the moon phase help predict hospital
admissions differently for different seasons? Why or why not?
(1 point for correctly interpreting the test – is an interaction term needed?)
Back up your claims with intervals or graphs.
(2 points: 1 point for addressing the final conclusions (which phase of moon and/or season has
the highest hospital admissions)
1 point for providing evidence in terms of an interaction plot or Tukey’s HSD
confidence intervals.)
Turn in on Moodle:
1. Your R Markdown report in .pdf form
2. Your .Rmd source file.
Make sure your name and lab section are part of the report and are in the title of the document.
You DO have to use R Markdown for your report, and you are expected to write a full report
(not just present R code).
The report must be your words and your analysis – similar phrasing, words, or
paragraphs to examples or to another student’s will be considered academic misconduct.
Turn in to Moodle by 5 pm on Wednesday, November 21
st. No paper copies will be
accepted.

因为专业,所以值得信赖。如有需要,请加QQ:99515681 或 微信:codehelp

上一篇:【IT笔试面试题整理】数组中出现次数超过一半的数字


下一篇:写作中的冠词