Publications by Kitada Smalley

DATA151: Regression (Take a Hike)

08.11.2022

Learning Objectives: Students will learn to create scatterplots and describe the relationships between two numeric variables. Example: Take A Hike! STEP 1: Load the data: body_wgt<-c(120, 187, 109, 103, 131, 165, 158, 116) backpack_wgt<-c(26, 30, 26, 24, 29, 35, 31, 28) backpack_df<-data.frame(body_wgt, backpack_wgt) Which variable should be t...

1404 sym R (2130 sym/24 pcs) 3 img

DATA151: Introduction to Regression Models

10.11.2022

Learning Objectives Students will learn how to use linear regression to model relationships between variables and also explore subgroups. Example 1: Climate Change and Fish Habitats As the climate grows warmer, we expect many animal species to move toward the poles in an attempt to maintain their preferred temperature range. Do data on fish in t...

2203 sym R (6049 sym/25 pcs) 7 img

Advanced Logistic Models

04.04.2020

Part 1: Logistic Regression: Probit vs Logit install.packages("titanic", repos = "http://cran.us.r-project.org") ## ## The downloaded binary packages are in ## /var/folders/cc/1pvgy4s11875jgp6h1fml9wr0000gn/T//Rtmp1ZBJsG/downloaded_packages library(tidyverse) library(titanic) # LINEAR MODEL lm_t=lm(Survived ~ Fare, data=titanic_train) ggplot(...

1278 sym R (17296 sym/66 pcs) 4 img

Help for Sam

27.03.2020

nrgcen<-read.csv("/Users/hsmalley/Downloads/Energy Census and Economic Data US 2010-2014.csv", header=TRUE) #head(nrgcen) # at state level # cols for years # might be useful but need to find wanted cols first unemp<-read.csv("/Users/hsmalley/Downloads/unemployment-by-county-us/output.csv", header=TRUE) #head(unem...

5 sym R (3874 sym/5 pcs)

Critical Thinking: MLR Model Extensions

26.03.2020

Part I: Numeric Interactions In the past, we have looked at the Boston dataset to explore polynomial regression. We are going to use this dataset for Part I. You will need to load it into this lab session from library MASS. library(MASS) library(ISLR) names(Boston) ## [1] "crim" "zn" "indus" "chas" "nox" "rm" "age" ## ...

1750 sym R (5315 sym/22 pcs) 1 img

SP20: MATH 239 - MLR Geometry

16.03.2020

Exploring the Geometry of Multiple Linear Regression PART I: Warm-Up Example: Predicting Book Weights for Amazon Shipping When you buy a book off of Amazon, you get a quote for how much it costs to ship. This is based on the weight of the book. If you didn’t know the weight a book, what other characteristics of it could you measure to help pr...

3944 sym R (8728 sym/37 pcs) 7 img

SP20: MATH 239 - Categorical Explanatory Variables

11.03.2020

Sales of Child Car Seats We’ll be using the Carseat data set in the ISLR package. Its a simulated dataset about the sales of car seats at different stores. library(ISLR) data(Carseats) names(Carseats) ## [1] "Sales" "CompPrice" "Income" "Advertising" "Population" ## [6] "Price" "ShelveLoc" "Age" "Education" "Ur...

913 sym R (6538 sym/23 pcs) 3 img

7A: Adding Curvature

02.03.2020

Polynomial Regression ###### library(MASS) ## Warning: package 'MASS' was built under R version 3.6.2 data(Boston) dim(Boston) ## [1] 506 14 mod5<-lm(medv~poly(lstat,5), data=Boston) summary(mod5) ## ## Call: ## lm(formula = medv ~ poly(lstat, 5), data = Boston) ## ## Residuals: ## Min 1Q Median 3Q Max ## -13.5433 -3....

63 sym R (4435 sym/36 pcs) 4 img

Introduction to Graphics in R

30.01.2020

Introduction to Graphics in R We will be using data from my Spring 2020 classes for these graphics. Please import by logging into your class WISE page, setting the working directory, and calling the dataset. All data have been deidentified. How to load in data enrolled<-read.csv("spring2020_enrolled.csv", header=TRUE) How to...

1353 sym R (12750 sym/52 pcs) 17 img

Data Wrangling

29.01.2020

Data Wrangling The following is the code for class: library(tidyverse) ## Warning: package 'tidyverse' was built under R version 3.4.2 ## ── Attaching packages ─────────────────────────────────────────────────────────────�...

64 sym R (9254 sym/43 pcs) 5 img