没有合适的资源?快使用搜索试试~ 我知道了~
首页An Introduction to R Software for Statistical Modelling & Computing
An Introduction to R Software for Statistical Modelling & Compu...
5星 · 超过95%的资源 需积分: 12 14 下载量 137 浏览量
更新于2023-03-03
评论
收藏 4.28MB PDF 举报
An Introduction to R Software for Statistical Modelling & Computing 一个开放的数据挖掘软件的使用说明
资源详情
资源评论
资源推荐
CSIRO Mathematical and Information Sciences
An Introduc tion to R:
Software for Statist ical Modelling & Com puting
Course Materials and Exer cises
Petra Kuhnert and Bill Venables
CSIRO Mathematical and Information Sciences
Cleveland, Australia
c
CSIRO Australia, 2005
c
CSIRO Australia 2005
All rights are reserved. Permission to reproduce individual copies of this document for
personal use is granted. Redistribution in any other form is prohibited.
The information contained in this document is based on a number of technical, circum-
stantial or otherwise specified assumptions and parameters. The user must make its own
analysis and assessment of the suitability of the information or material contained in or
generated from the use of the document. To the extent permitted by law. CSIRO excludes
all liability to any party for any expenses, losses, damages and costs arising directly or
indirectly from using this document.
Contents
An Elementary Introduction to R 11
Whirlwind Tour of R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Example 1: The Whiteside Insulation Data . . . . . . . . . . . . . . . . . . . . 13
Example 2: Cars and Fuel Economy . . . . . . . . . . . . . . . . . . . . . . . 15
Example 3: Images of Volcanic Activity . . . . . . . . . . . . . . . . . . . . . 19
Example 4: Coastline a nd Maps . . . . . . . . . . . . . . . . . . . . . . . . . . 19
R a n d the Tinn-R Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
R a n d the Tinn-R Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Obtaining R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
R Manuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
R Reference Material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
How Does R Work and How Do I Work with it? . . . . . . . . . . . . . . . . 23
Installing and Loading R Packages . . . . . . . . . . . . . . . . . . . . . . . . 25
Customisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
The Rprofile.site file: An Example . . . . . . . . . . . . . . . . . . . . . 27
What Editor can I use with R . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
The Tinn-R Editor: A Dem onstration . . . . . . . . . . . . . . . . . . . . . . . 28
The R Language: Basic Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
The R Language: Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
The R Language: Missing, Indefinite and Infinite Values . . . . . . . . . . . . 37
Distributions and Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
R Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3
4
Data Objects in R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Creating Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Creating Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Manipulating Data: An Example . . . . . . . . . . . . . . . . . . . . . . . . . 51
Accessing E lements of a Vector or Matrix . . . . . . . . . . . . . . . . . . . . 53
Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Example: Cars93 Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Graphics: An Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Anatomy of a Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Overview of Graphics Functions . . . . . . . . . . . . . . . . . . . . . . . . . 64
Displaying Univariate Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Working with Time Series Objects . . . . . . . . . . . . . . . . . . . . . . . . . 76
Displaying Bivariate Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Labelling and Documenting Plots . . . . . . . . . . . . . . . . . . . . . . . . . 85
Displaying Higher Dimensional Data . . . . . . . . . . . . . . . . . . . . . . 86
Manipulating Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Dates and Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Split . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
with, subset and transform Functions . . . . . . . . . . . . . . . . . . . . 102
Vectorised Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Classical Linear Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Statistical Models in R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Model Formulae . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Generic Functions for Inference . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Example: The Janka Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Example: Iowa Wheat Yield Data . . . . . . . . . . . . . . . . . . . . . . . . . 117
A Flexible R egression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
c
CSIRO Australia, 2005 Course Materials and Exercises
5
Example: Petroleum Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Non-Linear Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Example: Stormer Viscometer Data . . . . . . . . . . . . . . . . . . . . . . . . 129
Overview and Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Fitting the Model and Looking at the Results . . . . . . . . . . . . . . . . . . 130
Self Starting Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Example: Muscle Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Final Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Generalized Linea r Modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Example: Budworm Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Example: Low Birth Weight . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
GLM Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
The Negative Binomial Distribution . . . . . . . . . . . . . . . . . . . . . . . 157
Multinomial Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Example: Copenhagen Housing Data . . . . . . . . . . . . . . . . . . . . . . 163
Proportional Odds Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Generalized Ad ditive Models: An Introduction . . . . . . . . . . . . . . . . . . . . 169
Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Example: The Iowa Wheat Yield Data . . . . . . . . . . . . . . . . . . . . . . 1 70
Example: Rock Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Advanced Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Lattice Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 9
Example: Whiteside Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Changing Trellis Parameters & Adding Keys . . . . . . . . . . . . . . . . . . 1 83
Example: Stormer Viscometer Data . . . . . . . . . . . . . . . . . . . . . . . . 185
Adding Fitted Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Output Over Several Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Example: Volcanos in New Zealand . . . . . . . . . . . . . . . . . . . . . . . 191
c
CSIRO Australia, 2005 Course Materials and Exercises
剩余363页未读,继续阅读
mfwan198110
- 粉丝: 1
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- stc12c5a60s2 例程
- Android通过全局变量传递数据
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论2