Stat 1301/2300 Statistical Packages
Brittney Lojas /Fall 2016
Homework Report 8
Exercise 5.1
> react
> qqnorm(react)
The values of the react data set do look reasonably normally distributed. There are two outliers in the
distribution, one at each end.
> t
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
Stats Homework 4
Treating Hypertension
Ob biofee
s d
dru
g
die
t
bp cell
1 P
X
N
17 XPN
0
2 P
X
N
17 XPN
5
3 P
X
N
16 XPN
5
4 P
X
N
18 XPN
0
5 P
X
N
16 XPN
0
6 P
X
N
15 XPN
8
7 P
X
Y
16 XPY
1
8 P
X
Y
17 XPY
3
9 P
X
Y
15 XPY
7
10 P
X
Y
15 XPY
2
11 P
X
Y
18
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