[Optional] You can include the R code for Questions 22, 23,…

[Optional] You can include the R code for Questions 22, 23, 24 here. This is NOT required, and you can choose to only provide code for some questions. Indicate the question number in your code. When your numerical answers are wrong, you may receive partial credits if your code does not have significant mistakes. However, partial credits may be deducted if your answer is correct but your code is wrong.