Answered step by step
Verified Expert Solution
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
Load the R data LifeCycleSavings, from the datasets package, in your R session.
Marks
Use the values of the variable pop and ddpi to create two new categorical variables named PopCat and ddpiCat, respectively, each with three categories, Hightop Medium middle and lowbottom Show your codes.
Hint: To do this, you must find a function to obtain the required cutoff points and then another function to implement the binning of the variables. Marks
Count frequency of cases within each new categorical variable. Show codes and output. Marks
Use a visualization tool to display the relationship between the variables,
sr and PopCat, stratified by ddpiCat, on a single plot.
Comment on the plot do you observe any relationship between the three variables?
You must use ggplot for visualization. Wherever applicable, your plots must have proper labelling and legends. Marks
please provide me code and explaination.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started