R package ggplot2 STAT 133. Gaston Sanchez. Department of Statistics, UC Berkeley

Size: px
Start display at page:

Download "R package ggplot2 STAT 133. Gaston Sanchez. Department of Statistics, UC Berkeley"

Transcription

1 R package ggplot2 STAT 133 Gaston Sanchez Department of Statistics, UC Berkeley gastonsanchez.com github.com/gastonstat/stat133 Course web: gastonsanchez.com/stat133

2 ggplot2 2

3 Scatterplot with "ggplot2" Terminology aesthetic mappings geometric objects statistical transformations scales non-data elements (themes & elements) facets 3

4 Considerations Specifying graphical elements from 3 sources: The data values (represented by the geometric objects) The scales and coordinate system (axes, legends) Plot annotations (background, title, grid lines) 4

5 Scatterplot with geom point ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point() 300 hp mpg 5

6 Another geom ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_line() 300 hp mpg 6

7 Mapping Attributes -vs- Setting Attributes 7

8 Increase size of points ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(size = 3) 300 hp mpg 8

9 How does it work? To increase the size of points, we set the aesthetic size to a constant value of 3 (inside the geoms function): + geom_point(size = 3) 9

10 Adding color ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(size = 3, color = "tomato") 300 hp mpg 10

11 Adding color ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(size = 3, color = "#259ff8") 300 hp mpg 11

12 Test your knowledge Identify the valid hex-color A) "345677" B) "# " C) "#AAAAAA" D) "#GG0033" 12

13 Changing points shape # 'shape' accepts 'pch' values ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(size = 3, color = "tomato", shape = 15) 300 hp mpg 13

14 Setting and Mapping Aesthetic attributes can be either mapped via aes() or set # mapping aesthetic color ggplot(mtcars, aes(x = mpg, y = hp)) + geom_point(aes(color = cyl)) # setting aesthetic color ggplot(mtcars, aes(x = mpg, y = hp)) + geom_point(color = "blue") 14

15 Geom text, and mapping labels ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_text(aes(label = gear)) hp mpg

16 Changing axis labels and title ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(size = 3, color = "tomato") + xlab("miles per gallon") + ylab("horse power") + ggtitle("scatter plot with ggplot2") 300 Scatter plot with ggplot2 horse power miles per gallon 16

17 Changing background theme ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(size = 3, color = "tomato") + xlab("miles per gallon") + ylab("horse power") + ggtitle("scatter plot with ggplot2") + theme_bw() 300 Scatter plot with ggplot2 horse power miles per gallon 17

18 Your turn: Replicate this figure 300 horse power 200 disp miles per gallon 18

19 Your turn: Replicate this figure Specify a color in hex notation Change the shape of the point symbol Map disp to attribute size of points Add axis labels 19

20 Your turn ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(aes(size = disp), color = "#ff6666", shape = 17) + xlab("miles per gallon") + ylab("horse power") 20

21 More geoms ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point() + geom_smooth(method = "lm") hp mpg 21

22 More geoms We can map variable to a color aesthetic. Here we map color to cyl (cylinders) ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(aes(color = cyl)) 300 hp 200 cyl mpg 22

23 More geoms If the variable that maps to color is a factor, then the color scale will change ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(aes(color = as.factor(cyl))) 300 hp 200 as.factor(cyl) mpg 23

24 Your turn: Replicate this figure Scatter plot with ggplot2 displacement factor(am) 0 1 hp miles per gallon 24

25 Your turn: example 2 Map hp to attribute size of points Map am (as factor) to attribute color points Add an alpha transparency of 0.7 Change the shape of the point symbol Add axis labels Add a title 25

26 Your turn: example 2 ggplot(data = mtcars, aes(x = mpg, y = disp)) + geom_point(aes(size = hp, color = factor(am)), alpha = 0.7) + xlab("miles per gallon") + ylab("displacement") + ggtitle("scatter plot with ggplot2") 26

27 Histogram ggplot(data = mtcars, aes(x = mpg)) + geom_histogram(binwidth = 2) 6 count mpg 27

28 Boxplots ggplot(data = mtcars, aes(x = factor(cyl), y = mpg)) + geom_boxplot() mpg factor(cyl) 28

29 Density Curves ggplot(data = mtcars, aes(x = mpg)) + geom_density() 0.06 density mpg 29

30 Density Curves ggplot(data = mtcars, aes(x = mpg)) + geom_density(fill = "#c6b7f5") 0.06 density mpg 30

31 Density Curves ggplot(data = mtcars, aes(x = mpg)) + geom_density(fill = "#c6b7f5", alpha = 0.4) 0.06 density mpg 31

32 Density Curves ggplot(data = mtcars, aes(x = mpg)) + geom_line(stat = 'density', col = "#a868c0", size = 2) density mpg 32

33 Density Curves ggplot(data = mtcars, aes(x = mpg)) + geom_density(fill = '#a868c0') + geom_line(stat = 'density', col = "#a868c0", size = 2) 0.06 density mpg 33

34 ggplot objects 34

35 Plot objects You can assign a plot to a new object (this won t plot anything): mpg_hp <- ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(size = 3, color = "tomato") To show the actual plot associated to the object mpg hp use the function print() print(mpg_hp) 35

36 "ggplot2" objects working with ggplot objects, we can... define a basic plot, to which we can add or change layers without typing everything again render it on screen with print() describe its structure with summary() render it to disk with ggsave() save a cached copy to disk with save() 36

