Regression Tree In this Critical Thinking Assignment, you will install R Markdown, explore and summarize a dataset as well as create a linear regression model. Your assignment submission will be an R


Regression Tree

In this Critical Thinking Assignment, you will install R Markdown, explore and summarize a dataset as well as create a linear regression model. Your assignment submission will be an R Markdown generated Word document. Install R Markdown. Create a new R Markdown file by performing the following steps.

  1. Open R Studio
  2. Select File | New | R Markdown
  3. Use Module 3 CT Option 2 as the Title
  4. Use your name as the Author
  5. Select the Word output format
  6. Delete all default content after the R Setup block of code, which is all content from line 12 through the end of the file

Explore Toyota Corolla used cars in the ToyotaCorolla.csv (Links to an external site.) file by performing the following steps.

  1. Apply what you learned in modules 1 and 2 about data exploration by selecting and running appropriate data exploration functions. Run at least five functions.
  2. For your assignment submission, copy your commands into your R Markdown file.
    1. Include R comments on all your code.
    2. Separate sections of R code by using appropriate R Markdown headings.
  3. Run a regression tree with the following characteristics.
    1. Outcome variable Price
    2. Predictors Age_08_04, KM, Fuel_Type, HP, Automatic, Doors, Quarterly_Tax, Mfr_Guarantee, Guarantee_Period, Airco, Automatic_Airco, CD_Player, Powered_Windows, Sport_Model, and Tow_Bar.
    3. Keep the minimum number of records in a terminal node to 1
    4. Keep the maximum number of tree levels to 30
    5. Keep cp = 0.001, to make the run least restrictive.
  4. For your assignment submission, copy your commands into your R Markdown file.
    1. Include R comments on all your code.
    2. Separate sections of R code by using appropriate R Markdown headings.
  5. Use the R Markdown Knit drop-down menu to select Knit to Word to create the Word document for your assignment submission.

Your assignment submission must be one Word document that meets the following requirements:

  • Is an R Markdown generated Word document containing all R code used in this assignment, appropriate R comments on code, and appropriate R Markdown headings.
  • Does not include a cover page.
  • Does not include an abstract.
  • Includes a one-page description of what you did and what you learned. Add this description to the end of the R Markdown document as a new page. This page must conform to APA guidelines