Publications by Kitada Smalley

MATH138: Cereal MLR

24.11.2020

Motivating Example: Breakfast Cereal Data is a sample of 30 breakfast cereals. cereal<-read.delim("https://www.lock5stat.com/datasets/Cereal.txt", header=TRUE) head(cereal) ## Name Company Serving Calories Fat Sodium Carbs Fiber Sugars ## 1 AppleJacks K 1.00 117 0.6 143 27 0....

290 sym R (3981 sym/22 pcs) 6 img

DataViz: Ensemble Graphics

07.12.2020

Ensemble Graphics These examples modified from Chapter 12 Ensemble Graphics and Case Studies in Graphical Data Analysis with R,by Antony Unwin Motivating Example 1: Coffee #install.packages("pgmm") library(pgmm) data("coffee") head(coffee) ## Variety Country Water Bean Weight Extract Yield ph Value Free Acid ## 1 1 mexico 8.93999...

2390 sym R (18951 sym/83 pcs) 19 img

SLR Quakes

02.03.2021

Earthquake Data The data set give the locations of 1000 seismic events of MB > 4.0. The events occurred in a cube near Fiji since 1964. lat = Latitude of event long = Longitude depth = Depth (km) mag = Richter magnitude stations = Number of statitions reporting Import the Data library(tidyverse) data(quakes) Step Zero: Relationships Between Va...

3391 sym R (3153 sym/41 pcs) 9 img

LMT: CheatSheet

27.02.2021

1. Simple Linear Regression (SLR) Model Let \((x_1, Y_1), (x_2, Y_2), ..., (x_n, Y_n)\) be \(n\) bivariate data points observed from a simple linear model \[Y_i=\beta_0+\beta_1 x_i+\varepsilon_i, i=1, 2, ..., n\] 1.2 Normality Assumption \[\varepsilon_i \sim Normal(0, \sigma^2)\] Errors are in independent and identically distributed (iid) Norma...

14614 sym 2 tbl

Confidence vs Prediction Activity

25.02.2021

How do we use a regression model for prediction? Once the model is fitted we can use it to make predictions on the value of the response variable \(Y\), for any given value of \(x=x_0\). For this example we will continue to use the {rocket} data. rocket<-read.csv("https://raw.githubusercontent.com/kitadasmalley/sp21_MATH376LMT/main/data/rocketPro...

1663 sym R (2262 sym/26 pcs) 1 img

LMT: Slope Inference

25.02.2021

We will be using the Rocket dataset: A rocket motor is manufactured by bonding an igniter propellant and a sustainer propellant together inside a metal housing. The shear strength of the bond between the two types of propellants is an important quality characteristic. It is suspected that shear strength is related to the age in weeks of the batch...

2693 sym R (2818 sym/35 pcs) 1 img

Skills Solutions

24.02.2021

PART 1: Data Wrangling library(tidyverse) 1) Make a new data set that has the average depth and price of the diamonds in the data set. avgPandD = diamonds %>% summarise(mean(price), mean(depth)) avgPandD ## # A tibble: 1 x 2 ## `mean(price)` `mean(depth)` ## <dbl> <dbl> ## 1 3933. 61.7 2) Add a new column to...

3513 sym R (6379 sym/47 pcs) 2 img

LMT: Variable Selection

15.04.2021

Hald Cement Data Hald [1952] presented a dataset concerning the heat involved in calories per gram of cement (đť‘Ś) as a function of the amount of each of the following four ingredients in the mixture: \(x_1\): tricalcium aluminate \(x_2\): tricalcium silicate \(x_3\): tetracalcium alumino ferrite \(x_4\): dicalcium silicate hald<-read.csv("htt...

1947 sym R (8171 sym/45 pcs)

Tree Algorithms in R (Updated rpart)

13.04.2021

This code reflects an update on the code from ISLR, which uses the tree package. Instead this code will focus on using the rpart package. Part 1: Regression Trees We will need several packages for today’s code: #install.packages("ISLR") library(ISLR) ## Warning: package 'ISLR' was built under R version 3.6.2 #install.packages("rpart") library(...

1161 sym R (60841 sym/58 pcs) 12 img

LMT: Matrices and MLR

15.03.2021

Step 1: Import the data There data are on restaurant rating in New York City. nyc <- read.csv("http://andrewpbray.github.io/data/nyc.csv") head(nyc) ## Case Restaurant Price Food Decor Service East ## 1 1 Daniella Ristorante 43 22 18 20 0 ## 2 2 Tello's Ristorante 32 20 19 19 0 ## 3 3 ...

483 sym R (6225 sym/16 pcs) 1 img