Publications by Yunting Chiu
Regression with Matrix Algebra
(6.3) A student stated: “Adding predictor variables to a regression model can never reduce \(R^2\), so we should include all available predictor variables in the model.” Comment. Not really. If the model have a bigger \(R^2\) value, which means the fitter is better. However, better fitting does not necessarily imply the fitted model is a use...
7439 sym R (4366 sym/48 pcs) 2 img 1 tbl
Lahman’s Baseball Dataset
Exercise 1: Keys key = a set of variables used to connect a pair of dataframes primary key = identifies individual rows its own data frame. Give me a value, I can tell the unique row that has that value. 1. Read the description of the babynames dataset with (you might need to install babynames) library(tidyverse) ## ── Attaching packages �...
2851 sym R (4826 sym/53 pcs) 2 img
stringr and Regular Expressions
Question 1: Scrabble Words 1. Load into R the list of acceptable (2015) Scrabble words fromhttps://dcgerard.github.io/stat_412_612/data/words.txt. Hint: “NA” is an actual word. It means “no” or “not”. library(tidyverse) ## ── Attaching packages ────────────────────────────�...
3386 sym R (6478 sym/59 pcs) 1 img
Pipes Functions Logicals
Questions 1. (RDS Exercise 19.4.3) Implement a fizzbuzz() function which takes a single number as input. Use logicals and conditionals as well as the operator %% • If the number is divisible by three, return “fizz”. • If it’s divisible by five, return “buzz”. • If it’s divisible by three and five, return “fizzbuzz”. • Ot...
2993 sym R (5821 sym/46 pcs)
Introduction of markdown
Instructions There are two parts to this homework: 1. Reproduce this entire document in Markdown (including these instructions). 2. Insert code chunks as apporpriate and solve the problems in the second part. Knit directly to PDF. Submit both .Rmd and PDF to Blackboard in a single submission by the due date and time (before the next class)....
4453 sym R (4627 sym/25 pcs) 1 img 1 tbl
Tidy Text
Instructions Clone this homework repo to your homework directory as a new repo. Rename the starter file under the analysis directory as hw_01_yourname.Rmd and use it for your solutions. Modify the “author” field in the YAML header. Stage and Commit R Markdown and HTML files (no PDF files). Push both .Rmd and HTML files to GitHub. Make su...
8827 sym R (12626 sym/34 pcs) 7 img
List Columns and COVID19
Instructions Clone this homework repo to your homework directory as a new repo. Rename the starter file under the analysis directory as hw_01_yourname.Rmd and use it for your solutions. Modify the “author” field in the YAML header. Stage and Commit R Markdown and HTML files (no PDF files). Push both .Rmd and HTML files to GitHub. Make su...
7865 sym R (13787 sym/42 pcs) 2 img
College Scorecard and World Bank Data
Instructions Admin elements: 1. Upload a photo (headshot) of yourself into your canvas profile 2. Review the Syllabus and the academic integrity code. 3. Fill in your information in the Student Info spreadsheet under the Canvas Collaboration site. Analysis Elements: Rename the starter file under the analysis directory as hw_01_yourname.Rmd and us...
9449 sym R (21438 sym/74 pcs) 10 img
stringr and lubridate
Instructions Rename the starter file under the analysis directory as hw_01_yourname.Rmd and use it for your solutions. 1. Modify the “author” field in the YAML header. 2. Stage and Commit R Markdown and HTML files (no PDF files). 3. Push both .Rmd and HTML files to GitHub. - Make sure you have knitted to HTML prior to staging, committing, and...
6860 sym R (19169 sym/62 pcs) 2 img
Linear Model Reviews
Exercise 1 - Simple linear regression Load the data biomass and plot HHV as a function of carbon. library(tidymodels) # or run in console table with "remotes::install_github("tidymodels/parsnip")" data("biomass") # in model.data package head(biomass) ## sample dataset carbon hydrogen oxygen nitrogen sulfur HHV ## 1 ...
1746 sym R (5773 sym/25 pcs) 2 img