37 Adding a title and axis labels to a ggplot2 object: mpg_hp + ggtitle("scatter plot with ggplot2") + xlab("miles per gallon") + ylab("horse power") 300 Scatter plot with ggplot2 horse power miles per gallon 37

38 Your turn: example 3 Create the following ggplot object: # ggplot object obj <- ggplot(data = mtcars, aes(x = mpg, y = hp, label = rownames(mtcars))) Add more layers to the object " obj in order to replicate the figure in the following slide: 38

39 Your turn: example 3 Maserati Bora Scatter plot 300 horse power Ford Pantera L Camaro Duster Z Chrysler Imperial n Continental 200 ac Fleetwood Merc Merc 450SLC Merc Hornet 450SE Pontiac 450SL Ferrari Sportabout Firebird Dino factor(am) a 0 a 1 Dodge AMC Challenger Javelin 100 Merc Merc 280C280 Valiant Mazda Hornet Volvo RX4 4142E RX4 Drive Wag Lotus Europa Toyota Datsun Merc Corona 230 Porsche Merc 240D Fiat X1 9 Fiat Toyota 128Cor Honda Civic miles per gallon 39

40 Your turn: example 3 obj + geom_text(aes(color = factor(am))) + ggtitle("scatter plot") + xlab("miles per gallon") + ylab("horse power") 40

41 Scales 41

42 Scales The scales component encompases the ideas of both axes and legends on plots, e.g.: Axes can be continuous or discrete Legends involve colors, symbol shapes, size, etc scale x continuous scale y continuous scale color manual scales will often automatically generate appropriate scales for plots Explicitly adding a scale component overrides the default scale 42

43 Continuous axis scales Use scale x continuous() to modify the default values in the x axis ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(aes(color = factor(am))) + scale_x_continuous(name = "miles per gallon", limits = c(10, 40), breaks = c(10, 20, 30, 40)) 43

44 Continuous axis scales 300 hp 200 factor(am) miles per gallon 44

45 Continuous axis scales Use scale y continuous() to modify the default values in the y axis ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(aes(color = factor(am))) + scale_x_continuous(name = "miles per gallon", limits = c(10, 40), breaks = c(10, 20, 30, 40)) + scale_y_continuous(name = "horsepower", limits = c(50, 350), breaks = seq(50, 350, by = 50)) 45

46 Continuous axis scales horsepower factor(am) miles per gallon 46

47 Example: color scale Use scale color manual() to modify the colors associated to a factor ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(aes(color = factor(am))) + scale_color_manual(values = c("orange", "purple")) 47

48 Example: color scale 300 hp 200 factor(am) mpg 48

49 Example: modifying legend Modifying legends depends on the type of scales (e.g. color, shapes, size, etc) ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(aes(color = factor(am))) + scale_color_manual(values = c("orange", "purple"), name = "transmission", labels = c('no', 'yes')) 49

50 Example: modifying legend 300 hp 200 transmission no yes mpg 50

51 Faceting 51

52 Faceting with facet wrap() ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(color = "#3088f0") + facet_wrap(~ cyl) hp mpg 52

53 Faceting with facet grid() ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(color = "#3088f0") + facet_grid(cyl ~.) 300 hp mpg 53

54 Faceting with facet grid() ggplot(data = mtcars, aes(x = mpg, y = hp)) + geom_point(color = "#3088f0") + facet_grid(. ~ cyl) hp mpg 54

55 Layered Grammar About "ggplot2" Key concept: layer (layered grammar of graphics) Designed to work in a layered fashion Starting with a layer showing the data Then adding layers of annotations and statistical transformations Core idea: independents components combined togehter 55

56 the data to be visualized Some Concepts a set of aesthetic mappings describing how varibales are mapped to aesthetic attributes geometric objects, geoms, representing what you see on the plot (points, lines, etc) statistical transformations, stats, summarizing data in various ways scales that map values in the data space to values in an aesthetic space a coordinate system, coord, describing how data coordinates are mapped to the plane of the graphic a faceting specification describing how to break up the data into subsets and to displays those subsets 56

Lab #5 - Predictive Regression I Econ 224 September 11th, 2018

Lab #5 - Predictive Regression I Econ 224 September 11th, 2018 Lab #5 - Predictive Regression I Econ 224 September 11th, 2018 Introduction This lab provides a crash course on least squares regression in R. In the interest of time we ll work with a very simple, but

More information

Regression_Model_Project Md Ahmed June 13th, 2017

Regression_Model_Project Md Ahmed June 13th, 2017 Regression_Model_Project Md Ahmed June 13th, 2017 Executive Summary Motor Trend is a magazine about the automobile industry. It is interested in exploring the relationship between a set of variables and

More information

Motor Trend Car Road Analysis

Motor Trend Car Road Analysis Motor Trend Car Road Analysis Zakia Sultana February 28, 2016 Executive Summary You work for Motor Trend, a magazine about the automobile industry. Looking at a data set of a collection of cars, they are

More information

MAS3314/8314: Multivariate Data Analysis Prof D J Wilkinson

MAS3314/8314: Multivariate Data Analysis Prof D J Wilkinson i MAS3314/8314: Multivariate Data Analysis Prof D J Wilkinson Module description: In the 21st Century, statisticians and data analysts typically work with data sets containing a large number of observations

More information

Operators and the Formula Argument in lm

