Question: Instructions Below is code excerpted from the script file I used during the recorded Main Class video, edited to reflect a different problem. In





Instructions Below is code excerpted from the script file I used during the recorded "Main Class" video, edited to reflect a different problem. In this exercise you will be modeling whether or not respondents purchased a brand of cereal. The variables are Bought (0=no, 1=yes), Income (in tens of thousands of dollars), Children (under 18 in the home, Yes or No), ViewAd (did the respondent see the ad for the brand, Yes or No), and Age (years). The data file is located on the Module 9: Class Session Agenda and Prep page (Cereal Purchase.xlsx) Within the code below are comments in all capital letters that are the questions you are to answer (the questions are also in the questions that follow here on Canvas). #logistic Regression assignment #Install packages if needed install.packages("readxl") install.packages("ggplotgui") install.packages("ggplot2") install.packages("shiny") install.packages("Imtest") install.packages("aod") install.packages("PROC") install.packages("psych") #load packages if needed library(readxl) library(ggplotgui) library(ggplot2) library(shiny) library(Imtest) library(aod) library(PROC) install.packages("psych") #get data Cereal Purchase #WHAT DO THE RESULTS TELL YOU? #now run a mixed step-wise analysis to develop a more parsimonious model #mixed step-wise regression #define intercept-only model intercept_only #CONVERT THE ESTIMATE TO ODDS #CONVERT THE ESTIMATE TO PROBABILITY #DO YOU PREDICT THAT THIS PERSON WOULD BUY THE CEREAL? YES/NO #how well does the model perform? #Estimated Probability of prob sleeping Cereal Purchase $Buy #range odds min(Cereal Purchase$Age) max(CerealPurchase$Age) IMinAge 1 2 points WHAT DO THE RESULTS TELL YOU? In the "all-in" model (with all the IVs entered together), is the model overall significant? Which IVs are significant? 2 5 points B I U A ATx = = = , E 12pt Paragraph #WHAT IVS ARE SIGNIFICANT FROM THE MIXED STEP-WISE MODEL? #HOW DO YOU EXPLAIN ANY DIFFERENCES BETWEEN THE "ALL-IN" AND MIXED STEP-WISE MODELS 3 3 points BIU AA x = = = EE 12pt #WHAT DO THE UNIT ODDS RATIOS MEAN? In other words, how do you interpret them? 4 5 points Paragraph BIU A AT = = = xx, E 12pt Paragraph #WRITE THE CODE TO CONVERT THOSE UNIT ODDS RATIOS TO PROBABILITIES BI U A A T = = = , EE 12pt Paragraph fx fx QQ 5 3 points #CONVERT THE ESTIMATE TO ODDS #CONVERT THE ESTIMATE TO PROBABILITY #DO YOU PREDICT THAT THIS PERSON WOULD BUY THE CEREAL? YES/NO What are this persons odds? What is their probability of buying the cereal? Do you predict they will buy the cereal? 6 3 points B I U A A Tx EE 12pt #WHAT IS THE PERCENT IMPROVEMENT FOR THIS MODEL? IS THAT GOOD OR BAD? 7 3 points B I U A Ax #IS THIS KAPPA GOOD OR BAD? 8 1 point Paragraph fx x EE 12pt Paragraph fx B I U AA x = = = x EE 12pt Paragraph fx #WHAT DOES THE RANGE ODDS REPRESENT FOR EACH VARIABLE? In other word, state in words what the Range Odd Ratios mean. B I U A A Ix x E E 12pt Paragraph fx B 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
