Publications by Bethany Fletcher

Homework 7 (Part II)

01.04.2020

Part II library(ISLR) data(Carseats) str(Carseats) ## 'data.frame': 400 obs. of 11 variables: ## $ Sales : num 9.5 11.22 10.06 7.4 4.15 ... ## $ CompPrice : num 138 111 113 117 141 124 115 136 132 132 ... ## $ Income : num 73 48 35 100 64 113 105 81 110 113 ... ## $ Advertising: num 11 16 10 4 3 13 0 15 0 0 ... ## $ Popula...

1528 sym R (3385 sym/13 pcs)

Homework #4

25.02.2020

Part II; Practice Problems Problem 1: Investigating the T-stat a) set.seed(1) x<-rnorm(100) y<-2*x+rnorm(100) slr<-lm(y~x+0) summary(slr) ## ## Call: ## lm(formula = y ~ x + 0) ## ## Residuals: ## Min 1Q Median 3Q Max ## -1.9154 -0.6472 -0.1771 0.5056 2.3109 ## ## Coefficients: ## Estimate Std. Error t value Pr(>|t|) ...

2748 sym R (6060 sym/30 pcs) 4 img

MATH 239: Homework #1

05.02.2020

##Problem 1: Auto Data #Part A Auto <- read.table("http://faculty.marshall.usc.edu/gareth-james/ISL/Auto.data", header=TRUE, na.strings = "?") str(Auto) ## 'data.frame': 397 obs. of 9 variables: ## $ mpg : num 18 15 18 16 17 15 14 14 14 15 ... ## $ cylinders : int 8 8 8 8 8 8 8 8 8 8 ... ##...

1840 sym R (10816 sym/130 pcs) 7 img

Lab 1: Introduction to R

27.01.2020

Problem 1 ###Part A Let’s look at the cars dataset: summary(cars) ## speed dist ## Min. : 4.0 Min. : 2.00 ## 1st Qu.:12.0 1st Qu.: 26.00 ## Median :15.0 Median : 36.00 ## Mean :15.4 Mean : 42.98 ## 3rd Qu.:19.0 3rd Qu.: 56.00 ## Max. :25.0 Max. :120.00 Including Plots You can...

241 sym R (483 sym/5 pcs) 1 img

Homework #3

19.02.2020

Homework 3 Part 2 Problem 3 Part B scores <- c(57, 61, 42, 62, 41, 28) sample(scores, 2, replace = FALSE) #repeat 20 times ## [1] 28 42 I ran the sample function 20 times to obtain the two values to form the treatment group for the resample. The remaining four numbers formed the control group for the resample. The reamining 19 resamples are recor...

1617 sym R (2444 sym/19 pcs) 3 img

Homework #5

03.03.2020

Problem 2 a) library(ISLR) data(Auto) slrauto <- lm(data = Auto, mpg~horsepower) summary(slrauto) ## ## Call: ## lm(formula = mpg ~ horsepower, data = Auto) ## ## Residuals: ## Min 1Q Median 3Q Max ## -13.5710 -3.2592 -0.3435 2.7630 16.9240 ## ## Coefficients: ## Estimate Std. Error t value Pr(>|t|) ...

1474 sym R (3039 sym/26 pcs) 7 img

Visualizing COVID-19

11.05.2020

From epidemic to pandemic Load the readr, ggplot2, adn dplyr packages library(readr) library(ggplot2) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union Read datase...

1481 sym R (4795 sym/32 pcs) 7 img