Operators and the Formula Argument in lm Operators and the Formula Argument in lm Recall that the first argument of lm (the formula argument) took the form y. or y x (recall that the term on the left of the told lm what the response variable

More information

Introduction to ggplot2. ggplot2 is (in my opinion) one of the best documented packages in R. The full documentation for it can be found here:

Introduction to ggplot2. ggplot2 is (in my opinion) one of the best documented packages in R. The full documentation for it can be found here: Introduction to ggplot2 This practical introduces a slightly different method of creating plots in R using the ggplot2 package. The package is an implementation of Leland Wilkinson's Grammar of Graphics-

More information

Chapter 5: Exploring Data: Distributions Lesson Plan

Chapter 5: Exploring Data: Distributions Lesson Plan Lesson Plan Exploring Data Displaying Distributions: Histograms For All Practical Purposes Mathematical Literacy in Today s World, 7th ed. Interpreting Histograms Displaying Distributions: Stemplots Describing

More information

Package timelines. August 29, 2016

Package timelines. August 29, 2016 Type Package Title Timeline and Time Duration-Related Tools Version 0.1.1 Date 2016-08-21 Author Dahee Lee [aut, cre], Dustin Tingley [aut] Maintainer Dahee Lee Package timelines August

More information

NoR. LIV. D. "A~ TEX? OF STATISTICS P/4 19/1 ROBUST ON &ASO P oo~tdu rdeloaf VANSAM~k OUTIKAS. (U) UI DORSE(IT Rt P SG4l? NOS1lt-E--010?

NoR. LIV. D. A~ TEX? OF STATISTICS P/4 19/1 ROBUST ON &ASO P oo~tdu rdeloaf VANSAM~k OUTIKAS. (U) UI DORSE(IT Rt P SG4l? NOS1lt-E--010? T AD-All? MS* 54?6kPTQIS TK LIV. D. "A~ TEX? OF STATISTICS P/4 19/1 ROBUST ON &ASO P oo~tdu rdeloaf VANSAM~k OUTIKAS. (U) UI DORSE(IT Rt P SG4l? NOS1lt-E--010? NoR WiCLASSIPIED T-IS? GA. SOUTHERN METODIST

More information

Package baystability

Package baystability Type Package Package baystability March 13, 2018 Title Bayesian Stability Analysis of Genotype by Environment Interaction (GEI Version 0.1.0 Maintainer Muhammad Yaseen Performs general

More information

Introduction to RStudio

Introduction to RStudio Introduction to RStudio Carl Tony Fakhry Jie Chen April 4, 2015 Introduction R is a powerful language and environment for statistical computing and graphics. R is freeware and there is lot of help available

More information

Multiple Variable Analysis

Multiple Variable Analysis Multiple Variable Analysis Revised: 10/11/2017 Summary... 1 Data Input... 3 Analysis Summary... 3 Analysis Options... 4 Scatterplot Matrix... 4 Summary Statistics... 6 Confidence Intervals... 7 Correlations...

More information

Visualizing Data: Basic Plot Types

Visualizing Data: Basic Plot Types Visualizing Data: Basic Plot Types Data Science 101 Stanford University, Department of Statistics Agenda Today s lecture focuses on these basic plot types: bar charts histograms boxplots scatter plots

More information

Information Theory, Statistics, and Decision Trees

Information Theory, Statistics, and Decision Trees Information Theory, Statistics, and Decision Trees Léon Bottou COS 424 4/6/2010 Summary 1. Basic information theory. 2. Decision trees. 3. Information theory and statistics. Léon Bottou 2/31 COS 424 4/6/2010

More information

Chapter 3 - Linear Regression

Chapter 3 - Linear Regression Chapter 3 - Linear Regression Lab Solution 1 Problem 9 First we will read the Auto" data. Note that most datasets referred to in the text are in the R package the authors developed. So we just need to

More information

Advanced Studies in Applied Statistics (WBL), ETHZ Applied Multivariate Statistics Spring 2018, Week 1

Advanced Studies in Applied Statistics (WBL), ETHZ Applied Multivariate Statistics Spring 2018, Week 1 Advanced Studies in Applied Statistics (WBL), ETHZ Applied Multivariate Statistics Spring 2018, Week 1 Lecturer: Beate Sick sickb@ethz.ch Remark: Much of the material have been developed together with

More information

Name. City Weight Model MPG

Name. City Weight Model MPG Name The following table reports the EPA s city miles per gallon rating and the weight (in lbs.) for the sports cars described in Consumer Reports 99 New Car Buying Guide. (The EPA rating for the Audii

More information

R STATISTICAL COMPUTING

R STATISTICAL COMPUTING R STATISTICAL COMPUTING some R Examples Dennis Friday 2 nd and Saturday 3 rd May, 14. Topics covered Vector and Matrix operation. File Operations. Evaluation of Probability Density Functions. Testing of

More information

Data Analytics for Social Science Data inspection and visualisation

Data Analytics for Social Science Data inspection and visualisation Data Analytics for Social Science Data inspection and visualisation Johan A. Elkink School of Politics & International Relations University College Dublin 31 January 2017 Data analysis process R at the

More information

Package ExtremeBounds

Package ExtremeBounds Type Package Title Extreme Bounds Analysis (EBA) Version 0.1.6 Date 2018-01-03 Package ExtremeBounds January 3, 2018 Author Marek Hlavac Maintainer Marek Hlavac

More information

I. Pairwise Display and the PairViz R package

I. Pairwise Display and the PairViz R package raph theoretic methods for ata Visualization. I. Pairwise isplay and the PairViz R package Wayne Oldford based on joint work with atherine Hurley Tutorial 1 The problem an we automatically, yet meaningfully,

More information

Building Multiple Regression Models Interactively. Harold V. Henderson; Paul F. Velleman. Biometrics, Vol. 37, No. 2. (Jun., 1981), pp

Building Multiple Regression Models Interactively. Harold V. Henderson; Paul F. Velleman. Biometrics, Vol. 37, No. 2. (Jun., 1981), pp Building Multiple Regression Models Interactively Harold V. Henderson; Paul F. Velleman Biometrics, Vol. 37, No. 2. (Jun., 1981), pp. 391-411. http://links.jstor.org/sici?sici=0006-341x%28198106%2937%3a2%3c391%3abmrmi%3e2.0.co%3b2-5

More information

How to Write a Good Lab Report

How to Write a Good Lab Report How to Write a Good Lab Report Sample Lab Instruction Experimental Investigation of C/D Introduction: How is the circumference of a circle related to its diameter? In this lab, you design an experiment

More information

lm statistics Chris Parrish

lm statistics Chris Parrish lm statistics Chris Parrish 2017-04-01 Contents s e and R 2 1 experiment1................................................. 2 experiment2................................................. 3 experiment3.................................................

More information

Chapter 7. Association, and Correlation. Scatterplots & Correlation. Scatterplots & Correlation. Stat correlation.

Chapter 7. Association, and Correlation. Scatterplots & Correlation. Scatterplots & Correlation. Stat correlation. Stat 1010 - correlation Chapter 7 n Scatterplots, Association, and Correlation 1 n Here, we see a positive relationship between a bear s age and its neck diameter. As a bear gets older, it tends to have

More information

Eric Pitman Summer Workshop in Computational Science

Eric Pitman Summer Workshop in Computational Science Eric Pitman Summer Workshop in Computational Science Intro to Project Introduction Jeanette Sperhac & Amanda Ruby Introducing the Workshop Project Here's what we'll cover: The story of the HWI protein

More information

Package moderndive. July 6, 2018

Package moderndive. July 6, 2018 Type Package Package moderndive July 6, 2018 Title Tidyverse-Friendly Introductory Linear Regression Version 0.2.0 Maintainer Albert Y. Kim Datasets and wrapper functions for

More information

Average Rate of Change & Slope of a Line MATH 092

Average Rate of Change & Slope of a Line MATH 092 Average Rate of Change Average Rate of Change & Slope of a Line MATH 092 Functions are used to model the way one quantity changes with respect to another quantity. For instance, how does the distance traveled

More information

Task 1: Open ArcMap and activate the Spatial Analyst extension.

Task 1: Open ArcMap and activate the Spatial Analyst extension. Exercise 10 Spatial Analyst The following steps describe the general process that you will follow to complete the exercise. Specific steps will be provided later in the step-by-step instructions component

More information

Solution pigs exercise

Solution pigs exercise Solution pigs exercise Course repeated measurements - R exercise class 2 November 24, 2017 Contents 1 Question 1: Import data 3 1.1 Data management..................................... 3 1.2 Inspection

More information

A Review: Geographic Information Systems & ArcGIS Basics

A Review: Geographic Information Systems & ArcGIS Basics A Review: Geographic Information Systems & ArcGIS Basics Geographic Information Systems Geographic Information Science Why is GIS important and what drives it? Applications of GIS ESRI s ArcGIS: A Review

More information

How many states. Record high temperature

How many states. Record high temperature Record high temperature How many states Class Midpoint Label 94.5 99.5 94.5-99.5 0 97 99.5 104.5 99.5-104.5 2 102 102 104.5 109.5 104.5-109.5 8 107 107 109.5 114.5 109.5-114.5 18 112 112 114.5 119.5 114.5-119.5

More information

Week 1: Intro to R and EDA

Week 1: Intro to R and EDA Statistical Methods APPM 4570/5570, STAT 4000/5000 Populations and Samples 1 Week 1: Intro to R and EDA Introduction to EDA Objective: study of a characteristic (measurable quantity, random variable) for

More information

Experiment 1 Introduction to 191 Lab

Experiment 1 Introduction to 191 Lab PHY191 Experiment 1: Computing and Graphing 8/30/2017 Page 1 1. Introduction Experiment 1 Introduction to 191 Lab In Physics 191 we will make extensive use of Kaleidagraph [Kgraph], a software package

More information

MAC Module 2 Modeling Linear Functions. Rev.S08

MAC Module 2 Modeling Linear Functions. Rev.S08 MAC 1105 Module 2 Modeling Linear Functions Learning Objectives Upon completing this module, you should be able to: 1. Recognize linear equations. 2. Solve linear equations symbolically and graphically.

More information

2013 Eric Pitman Summer Workshop in Computational Science....an introduction to R, statistics, programming, and getting to know datasets

2013 Eric Pitman Summer Workshop in Computational Science....an introduction to R, statistics, programming, and getting to know datasets 2013 Eric Pitman Summer Workshop in Computational Science...an introduction to R, statistics, programming, and getting to know datasets Introducing the Workshop Project Here's what we'll cover: The story

More information

HawkEye Pro. NEW and EXCLUSIVE Professional Diagnostic tool for the workshop or mobile technician. Fully unlocked for ALL Land Rover vehicles*

HawkEye Pro. NEW and EXCLUSIVE Professional Diagnostic tool for the workshop or mobile technician. Fully unlocked for ALL Land Rover vehicles* NEW and EXCLUSIVE Professional Diagnostic tool for the workshop or mobile technician Fully unlocked for ALL Land Rover vehicles* * Exclusions Apply FREELANDER DEFENDER DISCOVERY RANGE ROVER A New diagnostic

More information

Supporting Information for: Total foliar microbiome transplants confer disease resistance to a critically-endangered Hawaiian endemic

Supporting Information for: Total foliar microbiome transplants confer disease resistance to a critically-endangered Hawaiian endemic Supporting Information for: Total foliar microbiome transplants confer disease resistance to a critically-endangered Hawaiian endemic SI Figure 1) Community similarity vs. infection load Bray-Curtis community

More information

Lab 6: Linear Algebra

Lab 6: Linear Algebra 6.1 Introduction Lab 6: Linear Algebra This lab is aimed at demonstrating Python s ability to solve linear algebra problems. At the end of the assignment, you should be able to write code that sets up

More information

/ : Multilevel & Hierarchical Models HW02 Solution

/ : Multilevel & Hierarchical Models HW02 Solution 36-463 / 36-663: Multilevel & Hierarchical Models HW0 Solution September 19, 016 Exercise 1 Part a yieldvec

More information

An area chart emphasizes the trend of each value over time. An area chart also shows the relationship of parts to a whole.

An area chart emphasizes the trend of each value over time. An area chart also shows the relationship of parts to a whole. Excel 2003 Creating a Chart Introduction Page 1 By the end of this lesson, learners should be able to: Identify the parts of a chart Identify different types of charts Create an Embedded Chart Create a

More information

Cheat Sheet: Linear Regression

Cheat Sheet: Linear Regression Cheat Sheet: Linear Regression Measurement and Evaluation of HCC Systems Scenario Use regression if you want to test the simultaneous linear effect of several variables varx1, varx2, on a continuous outcome

More information

Lecture 5. Symbolization and Classification MAP DESIGN: PART I. A picture is worth a thousand words

Lecture 5. Symbolization and Classification MAP DESIGN: PART I. A picture is worth a thousand words Lecture 5 MAP DESIGN: PART I Symbolization and Classification A picture is worth a thousand words Outline Symbolization Types of Maps Classifying Features Visualization Considerations Symbolization Symbolization

More information

Map image from the Atlas of Oregon (2nd. Ed.), Copyright 2001 University of Oregon Press

Map image from the Atlas of Oregon (2nd. Ed.), Copyright 2001 University of Oregon Press Map Layout and Cartographic Design with ArcGIS Desktop Matthew Baker ESRI Educational Services Redlands, CA Education UC 2008 1 Seminar overview General map design principles Working with map elements

More information

Solving Regression. Jordan Boyd-Graber. University of Colorado Boulder LECTURE 12. Slides adapted from Matt Nedrich and Trevor Hastie

Solving Regression. Jordan Boyd-Graber. University of Colorado Boulder LECTURE 12. Slides adapted from Matt Nedrich and Trevor Hastie Solving Regression Jordan Boyd-Graber University of Colorado Boulder LECTURE 12 Slides adapted from Matt Nedrich and Trevor Hastie Jordan Boyd-Graber Boulder Solving Regression 1 of 17 Roadmap We talked

More information

ExtremeBounds: Extreme Bounds Analysis in R

ExtremeBounds: Extreme Bounds Analysis in R ExtremeBounds: Extreme Bounds Analysis in R Marek Hlavac Department of Economics, UWC Adriatic, Duino (Trieste), Italy Central European Labour Studies Institute (CELSI), Bratislava, Slovakia Abstract This

More information

Regression Analysis in R

Regression Analysis in R Regression Analysis in R 1 Purpose The purpose of this activity is to provide you with an understanding of regression analysis and to both develop and apply that knowledge to the use of the R statistical

More information

Math 140 Introductory Statistics

Math 140 Introductory Statistics Math 140 Introductory Statistics Professor Silvia Fernández Chapter 2 Based on the book Statistics in Action by A. Watkins, R. Scheaffer, and G. Cobb. Visualizing Distributions Recall the definition: The

More information

Math 140 Introductory Statistics

Math 140 Introductory Statistics Visualizing Distributions Math 140 Introductory Statistics Professor Silvia Fernández Chapter Based on the book Statistics in Action by A. Watkins, R. Scheaffer, and G. Cobb. Recall the definition: The

More information

Performance of fourth-grade students on an agility test

Performance of fourth-grade students on an agility test Starter Ch. 5 2005 #1a CW Ch. 4: Regression L1 L2 87 88 84 86 83 73 81 67 78 83 65 80 50 78 78? 93? 86? Create a scatterplot Find the equation of the regression line Predict the scores Chapter 5: Understanding

More information

Discriminant Analysis

Discriminant Analysis Chapter 16 Discriminant Analysis A researcher collected data on two external features for two (known) sub-species of an insect. She can use discriminant analysis to find linear combinations of the features

More information

Regression. Jordan Boyd-Graber. University of Colorado Boulder LECTURE 11. Jordan Boyd-Graber Boulder Regression 1 of 19

Regression. Jordan Boyd-Graber. University of Colorado Boulder LECTURE 11. Jordan Boyd-Graber Boulder Regression 1 of 19 Regression Jordan Boyd-Graber University of Colorado Boulder LECTURE 11 Jordan Boyd-Graber Boulder Regression 1 of 19 Content Questions Jordan Boyd-Graber Boulder Regression 2 of 19 Content Questions Jordan

More information

Correlation and Regression

Correlation and Regression Correlation and Regression http://xkcd.com/552/ Review Testing Hypotheses with P-Values Writing Functions Z, T, and χ 2 tests for hypothesis testing Power of different statistical tests using simulation

More information

Performing Map Cartography. using Esri Production Mapping

Performing Map Cartography. using Esri Production Mapping AGENDA Performing Map Cartography Presentation Title using Esri Production Mapping Name of Speaker Company Name Kannan Jayaraman Agenda Introduction What s New in ArcGIS 10.1 ESRI Production Mapping Mapping

More information

Logistic Regression in R. by Kerry Machemer 12/04/2015

Logistic Regression in R. by Kerry Machemer 12/04/2015 Logistic Regression in R by Kerry Machemer 12/04/2015 Linear Regression {y i, x i1,, x ip } Linear Regression y i = dependent variable & x i = independent variable(s) y i = α + β 1 x i1 + + β p x ip +

More information

The Great Lakes Coffee Roasting Company makes 500 cups of coffee per day. Each day they use 20 pounds of coffee beans a day.

The Great Lakes Coffee Roasting Company makes 500 cups of coffee per day. Each day they use 20 pounds of coffee beans a day. auto KNOW 1. The new G-class displacement is 3,982 and the Mercedes-AMG CLS 53 Edition is 2,999. What is the difference between the two displacements???? 983 Solve: D = 2. Volkswagen has 14 cars on the

More information

Expectation-Maximization

Expectation-Maximization Expectation-Maximization Léon Bottou NEC Labs America COS 424 3/9/2010 Agenda Goals Representation Capacity Control Operational Considerations Computational Considerations Classification, clustering, regression,

More information

3D Molecule Viewer of MOGADOC (JavaScript)

3D Molecule Viewer of MOGADOC (JavaScript) 3D Molecule Viewer of MOGADOC (JavaScript) Movement of the Molecule Rotation of the molecule: Use left mouse button to drag. Translation of the molecule: Use right mouse button to drag. Resize the molecule:

More information

Agenda. Introduction Exercise 1 Map Types. Part 1 ArcGIS Information and Organization Part 2 Purpose, Audience & Constraints.

Agenda. Introduction Exercise 1 Map Types. Part 1 ArcGIS Information and Organization Part 2 Purpose, Audience & Constraints. Agenda Introduction Exercise 1 Map Types Part 1 ArcGIS Information and Organization Part 2 Purpose, Audience & Constraints Exercise 2 Map Critique Break Part 3 Basic Cartographic Design Principles Part

More information

Problems and Challenges

Problems and Challenges 2018 Esri Petroleum GIS Conference Problems and Challenges May 9 10, 2018 Houston, Texas George R. Brown Convention Center Disunity of drawing standards and format Large amount of work in Cartography,

More information

42 GEO Metro Japan

42 GEO Metro Japan Statistics 101 106 Lecture 11 (17 November 98) c David Pollard Page 1 Read M&M Chapters 2 and 11 again. Section leaders will decide how much of Chapters 12 and 13 to cover formally; they will assign the

More information

Package covrna. R topics documented: September 7, Type Package

Package covrna. R topics documented: September 7, Type Package Type Package Package covrna September 7, 2018 Title Multivariate Analysis of Transcriptomic Data Version 1.6.0 Author Maintainer This package provides

More information

WISE Regression/Correlation Interactive Lab. Introduction to the WISE Correlation/Regression Applet

WISE Regression/Correlation Interactive Lab. Introduction to the WISE Correlation/Regression Applet WISE Regression/Correlation Interactive Lab Introduction to the WISE Correlation/Regression Applet This tutorial focuses on the logic of regression analysis with special attention given to variance components.

More information

Chapter 5. Presenting Data

Chapter 5. Presenting Data Chapter 5. Presenting Data Copyright McGraw-Hill Education. Permission required for reproduction or display. 5-1 Basic principles of map design 5-2 1 Map Design Process 5-3 The map objective The first

More information

Data Visualization for Policy Advocacy

Data Visualization for Policy Advocacy Data Visualization for Policy Advocacy David Epstein Research Associate Baltimore Neighborhood Indicators Alliance Jacob France Institute University of Baltimore Presentation for the National Low Income

More information

Collecting and Reporting Data

Collecting and Reporting Data Types of Data Data can be classified as qualitative or quantitative: Qualitative data Are observed rather than measured Include written descriptions, videos, photographs, or live observations Examples

More information

CHAPTER 9 DATA DISPLAY AND CARTOGRAPHY

CHAPTER 9 DATA DISPLAY AND CARTOGRAPHY CHAPTER 9 DATA DISPLAY AND CARTOGRAPHY 9.1 Cartographic Representation 9.1.1 Spatial Features and Map Symbols 9.1.2 Use of Color 9.1.3 Data Classification 9.1.4 Generalization Box 9.1 Representations 9.2

More information

Calculating Bond Enthalpies of the Hydrides

Calculating Bond Enthalpies of the Hydrides Proposed Exercise for the General Chemistry Section of the Teaching with Cache Workbook: Calculating Bond Enthalpies of the Hydrides Contributed by James Foresman, Rachel Fogle, and Jeremy Beck, York College

More information

(Re)introduction to Statistics Dan Lizotte

(Re)introduction to Statistics Dan Lizotte (Re)introduction to Statistics Dan Lizotte 2017-01-17 Statistics The systematic collection and arrangement of numerical facts or data of any kind; (also) the branch of science or mathematics concerned

More information

Assignment #13: More Logic

Assignment #13: More Logic Assignment #13: More Logic 12b The height and speed as a function of time of a projectile (such as a thrown ball) launched with an initial speed of 40 at an angle 30 to the horizontal are given by 1 2

More information

Introduction to ArcMap

Introduction to ArcMap Introduction to ArcMap ArcMap ArcMap is a Map-centric GUI tool used to perform map-based tasks Mapping Create maps by working geographically and interactively Display and present Export or print Publish

More information

Electric Field. Lab 4: Part 1: Electric Field from One Point Charge. Name: Group Members: Date: TA s Name:

Electric Field. Lab 4: Part 1: Electric Field from One Point Charge. Name: Group Members: Date: TA s Name: Lab 4: Electric Field Name: Group Members: Date: TA s Name: Simulation link: http://phet.colorado.edu/sims/charges-and-fields/charges-and-fields_en.html Type Charges and Fields PHET in Google and click

More information

Package leiv. R topics documented: February 20, Version Type Package

Package leiv. R topics documented: February 20, Version Type Package Version 2.0-7 Type Package Package leiv February 20, 2015 Title Bivariate Linear Errors-In-Variables Estimation Date 2015-01-11 Maintainer David Leonard Depends R (>= 2.9.0)

More information

Correlation. January 11, 2018

Correlation. January 11, 2018 Correlation January 11, 2018 Contents Correlations The Scattterplot The Pearson correlation The computational raw-score formula Survey data Fun facts about r Sensitivity to outliers Spearman rank-order

More information

Quantum space. Quantum space: designing pages on grids. TUG X 004 Wed 30 Jun Jean-luc Doumont TUG 2010 Wed 30 Jun 2010

Quantum space. Quantum space: designing pages on grids. TUG X 004 Wed 30 Jun Jean-luc Doumont  TUG 2010 Wed 30 Jun 2010 Quantum space Jean-luc Doumont www.principiae.be TUG 2010 Wed 30 Jun 2010 I have found that all ugly things are made by those who strive to make something beautiful, Oscar Wilde I have found that all ugly

More information

Chapter 24: Comparing means

Chapter 24: Comparing means Chapter 4: Comparing means Example: Consumer Reports annually conducts a survey of automobile reliability Approximately 4 million households are surveyed by mail, The 990 survey is summarized in the Figure

More information

ppm = parts per million

ppm = parts per million Nano Silver Silver nanoparticles are rapidly becoming a part of our daily life in the form of cosmetics, food packaging, wound dressings, detergents, and antimicrobial coatings. Ultimately, the nanoparticles

More information

MODULE 11 BIVARIATE EDA - QUANTITATIVE

MODULE 11 BIVARIATE EDA - QUANTITATIVE MODULE 11 BIVARIATE EDA - QUANTITATIVE Contents 11.1 Response and Explanatory................................... 78 11.2 Summaries............................................ 78 11.3 Items to Describe........................................

More information

Generating OLS Results Manually via R

Generating OLS Results Manually via R Generating OLS Results Manually via R Sujan Bandyopadhyay Statistical softwares and packages have made it extremely easy for people to run regression analyses. Packages like lm in R or the reg command

More information

Physical Geography Lab Activity #15

Physical Geography Lab Activity #15 Physical Geography Lab Activity #15 Due date Name Choropleth Maps COR Objective 1 & 7, SLOs 1 & 3 15.1. Introduction Up until this point we have used maps to find locations on the Earth. While they are

More information

Package depth.plot. December 20, 2015

Package depth.plot. December 20, 2015 Package depth.plot December 20, 2015 Type Package Title Multivariate Analogy of Quantiles Version 0.1 Date 2015-12-19 Maintainer Could be used to obtain spatial depths, spatial ranks and outliers of multivariate

More information

Vectors. both a magnitude and a direction. Slide Pearson Education, Inc.

Vectors. both a magnitude and a direction. Slide Pearson Education, Inc. Vectors A quantity that is fully described The velocity vector has both a magnitude and a direction. by a single number is called a scalar quantity (i.e., mass, temperature, volume). A quantity having

More information

Embedded Linux QA How to Not Lie With Statistics

Embedded Linux QA How to Not Lie With Statistics Embedded Linux QA How to Not Lie With Statistics Embedded Linux Conference North America 2018 Prof. Dr. Wolfgang Mauerer Technical University of Applied Sciences Regensburg Siemens AG, Corporate Research

More information

Chapter 3 Assignment

Chapter 3 Assignment Chapter 3 Assignment AP Statistics-Adams Name: Period: Date: 1. This scatterplot shows the overall percentage of on-time arrivals versus overall mishandled baggage per 1000 passengers for the year 2002.

More information

b. Write the rule for a function that has your line as its graph. a. What shadow location would you predict when the flag height is12 feet?

b. Write the rule for a function that has your line as its graph. a. What shadow location would you predict when the flag height is12 feet? Regression and Correlation Shadows On sunny days, every vertical object casts a shadow that is related to its height. The following graph shows data from measurements of flag height and shadow location,

More information

Describing Center: Mean and Median Section 5.4

Describing Center: Mean and Median Section 5.4 Describing Center: Mean and Median Section 5.4 Look at table 5.2 at the right. We are going to make the dotplot of the city gas mileages of midsize cars. How to describe the center of a distribution: x

More information

Cheat Sheet: ANOVA. Scenario. Power analysis. Plotting a line plot and a box plot. Pre-testing assumptions

Cheat Sheet: ANOVA. Scenario. Power analysis. Plotting a line plot and a box plot. Pre-testing assumptions Cheat Sheet: ANOVA Measurement and Evaluation of HCC Systems Scenario Use ANOVA if you want to test the difference in continuous outcome variable vary between multiple levels (A, B, C, ) of a nominal variable

More information

Geographic Information Systems (GIS) - Hardware and software in GIS

Geographic Information Systems (GIS) - Hardware and software in GIS PDHonline Course L153G (5 PDH) Geographic Information Systems (GIS) - Hardware and software in GIS Instructor: Steve Ramroop, Ph.D. 2012 PDH Online PDH Center 5272 Meadow Estates Drive Fairfax, VA 22030-6658

More information

Your work from these three exercises will be due Thursday, March 2 at class time.

Your work from these three exercises will be due Thursday, March 2 at class time. GEO231_week5_2012 GEO231, February 23, 2012 Today s class will consist of three separate parts: 1) Introduction to working with a compass 2) Continued work with spreadsheets 3) Introduction to surfer software

