Assignments
Homework02b: (complete by Monday September 21, 2026)
Using the provided Quarto Project, rename the file lastname_firstname_Stat652_Homework02b.qmd using your own last name and first name in the filename.
You should plan to come to class on Monday next week to ask questions and you will have until Friday to turn in this homework through Canvas.
Upload two files to Canvas. Your self-contained: true .html and your .qmd files. DO NOT submit a .zip file
Read: mdsr2e Chapter 10, Chapter 11
Machine Learning with R, 4ed, Chapter 5, first half of Chapter 6. To access the book CSUEB Library Databases A-Z > Safari Books Online, register and access the book
To access the book CSUEB Library Databases A-Z > Safari Books Online, register and access the book
Problems:
11.7 Exercises: Problem 6b, Run Models 1. Null Model, 2. Multiple Linear Regression, 3. Decision Tree, using CART, from the R package rpart, using training and test datasets, as described in part c of the problem.
Hints: For Problems 6b, explore the dataset before attempting to fit the models. You will need to deal with the missing values before applying some or all of the models. Which models do not work with missing data?
Quiz: (due in Canvas by Friday September 18, 2026)
Instruction: For problem 1 you can complete the questions in an Excel Spreadsheet or in and R Quarto Notebook. For problem 2 run the provided R Quarto Notebook answering the questions asked. Submit either a .xlsx file for problem 1 and both a .qmd and .html file for problem 2. Or submit both a .qmd and .html files containing your code, output, and answers for both problems.
Use the following Quarto Notebook to answer the questions in the quiz. Download this .qmd file into a new R Project directory that you create on your computer. lastname_firstname_Stat652_Quiz01.qmd
Before submitting your files in Canvas evaluate your files using an AI such as ChatGPT, Copilot or Gemini to evaluate if you have followed the guidelines. Here is a suggested prompt to use after uploading the guidelines.qmd file to the AI and your .qmd and .html file for the assignment.
Prompt: “Please review my homework that is in the .html and .qmd files. Please compare these files to the guidelines provide in the guidelines.qmd file. Please score each part of each requirement on a 5 point scale. Please provide summary of the completeness my my homework and anything that needs to be fixed.”
Upload two files to Canvas. Your self-contained: true .html and your .qmd files. DO NOT submit a .zip file
- Complete 2.4 Exercises Problem 7 a, b, c from the ISL.
Do parts a, b, and c without normalization or scaling. Re-do parts a, b, and c using either normalization or scaling. Do the results differ?
- Run the R code using the best subset regression code the olsrr, from the rsquaredacademy, and leaps packages. This question demonstrates the use of automating the model selection process by fitting all possible regressions and picking the best model using a criteria/metric such as Adjusted R-squared or AIC.
His blog is currently offline You can download his past blog posts from his GitHub yuzaR-Blog. A nice blog post from yuza-Blog to read is glmulti best model and the YouTube video glmulti. The video is a good introduction to the another way to do model selection.
Homework02a: (complete by Monday September 14, 2026)
Using the provided Quarto Project, rename the file lastname_firstname_Stat652_Homework02a.qmd using your own last name and first name in the filename.
You should plan to come to class on Monday next week to ask questions and you will have until Friday to turn in this homework through Canvas.
Before submitting your files in Canvas evaluate your files using an AI such as ChatGPT or Gemini to evaluate if you have followed the guidelines for the homework. Here is a suggested prompt to use after uploading the Homework_Guidelines.qmd file to the AI and your .qmd and .html file for the assignment.
Prompt: “Please review my homework that is in the .html and .qmd files. Please compare these files to the guidelines provide in the guidelines.qmd file. Please score each part of each requirement on a 5 point scale. Please provide summary of the completeness my my homework and anything that needs to be fixed.”
Upload two files to Canvas. Your self-contained: true .html and your .qmd files. DO NOT submit a .zip file
Read: mdsr3e Chapter 10, Chapter 11
Lantz, Machine Learning with R, 4ed, Chapter 3, second half of Chapter 6. To access the book CSUEB Library Databases A-Z > Safari Books Online, register and access the book
To access the book CSUEB Library Databases A-Z > Safari Books Online, register and access the book
Problems:
10.6 Exercises: Problem 3
Hints: The HELPrct data from the mosaicData R package. Note that this problem does not ask you to use a training and testing dataset. It is asking you to proceed without the testing dataset and you should use the full dataset to fit the model.
11.7 Exercises: Problem 4
11.7 Exercises: Problem 6a, Run Models 1. Null Model, 2. Logistic Regression, 7. kNN, using training and test datasets, as described in part c of the problem.
Hints: For Problems 6a, explore the dataset before attempting to fit the models. You will need to deal with the missing values before applying some or all of the models. Which models do not work with missing data?
Homework01: (complete by Monday August 31, 2026)
Using the provided Quarto Project, rename the file lastname_firstname_Stat652_Homework01.qmd using your own last name and first name in the filename.
- Stat652_Homework01.zip Updated: I have updated the .qmd file in the .zip. There is currently a problem installing the R package mosaic. Since the .qmd file only uses the R package mosaicData, there is no reason to load mosaic. I have removed the mosaic package from the p_load() function and changed it to load only the mosaicData package in the .qmd file.
You should plan to come to class on Monday next week to ask questions and you will have until Friday to turn in this homework through Canvas.
Before submitting your files in Canvas evaluate your files using an AI such as ChatGPT or Gemini to evaluate if you have followed the guidelines for the homework. Here is a suggested prompt to use after uploading the Homework_Guidelines.qmd file to the AI and your .qmd and .html file for the assignment.
Prompt: “Please review my homework that is in the .html and .qmd files. Please compare these files to the guidelines provide in the guidelines.qmd file. Please score each part of each requirement on a 5 point scale. Please provide summary of the completeness my my homework and anything that needs to be fixed.”
Upload two files to Canvas. Your embed-resources: true .html and your .qmd files. DO NOT submit a .zip file
- Read:
- mdsr3e Prologue and Chapter 9
- Lantz, Machine Learning with R, 4ed, first half of the Chapter 6 on linear regression and logistic regression.
- To access the book CSUEB Library Databases A-Z > O’Reilly Online Learning E-books (formerly Safari Books Online), register and access the book.
- Problems:
- 9.9 Exercises: Problem 2, Problem 3
- 9.10 Supplemental exercises: Problem 2 Hint: This problem does not have a given dataset, so there is no code to run. The question is asking you to answer the questions asked in writing.