economics question and need the explanation and answer to help me learn.
Carleton University Department of Economics ECON 3880, Summer 2023 Assignment 2 Due date: 30 May 2023, 11:59 pm Professor: Firouz Fallahi Instruction: Download and read the data set called insurance.csv into R and assign it to df. This data shows personal information and medical insurance cost charged for several individuals and has been used in Machine Learning with R by Brett Lantz. Please use an R Notebook to answer the following questions and submit the HTML file through Brightspace. Q1. Use sex and region to create a count plot. Which region has the highest number of observations? Q2. Does the link between bmi and charges vary based on smoker? a) Create a point plot between the bmi and charges and color them based on smoker. b) Next, add 2 linear trend lines to the plot using geom_smooth based on smoker. c) Change the axes names to Body Mass Index and Dollar Charged. d) Add a title to the graph to read The link between BMI and Charges: Smokers and non-smokers. e) What do you conclude based on this graph? Q3. Create a stacked bar chart for each region and fill the bars based on smoker. Next flip the coordinates (axes) and also change the theme of the graph to minimal. Add the count of the observations to each bar and adjust them to see each number in the correct position (note that we should see 8 numbers in the graph!). Next, instead of letting R choose the colors for the bars, use the function scale_fill_brewer() and a palette called “Dark2” to change the color of the bars. Q4. Using the Plotly package in R, create an interactive chart that shows the scatter plot between bmi (in the horizontal axis), charges (in the vertical axis), and color the dots based on region. Good Luck!
We are a professional custom writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework.
Yes. We have posted over our previous orders to display our experience. Since we have done this question before, we can also do it for you. To make sure we do it perfectly, please fill our Order Form. Filling the order form correctly will assist our team in referencing, specifications and future communication.
1. Click on the “Place order tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
2. Fill in your paper’s requirements in the "PAPER INFORMATION" section and click “PRICE CALCULATION” at the bottom to calculate your order price.
3. Fill in your paper’s academic level, deadline and the required number of pages from the drop-down menus.
4. Click “FINAL STEP” to enter your registration details and get an account with us for record keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
5. From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.
Need this assignment or any other paper?
Click here and claim 25% off
Discount code SAVE25