More information

Univariate Descriptive Statistics for One Sample

Univariate Descriptive Statistics for One Sample Department of Psychology and Human Development Vanderbilt University 1 Introduction 2 3 4 5 6 7 8 Introduction Our first step in descriptive statistics is to characterize the data in a single group of

More information

Overview of the spnet package

Overview of the spnet package Overview of the spnet package Emmanuel Rousseaux, Marion Deville and Gilbert Ritschard 2015.07.29 Contents Introduction................................................. 2 Gallery...................................................

More information

Package G2Sd. R topics documented: December 7, Type Package

Package G2Sd. R topics documented: December 7, Type Package Type Package Package G2Sd December 7, 2015 Title Grain-Size Statistics and of Sediment Version 2.1.5 Date 2015-12-7 Depends R (>= 3.0.2) Imports shiny, xlsx, rjava, xlsxjars, reshape2, ggplot2, stats,

More information

Newton s Cooling Model in Matlab and the Cooling Project!

Newton s Cooling Model in Matlab and the Cooling Project! Newton s Cooling Model in Matlab and the Cooling Project! James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University March 10, 2014 Outline Your Newton

More information

Harvard Life Science Outreach December 7, 2017 Measuring ecosystem carbon fluxes using eddy covariance data ACTIVITIES I. NAME THAT ECOSYSTEM!

