100% Guaranteed Results


ST661 – You will work in pairs (see attached lists). Solved
$ 24.99
Category:

Description

5/5 – (1 vote)

You should complete this assignment using Rmarkdown. Place the printed html file (with both names) in the box labelled ST661/ST663 in the ground floor of Logic house (under stairs). Also one person in each pair should upload the .Rmd file to Moodle.
1. Type in
library(ggplot2) library(MASS) head(Pima.tr)
This code loads the data set Pima.tr, and its help file. Use ggplot2 for all plots. Using this dataset:
(a) Make a scatterplot plot of bp versus npreg.
(b) Using the function cut_interval, construct a factor version of npreg with n=4 levels. Call this new variable npregf. Add this variable to dataset Pima.tr.
(c) Plot boxplots of bp for each npregf level.
(d) Make a scatterplot of glu versus age. Use colour to show variable type and add smooths for the two groups.
(e) Redo the previous plot, separating out the two types. (Colour is not now needed)
2. The Irish road safety authority recently produced a report with the graph below. Reconstruct it using ggplot. (Use google for help!)

3. The data Hep2012.csv contains data with the points athletes received from each event in the Heptathlon in the 2012 Olympics. Access the data with
hep <- read.csv(“Hep2012.csv”)
You might also find this ‘long’ version of the data useful:
library(tidyverse)
heplong <- gather(hep, key=Event, value=Points,-Athlete)
You should
(a) Pose a question relating to the data.
(b) Using ggplot, construct a visualisation which helps to answer this question.
(c) Answer your question, based on the visualisation.
(d) Explain why you selected this particular visualisation.
Your answer should fit on one page.

There are many ways to answer this. For example: What distinguishes the top athletes? Do they receive extremely high points for a few events or do they receive good points across the board?

Reviews

There are no reviews yet.

Be the first to review “ST661 – You will work in pairs (see attached lists). Solved”

Your email address will not be published. Required fields are marked *

Related products