美文网首页
讲解:Statistics 3022、data、R、RWeb|D

讲解:Statistics 3022、data、R、RWeb|D

作者: hanguafang | 来源:发表于2019-12-29 13:00 被阅读0次

Statistics 3022 Fall 2018ANOVA projectDue: Wednesday, November 21st at 5:00 pmFor this project, you will need the data set MentalHealth in the Stat2Data package. This dataset is from a study of the phases of the moon (before the full moon, during the full moon, andafter 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-WayANOVAs. 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) & 3months of summer (June, July, and August)o For Lab Sec 003: 3 months of winter (December, January, and February) & 3months of spring (March, April, and May).o For Lab Sec 005: 3 months of winter (December, January, and February) & 3months of fall (September, October, and November).o For Lab Sec 006: 3 months of spring (March, April, and May) & 3 months offall (September, October, and November).• You will need to create a new variable, season, which contains the names of the twoseasons. (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 forthe differentphases 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’sfine. 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 MOREhospital admissions.(1 point: If you found a difference, you should discussStatistics 3022作业代做、代写data留学生作业、R编程设计作业调试、R语言作业代做 代写Web开发|代写 which phase had.If you did not find a significant difference in your conclusion, you should NOT doTukey’s HSD.)Model 2: Perform a Two-Way ANOVA to control for the month of the year.(1 point for creating the modelNote: As we did not learn a non-parametric method for data with two predictors, you maypresume that the data satisfies the ANOVA assumptions and use the regular Two-WayANOVA.)Can you include an interaction term? Why or why not?(2 points: 1 point for decision1 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 tosee if you need an interaction.(2 points for either: a) creating the model with interaction and using the test in the interactionline of the ANOVA output to determine if an interaction is needed or not OR b) creating boththe 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 hospitaladmissions 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 hasthe highest hospital admissions)1 point for providing evidence in terms of an interaction plot or Tukey’s HSDconfidence intervals.)Turn in on Moodle:1. Your R Markdown report in .pdf form2. 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, orparagraphs to examples or to another student’s will be considered academic misconduct.Turn in to Moodle by 5 pm on Wednesday, November 21st. No paper copies will beaccepted.转自:http://www.6daixie.com/contents/18/4558.html

相关文章

网友评论

      本文标题:讲解:Statistics 3022、data、R、RWeb|D

      本文链接:https://www.haomeiwen.com/subject/ljeyoctx.html