Download presentation
Presentation is loading. Please wait.
Published bySophie Robinson Modified over 9 years ago
1
R Example Descriptive Statistics Frequency and Histogram Diagrams Standard Deviation
2
Excel Bar Histogram Box / CI’s Line Scatter Pie
3
Correlation Matrix BoxplotHistogram Scatterplot
4
> getwd() [1] "C:/Users/johnp_000/Documents" > setwd()
5
Revisiting the Height Dataset
6
Dataset Input Function Filename Object
7
str() Data Types: Numbers and Factors/Categorical
8
summary() ece
9
Frequency Distribution, Histogram hist(h$childHeight)
10
Area = 1 Density Plot plot(density(h$childHeight))
11
hist(h$childHeight,freq=F, breaks =25, ylim = c(0,0.14)) curve(dnorm(x, mean=mean(h$childHeight), sd=sd(h$childHeight)), col="red", add=T) Bimodal: two modes Mode, Bimodal
12
Composite Charts
13
Boxplot (Box and Whiskers) 50th 75th 25th
14
Boxplot Options BasicWith Mean Split Data Among Predictors
15
Correlation Covariance is High: r ~1 Covariance is Low: r ~0
16
Galton: Height Dataset cor(h) Error in cor(h) : 'x' must be numeric Initial workaround: Create data.frame without the Factors cor() function does not handle Factors Later we will RECODE the variable into a 0, 1 Excel correl() does not either Data Types: Numbers and Factors/Categorical
17
Correlation Matrix for Continuous Variables chart.Correlation(num2) PerformanceAnalytics package
18
Correlations Matrix: Both Types library(car) scatterplotMatrix(heights)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.