Publications by Joey Campbell

EDA in R

12.09.2024

Objectives At the end of the lecture, you will be able to - perform exploratory data analysis (EDA) using graphical methods - perform EDA using descriptive statistics - acquire basic skills to use ggplot2 and gtsummary packages Introduction Exploratory Data Analysis or EDA is the critical process of performing initial investigations on data to...

8138 sym R (12590 sym/62 pcs) 14 img 6 tbl

ANOVA in R

29.08.2024

ANOVA is a statistical test for estimating how a quantitative dependent variable changes according to the levels of one or more categorical independent variables. ANOVA tests whether there is a difference in means of the groups at each level of the independent variable. The null hypothesis (\(H_0\)) of the ANOVA is no difference in means, and ...

37238 sym R (4408 sym/28 pcs) 6 img

Case Study EPA

23.04.2020

We are going apply some of the techniques we learned in Exploratory Data Analysis to study air pollution data, specifically particulate matter (we’ll call it pm25 sometimes), collected by the U.S. Environmental Protection Agency. This website https://www.health.ny.gov/environmental/indoors/air/pmq_a.htm from New York State offers some basic inf...

4859 sym R (6291 sym/24 pcs)

Lab 5 Cross-Validation and the Bootstrap

20.04.2020

In this lab, we explore the resampling techniques covered in this chapter. Some of the commands in this lab may take a while to run on your computer. The Validation Set Approach We explore the use of the validation set approach in order to estimate the test error rates that result from fitting various linear models on the Auto data set. Before w...

32291 sym R (6692 sym/39 pcs)

Rmarkdown Demo

18.04.2020

Problem 10 This question should be answered using the Carseats data set. library(ISLR) ## Warning: package 'ISLR' was built under R version 3.6.3 attach(Carseats) (a) Fit a multiple regression model to predict Sales using Price,Urban, and US. fit<-lm(Sales~Price+Urban+US) summary(fit) ## ## Call: ## lm(formula = Sales ~ Price + Urban + US) #...

2272 sym R (4331 sym/14 pcs) 1 img

R Lab: Logistic Regression, LDA, QDA, and KNN

16.04.2020

The Stock Market Data We will begin by examining some numerical and graphical summaries of the Smarket data, which is part of the ISLR library. This data set consists of percentage returns for the S&P 500 stock index over 1, 250 days, from the beginning of 2001 until the end of 2005. For each date, we have recorded the percentage returns for each...

50687 sym R (8922 sym/115 pcs) 2 img

NCI60 Data Example R Lab

16.04.2020

Unsupervised techniques are often used in the analysis of genomic data. In particular, PCA and hierarchical clustering are popular tools. We illustrate these techniques on the NCI60 cancer cell line microarray data, which consists of 6,830 gene expression measurements on 64 cancer cell lines. library(ISLR) nci.labs=NCI60$labs nci.data=NCI60$dat...

18698 sym R (6401 sym/27 pcs) 6 img

R Lab: Clustering

16.04.2020

K-Means Clustering The function kmeans() performs K-means clustering in R. We begin with a simple simulated example in which there truly are two clusters in the data: the first 25 observations have a mean shift relative to the next 25 observations. set.seed(2) x=matrix(rnorm (50*2), ncol=2) x[1:25,1]=x[1:25,1]+3 x[1:25,2]=x[1:25,2]-4 We now pe...

10265 sym R (2332 sym/25 pcs) 4 img

Linear Regression R Lab

14.04.2020

Libraries The library() function is used to load libraries, or groups of functions and data sets that are not included in the base R distribution. Basic functions that perform least squares linear regression and other simple analyses come standard with the base distribution, but more exotic functions require additional libraries. Here we load the...

31271 sym R (12488 sym/68 pcs) 11 img

Introduction to R Lab

14.04.2020

In this lab, we will introduce some simple R commands. The best way to learn a new language is to try out the commands. R can be downloaded from http://cran.r-project.org/. Basic Commands R uses functions to perform operations. To run a function called funcname, we type funcname(input1, input2), where the inputs (or arguments) input1 and input2 ...

33556 sym R (7107 sym/106 pcs) 23 img