Question: MIS-655 Methods for Nonlinear Data in R Directions: Use the information below to complete this assignment. Part I: Logistic Regression For this assignment, utilize the


MIS-655 Methods for Nonlinear Data in R Directions: Use the information below to complete this assignment. Part I: Logistic Regression For this assignment, utilize the 'diamonds' dataset in the library \"ggplot2.\" You will need to install and load the library into your R environment to access the dataset. 1. Load the \"ggplot2\" library into your R environment. Load the \"diamonds\" dataset into a new object called \"ddat\" for ptuposes of working through this assignment. Use the appropriate R fLuictions to check that the data has loaded correctly (The dimensions of the dataset should be 53,940 observations of 10 variables). Use the View function to view the data in your R console and include a screenshot to Show that the data loaded appropriately. 2. Create a new variable in the dataset called \"luxury\" that assigns a value of 1 to any diamonds with a selling price $10,000 or greater, and a 0 otherwise. Use the table function in R to check that the luxury variable has 5,223 observations coded as a 1. 3. Fit a logistic regression with the \"luxm'y\" variable as the dependent variable and the \"carat\" variable as the independent variable and save the results in an object called \"modl.\" Use the summary function to show the regression output. Is carat size significantly related to the probability that the diamond will sell for $10,000 or more? Explain your interpretation of the regression output and specifically how carat size affects probability of a diamond having a sales price greater than $10,000. (Hint: Men fitu'ng your regression model, you'll need to use the function glm and specify the argument family=bin0mial in order to produce a logistic regression)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
