代做STATS 779: Professional Skills for Statisticians 2020代写留学生R语言
- 首页 >> Java编程Department of Statistics
STATS 779:
Professional Skills for Statisticians
Final Test: June 11 2020 (1 PM) – June 12 2020 (1 PM)
GENERAL INSTRUCTIONS
* Total marks = 75.
* Attempt all questions.
* You have 24 hours to complete this test; however, the test is designed to be finished within 2 hours. Partial credit will be given. If you choose to spend more than two hours, please consider how many extra marks the additional time is likely to gain. While in some professional contexts it may be necessary to spend several hours trying to fix a small mistake, it is probably not worthwhile on this assessment.
* By submitting your test answers you are declaring that the test is your own work. This means that for the 24-hour duration of the test, you confirm that you will not discuss the content of the test with anyone else, you will not give any assistance to another student taking this test and you will not receive any assistance from any person or tutoring service.
* If there is evidence you have copied your answers you will get zero marks.
SUBMISSION INSTRUCTIONS
There are 2 separate upload links, one for Question 1, and one for Question 2. Note that both questions have two versions, and the version you choose depends on different digits of your UPI (the last digit for Q1, the second to last digit for Q2). Thus there are four possible versions of the test.
* For question 1, you should submit both the .tex and the generated .pdf files.
* Place .tex, .pdf files in a zip file entitled final-test1YourUPI.zip and submit the zip file on Canvas under “Final Test-Q1”.
* For question 2, you should submit both the .Rmd and the generated .html files.
* Place .Rmd, .html files in a zip file entitled final-test2YourUPI.zip and submit the zip file on Canvas under “Final Test-Q2”.
1 If the last digit of your UPI is even, reproduce stationary.pdf. Submit your versions of stationary.tex and stationary.pdf as your answer to this question.
If the last digit of your UPI is odd, reproduce spectral.pdf. Submit your versions of spectral.tex and spectral.pdf as your answer to this question.
Additional instructions for reproducing stationary.pdf
a To create an environment to typeset propositions, you may have to use the general syntax:
\newtheorem{envname}{caption} in the preamble.
envname: environment name that the author would like to use for this element.
caption: heading text.
b Use the proof environment in the amsthm package to typeset proofs.
c The bibliography entry should be in the same stationary.tex file.
Additional instructions for reproducing spectral.pdf
a Use framed environment in the framed package to draw the box.
b Add the following line to the preamble:
\newcommand{\eqnum}{\hfill\refstepcounter{equation}\textup{(\theequation)}}
to use the \eqnum command at the end of each item description to add equation numbers.
c Use the proof environment in the amsthm package to typeset proofs.
d The bibliography entry should be in the same spectral.tex file. (35 marks)
2 If the second-to-last digit of you UPI is even, you will work with file “ozdat1.csv”. If the second-to-last digit of you UPI is odd, you will work with the file “ozdat2.csv”. Both files contain daily measurements of ozone data from four cities in the midwest. The measurements are in parts per billion, and are an average over the 9 AM–4 PM period when ozone tends to be highest. The days are consecutive days in the summer of 1987, and are numbered 1–89. A separate column indicates whether the measurement was a weekday (M–F) or a weekend (S–S). You are to create a file in R markdown with the following features (each item is worth 10 marks):
a Each of the following features should be in its own numbered section (three in total), using automatic numbering functionality. The title of the document should be in italics, and should be followed by your name and the date. All code, messages, and unformatted output should be hidden.
b A plot of the ozone measurements using facetting to create a separate panel for each city, in a 2×2 array. Use color AND shape to indicate weekend vs weekday. The y-axis should be labeled “Ozone in parts per billion”, and the x-axis should be “Day”. A loess smooth should be added to each plot. The legend should be titled “Day of Week”. The Figure should have a caption and be able to be referred to in the text (this will be necessary in part d).
c A table that contains the maximum ozone measurement for each city. This table should be constructed using code that produces the relevant values (i.e. if the data changed, the table could be reproduced automatically). The table should have a short caption/title that describes its contents, and suitable column headings.
d A section with two brief sentences: “Figure [number inserted using automatic referencing] shows the pattern of surface ozone over the course of the summer for four cities. The minimum ozone reading over all cities and all days was [number produced by appropriate code, including rounding], observed in [name of appropriate city extracted by code] on day [number extracted by code]”. (Hint: function which.min may be helpful.)