Publications by Daniel Smith
Covid Project
# Load the readr, ggplot2, and dplyr packages library(readr) ## Warning: package 'readr' was built under R version 3.6.3 library(ggplot2) ## Warning: package 'ggplot2' was built under R version 3.6.3 library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The followi...
36 sym R (6474 sym/38 pcs) 7 img
Document
2a. This would not be true if we did not have an adequately large sample size. This is not true; bootstrapped samples are created with replacement. This is not true; we should use a sample size equal to the size of the original sample. The samples are taken from the original sample, not from the population. 3a. set.seed(1) treatement_group <- ...
1423 sym R (2324 sym/21 pcs) 3 img
Homework Week 2
Problem 1 False. The number of patients with cardiovascular problems is not what is important, the percentage of patients is. True. False. The reasoning is wrong; the rate of incedence alone is not enough to prove anything. True. Problem 2 In the treatment group, the proportion of patients who died is \(\frac{45}{69} = 0.652\). In the control ...
1412 sym
Homework Week 1
The Auto table contains 9 predictors, of which 7 (mpg, cylinders, displacement, horsepower, weight, acceleration, year) are quantitative, and 2 (origin, name) are qualitative. The range, mean, and standard deviation for each quantatative predictor were found as follows: Auto <- read.table("http://faculty.marshall.usc.edu/gareth-james/ISL/Auto.da...
1243 sym R (6075 sym/19 pcs) 7 img
Document
1a. set.seed(1) x<-rnorm(100) y<-2*x + rnorm(100) summary(lm(y~x + 0)) ## ## 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|) ## x 1.9939 0.1065 18.73 <2e-16 *** ## -...
2410 sym R (5300 sym/27 pcs) 4 img
HW 4
t value Pr(>|t|) (Intercept) -2.601 speed 9.464 \(1.49e^{-12}\) Residual standard error: 15.38 on 48 degrees of freedom Multiple R-squared: 0.6511 F-statistic: 89.57 on 1 and 49 DF, p-value: \(1.49e^{-12}\) anova(mod) Mean Sq F value Pr(>F) speed 21186 89.5656 \(1.49e^{-12}\) Residuals 236.54 Auto <- read.table("http://faculty....
1017 sym R (1284 sym/10 pcs) 5 img
HW week 7
1a. Players <- read.csv('basketball.csv') str(Players) ## 'data.frame': 559 obs. of 28 variables: ## $ X : int 1 2 3 4 5 6 7 8 9 10 ... ## $ Player : Factor w/ 455 levels "Aaron Brooks",..: 244 438 231 196 154 32 208 169 448 393 ... ## $ Country : Factor...
2594 sym R (10425 sym/29 pcs) 4 img