Create dummy variables for the categorical variables


The dataset ToyotaCorolla.xlsx contains data on used cars for sale during the late summer of 2004 in The Netherlands. It has 1436 records containing details on 38 attributes, including Price, Age, Kilometers, HP, and other specifications. The goal is to predict the price of a used Toyota Corolla based on its specifications.

a. Create dummy variables for the categorical variables Fuel_Type and Color.

a. Split the data into Training (50%), Validation (30%), and Test (20%) datasets.

a. Run a regression tree (RT) using the Prediction menu in XLMiner with the Output variable Price and the input variables: AGE_08_04, KM, Fuel_Type, HP, Automatic, Doors, Quarterly_Tax, Mfg_Guarantee, Guarantee_Period, Airco, Automatic_Airco, CD_Player, Powered_Windows, Sport_Model, and Tow_Bar. Keep the minimum number of records in a terminal node to 1, maximum number of tree levels to 100, and the scoring option to Full Tree, to make the run least restrictive.

i. Which appear to be the three or four most important car specifications for predicting the car’s price?

b. Let us see the effect of turning the price variable into a categorical variable. First, create a new variable that categorizes Price into 20 bins. Use Transform -> Bin continuous data to categorize Price into 20 bins of equal counts (leave all other options at their default). Next, repartition the data keeping Binned_Price instead of Price. Run a Classification Tree (CT) using the Classification menu of XLMiner with the same set of input variables as in the RT from above, and with Binned_Price as the output variable. Keep the minimum number of records in a terminal node to 1 and uncheck the Prune Tree option, to make the run least restrictive.

i. Compare the tree generated by the CT with the one generated by the RT. Are they different? Explain why or why not.

Request for Solution File

Ask an Expert for Answer!!
Financial Management: Create dummy variables for the categorical variables
Reference No:- TGS02711701

Expected delivery within 24 Hours