Generate scatter plot of age vs charges in database

Assignment Help Database Management System
Reference no: EM131477655

Visualizing the heart attack dataset-II - The ggplot2 approach

Create a 5 by 5 matrix with a sequence of 1 to 5 for the diagonal and zero everywhere else.

some_matrix <- matrix(0,5,5) #create matrix of zeroes

diag(some_matrix) <- seq(1,5,1) #change the diagonal of the matrix

some_matrix

> some_matrix

[,1] [,2] [,3] [,4] [,5]

[1,] 1 0 0 0 0

[2,] 0 2 0 0 0

[3,] 0 0 3 0 0

[4,] 0 0 0 4 0

[5,] 0 0 0 0 5

Here your displaying out put in a way it make sense also the codes used in sequence and on what each code line is for....

Visualizing the heart attack dataset-II

We continue to investigate the heart attack dataset. First, let's read the data in again and change several variables to factors. Note that you must set the working directory to where the data file is stored on your computer. I encourage you to define a project associated with a folder.

Challenge 1: Use ggplot2 to generate a scatter plot of age vs. charges in the heart attack dataset. Use different shapes of data points to represent DRG and color-code data points based on diagnosis.

Challenge 2: Create density plots like Figure 5 to compare the distribution of length of hospital stay (LOS) for patients with different DRG groups, separately for men and women. Offer interpretation in the context of the dataset. Limit the x-axis to 0 to 20.

Challenge 3: Generate a violin plot like Figure 6C to compare the distribution of length of hospital stay among patients with different prognosis outcomes (DRG), separately for men and women. Interpret your result. Note the axes labels are customized.

Challenge 4: Generate Figure 9 and offer your interpretation. Hint: Modify both the summarizing script and the plotting script.

Attachment:- Assignment File.rar

Reference no: EM131477655

Questions Cloud

Define methods for evaluating mutually exclusive projects : Which DCF technique, NPV, PI, IRR or MIRR, is theoretically superior when evaluating mutually exclusive projects of differing size or differing cash flow.
Review the code of ethics : Review the code of ethics of the Institute of Electrical and Electronics Engineer (IEEE) and National Society of Professional Engineers (NSPE).
Review the critical points for the passing of risk of loss : Review the critical points for the passing of risk of loss from buyer to seller in the transportation and delivery process.
What is network segmenting : Compare and contrast symmetric and asymmetric key cryptography with examples - What is network segmenting?
Generate scatter plot of age vs charges in database : Use ggplot2 to generate a scatter plot of age vs. charges in the heart attack dataset. Create a 5 by 5 matrix with a sequence of 1 to 5 for the diagonal
Differentiate between eaa and eac : If two mutually exclusive projects with unequal lives have equal NPVs, which project will have the higher equivalent annual annuity? Why?
On what basis will each country be able to impose taxes : On what specific income will each country be able to impose taxes? On what basis will each country be able to impose taxes?
What memories stand out for you : Think about your memories of being "different" from others (as a small child, in grade school, as an adolescent, as a young adult).
Evaluate leadership decision-making strategies : You will demonstrate your mastery. Evaluate leadership decision-making strategies for their effectiveness on the achievement of organizational goals.

Reviews

len1477655

4/28/2017 7:10:13 AM

Deadline must be met with organized solutions and full report. 4 challenges & few activities all needs to be Addressed in clear and organized way in to a Word report. All challenges and activities must be reported as per The instructions mentioned no overlapping legends for Figures the title, and both the axisis needs to be Appropriately labelled and readable don’t miss error Bars where required. Assignment require some basic formatting. Formatting does carry points if any small detail Such as peoper organizing as explained below if Missed in your report half points will be cut down Since its easy assignment. For each challenge and Activity in the report I would like the code you. Used plus annotations for the code and a brief Explanation on what the code does following a #tag (a basic explanation for steps).

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd