Two Sample Test
Can use the htest functions
- But needtn check equal Brianna mumpon rstl
> mmqwend.iean.expend.obese]
' for camparisan of two vectors
>uest1expendlean. expandahese, vanequalRUE]
>thestiexpendlean, amendmhse, vanequal=FAlSEi
> ttestiexpendl
Graphics
- Example 3: Scatterplot matrix
> plotcfw_USArrests)
> pairs(USArrests)
Data Exploration
- Data Analysis always begins with an inspection ofthe
dataframe (aka. The dataset).
Use:
> headidamset)
>3trfdalaset
- To calculate basic descriptive stati
10/26/2016
R Basics R Basics
- Attached and detax: you can make R lock for objects amongthe Mama Data Entry: Manual Entry
in agiven data frame.
>plathuaenSblmd.gluwsejhuesenSShDrtvelodty)
>anam(thuesen; snatch"; W1 = C(22,25)
>p|oblaad.glucose,shortveioci
Statistical Packages
STAT 1301/2300
R Lecture 1: R Basics
Instructor: Christina Zigler
Downloading R
- CRAN is a network of ftp and web servers around
the world that store identical, uputodate,
versions of code and documentation for R. Please
use the CRAN
Statistical Packages
STAT 1301/2300
R Lecture 2: Data Exploration 8:. Simple
Inference for Continuous Data
Instructor: Christina Zigler
R Graphics
- It is quite common in statistical graphing to want
to create a plot that is different from the default.
Yo
R Basics
- Dal: Frames: correspond to SAS damseL-i. List of vectors andIor factors afne
same length ihat are related across' so that data in the same position came
from the same 'case. it also has a unique set of raw nama.
> 'd <- damjramen'takepmjntakepo
R Basics
- Can perform calculations with vectors just like
ordinary numbers, as long as they are the same
length.
> height < c(1.75, 1.80, 1.85, 1.90, 1.74, 1.91
> bmi < weight/heightnz
> bmi
E1] 19.59134 22.22222 20.93664 24.93075
31.37799 19.73530
R Bas
R Basics
- List object: in current It sion
> Isl)
- Delete some ofthe objects
> rmlheightweight)
. Return cement of current working directory
mm
v Return path qfcurrent working directory
> getde)
v Change nunent working directory
setwdl
R Basics
- Package
Data Exploration
' QO. Plot: to directly compare data distribution with
theoretical distribution
> qqnormlnumericxector)
Exercise: plot 10:) random normal numbers
- Box plots: usefui for side by side comparisons
> boxplotuuiSigfl)
> boxplotoguulsigfl
> he
9/12/2016
_ . lnitia ' '
Read m Data file | Examination of Data
_ - Summary statistics:
- Issues to consrder: _ Mean, median, mode
How many variables (columns)? . . . . .
- which are chammr and which are numeric? . Spread: variance, standard deviation, i
Statistical Packages
STAT 1301/2300
Lecture 2: Data Description and Simple
Inference
Instructor: Christina Zigler
Commands Covered in Lecture 2
- proc univoriute:
Central tendency and variability
Condence intervals for mean, std, varianCe
Test; for nor
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by Ca
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by Ca
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by Ca
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by Ca
9/12/2016
Research Question 2 Research Question 2 (cont)
- Is there a different in mortality or hardness by Is there a difference in mortality or hardness
region? (north vs. south) by region? (north vs. south)
Visually examine the data by region Perform