Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 . Load the R data LifeCycleSavings, from the datasets package, in your R session. Marks ( 1 ) 2 . Use the values of

1. Load the R data LifeCycleSavings, from the datasets package, in your R session.
Marks (1)
2. Use the values of the variable pop15 and ddpi to create two new categorical variables named Pop15Cat and ddpiCat, respectively, each with three categories, High(top 25%),Medium( middle 50%) and low(bottom 25%). Show your codes.
1. Hint: To do this, you must find a function to obtain the required cut-off points and then another function to implement the binning of the variables. Marks (4)
3. Count (frequency of) cases within each new categorical variable. Show codes and output. Marks (2)
4. Use a visualization tool to display the relationship between the variables,
sr and Pop15Cat, stratified by ddpiCat, on a single plot.
Comment on the plot do you observe any relationship between the three variables?
You must use ggplot2 for visualization. Wherever applicable, your plots must have proper labelling and legends. Marks (5)
please provide me code and explaination.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

ISBN: 1801072248, 978-1801072243

More Books

Students also viewed these Databases questions

Question

=+a) Show that mixing implies ergodicity.

Answered: 1 week ago