Question: I need help in R code (in Rstudio) for my homework and was wondering if I could get help. Individual Assignment 2 1. Logistic Regression

 I need help in R code (in Rstudio) for my homework

I need help in R code (in Rstudio) for my homework and was wondering if I could get help.

and was wondering if I could get help. Individual Assignment 2 1.

Individual Assignment 2 1. Logistic Regression A company that manufactures riding mowers wants to identify the best sales prospects for an intensive sales campaign. In particular, the manufacturer is interested in classifying households as prospective owners or non-owners on the basis of Income (in $1000s) and Lot Size (in 1000 ft2). The marketing expert looked at a random sample of 24 households, given in the file RidingMowers.csv. Use all the data to fit a logistic regression of ownership on the two predictors. (No need to do data partition) a) What percentage of households in the study were owners of a riding mower? b) Create a scatter plot of Income versus Lot Size using color or symbol to distinguish owners from non-owners. From the scatter plot, which class seems to have a higher average income, owners or non-owners? c) Among non-owners, what is the percentage of households classified correctly? d) To increase the percentage of correctly classified non-owners, should the cutoff probability be increased or decreased? e) What are the odds that a household with a $60K income and a lot size of 20,000ft2 is an owner? f) What is the classification of a household with a $60K income and a lot size of 20,000 ft2? Use cutoff=0.5. g) What is the minimum income that a household with 16,000 ft2 lot size should have before it is classified as an owner? 2. Classification Tree The file eBayAuctions.csv contains information on 1972 auctions that transacted on eBay.com during May-June 2004. The goal is to use these data to build a model that will classify auctions as competitive or noncompetitive. A competitive auction is defined as an auction with at least two bids placed on the item auctioned. The data include variables that describe the item (auction category), the seller (his/her eBay rating), and the auction terms that the seller selected (auction duration, opening price, currency, day-of-week of auction close). In addition, we have the price at which the auction closed. The task is to predict whether or not the auction will be competitive. First, convert categorical variable Duration into dummy variables (Base category Duration=1). Then, Partition the data into training (60%) and validation (40%) sets (use set.seed(12345) in R) Then do the following analysis: a) Fit a classification tree using all predictors, using the best-pruned tree. To avoid overfitting, set the minimum number of records in a terminal node to 50 (in R: minbucket = 50). Also, set the maximum number of levels to be displayed at seven (in R: maxdepth = 7). Write down the results in terms of rules. (Note: If you had to slightly reduce the number of predictors due to software limitations, or for clarity of presentation, which would be a good variable to choose?) b) Examine the confusion matrix for the tree. What can you say about the predictive performance of this model? c) Based on this tree, what can you conclude from these data about the chances of an auction obtaining at least two bids and its relationship to the auction settings set by the seller (duration, opening price, ending day, currency)? What would you recommend for a seller as the strategy that will most likely lead to a competitive auction? Submission You can use this WORD file as an answer sheet to answer each of the questions from the next page. (Copy the questions and supply your answer below each question, if you need to attach pictures, attach it below each question too. DO NOT copy your R code to the answer sheet, I only need to see your answer to the question.) Your assignment should be submitted on coursesite under Individual Assignment 1. Your submission should contain: 1. A WORD document which provides the answers to the problem questions; 2. R script that contain the detailed analyses/code (R script is always saved as \"Filename.R\") 3. ALL files should be named: {LastName}{first 2 letters of FirstName}-A{AssignmentNumber}.doc For example: SunHA-A1.doc 4. R script should be named similarly: {LastName}{first 2 letters of FirstName}-A{AssignmentNumber}.R For example: SunHA-A1.R

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The question is complete Heres a stepbystep gu... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!