Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
P. 1
Statistical Analysis With R - A Quick Start

Statistical Analysis With R - A Quick Start

Ratings: (0)|Views: 85|Likes:

More info:

Published by: Ponlapat Yonglitthipagon on Nov 24, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

10/20/2014

pdf

text

original

 
Statistical Analysis with R
- a quick start -
O
LEG
N
ENADI
´
C
, W
ALTER
Z
UCCHINI
September 2004
 
Contents
1 An Introduction to R 3
1.1 Downloading and Installing
R
. . . . . . . . . . . . . . . . . . . . .31.2 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31.3 Statistical Distributions . . . . . . . . . . . . . . . . . . . . . . . . . .81.4 Writing Custom
R
Functions . . . . . . . . . . . . . . . . . . . . . . .10
2 Linear Models 12
2.1 Fitting Linear Models in
R
. . . . . . . . . . . . . . . . . . . . . . . .122.2 Generalized Linear Models . . . . . . . . . . . . . . . . . . . . . . .202.3 Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
3 Time Series Analysis 23
3.1 Classical Decomposition . . . . . . . . . . . . . . . . . . . . . . . . .233.2 Exponential Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . .293.3 ARIMAModels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
4 Advanced Graphics 36
4.1 Customizing Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364.2 Mathematical Annotations . . . . . . . . . . . . . . . . . . . . . . . .394.3 Three-Dimensional Plots . . . . . . . . . . . . . . . . . . . . . . . . .414.4 RGL: 3D Visualization in
R
using OpenGL . . . . . . . . . . . . . .43
A Rfunctions 44
A.1 Mathematical Expressions (
expression()
) . . . . . . . . . . . . .44A.2 The RGL Functionset . . . . . . . . . . . . . . . . . . . . . . . . . . .461
 
Preface
This introduction to the freely available statistical software package
R
is primar-ily intended for people already familiar with common statistical concepts. Thusthe statistical methods used to illustrate the package are not explained in de-tail. These notes are not meant to be a reference manual, but rather a hands-onintroduction for statisticians who are unfamiliar with
R
. The intention is to of-fer just enough material to get started, to motivate beginners by illustrating thepower and flexibility of 
R
, and to show how simply it enables the user to carryout sophisticated statistical computations and to produce high-quality graphicaldisplays.The notes comprise four sections, which build on each other and should there-fore be read sequentially. The first section
(An Introduction to 
R
)
introduces themost basic concepts. Occasionally things are simplified and restricted to the min-imum background in order to avoid obscuring the main ideas by offering toomuch detail. The second and the third section
(Linear Models
and
Time SeriesAnalysis)
illustrate some standard
R
commands pertaining to these two commonstatistical topics. The fourth section
(Advanced Graphics)
covers some of the ex-cellent graphical capabilities of the package.Throughout the text
typewriter
font is used for annotating
R
functions andoptions.
R
functions are given with brackets, e.g.
plot()
while options aretyped in italic typewriter font, e.g.
xlab="x label"
.
R
commands which areentered by the user are printed in red and the output from
R
is printed in blue.The datasets used are available from the URI
http://134.76.173.220/R workshop
.An efficient (and enjoyable) way of beginning to master
R
is to actively use it,to experiment with it’s functions and options and to write own functions. It isnot necessary to study lengthy manuals in order to get started; one can get use-ful work done almost immediately. Thus, the main goal of this introduction is tomotivate the reader to actively explore
R
. Good luck!2

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->