Harvard Life Science Outreach December 7, 2017 Measuring ecosystem carbon fluxes using eddy covariance data ACTIVITIES I. NAME THAT ECOSYSTEM! Harvard Life Science Outreach December 7, 2017 Measuring ecosystem carbon fluxes using eddy covariance data ACTIVITIES I. NAME THAT ECOSYSTEM! Objective: Distinguish ecosystems (tropical forest vs. temperate

More information

S95 INCOME-TESTED ASSISTANCE RECONCILIATION WORKSHEET (V3.1MF)

S95 INCOME-TESTED ASSISTANCE RECONCILIATION WORKSHEET (V3.1MF) Welcome! Here's your reconciliation Quick-Start. Please read all five steps before you get started. 1 2 3 Excel 2003? Are you using software other than Microsoft Excel 2003? Say what? Here are the concepts

More information

Introduction After reviewing the classification of continental margins (not plate margins) in your textbook, answer the following questions:

Introduction After reviewing the classification of continental margins (not plate margins) in your textbook, answer the following questions: Investigating the continental margins of North America using GeoMapApp. This exercise is designed to familiarize you with the features of continental margins. Through the analysis of color-coded bathymetric

More information

Simple linear regression: estimation, diagnostics, prediction

Simple linear regression: estimation, diagnostics, prediction UPPSALA UNIVERSITY Department of Mathematics Mathematical statistics Regression and Analysis of Variance Autumn 2015 COMPUTER SESSION 1: Regression In the first computer exercise we will study the following

More information

1.3 Distance and Midpoint Formulas

1.3 Distance and Midpoint Formulas Graduate Teacher Department of Mathematics San Diego State University Dynamical Systems Program August 29, 2011 In mathematics, a theorem is a statement that has been proven on the basis of previously

More information

2/3. Activity 3: Adding and Subtracting Unlike Proper Fractions: (Answer all questions using correct spelling and grammar.)

2/3. Activity 3: Adding and Subtracting Unlike Proper Fractions: (Answer all questions using correct spelling and grammar.) Activity : Adding and Subtracting Unlike Proper Fractions: (Answer all questions using correct spelling and grammar.) The Unit Grid will be introduced for working with Unlike Proper Fractions. We will

More information

Theory, Concepts and Terminology

Theory, Concepts and Terminology GIS Workshop: Theory, Concepts and Terminology 1 Theory, Concepts and Terminology Suggestion: Have Maptitude with a map open on computer so that we can refer to it for specific menu and interface items.

More information