第3版在保留前一版内容框架的基础上,对部分内容和R代码做了修改,并增加了部分新的内容。全书共11章,包括数据的可视化等描述性分析方法、推断方法以及实际中常用的一些统计方法等。本书是由R语言实现全部例题计算与分析的统计学教材,书中例题的解答和图表均给出了R的详细代码和结果。书中使用的R版本是3.5.1。本书可作为高等院校统计学专业本科生的基础课程教材,也可作为经济管理类专业及部分理、工、农、林、医药等专业的统计学教材使用,对实际数据分析人员也有参考价值。
Author(s): 贾俊平
Series: 基于R应用的统计学丛书
Edition: 3
Publisher: 中国人民大学出版社
Year: 2019
Language: Chinese
Pages: 347
目录
第 1 章 数据与 R······················ 1
1.1 数据与统计学 ····················· 1
1.1.1 什么是统计学················· 1
1.1.2 变量与数据 ··················· 2
1.1.3 数据的来源 ··················· 3
1.2 R 的初步使用 ····················· 4
1.2.1 R 的下载与安装·············· 4
1.2.2 对象赋值与运行 ·············· 5
1.2.3 查看帮助文件················· 6
1.2.4 包的安装与加载 ·············· 7
1.3 创建 R 数据 ··················· 7
1.3.1 在 R 中录入数据 ············· 8
1.3.2 数据读取和保存 ·············· 9
1.3.3 数据使用和编辑 ·············· 12
1.3.4 数据类型的转换 ·············· 19
1.3.5 生成随机数 ··················· 20
1.3.6 数据抽样与筛选 ·············· 21
1.4 编写 R 函数 ······················· 24
1.5 图形控制和布局 ·················· 25
1.5.1 par 函数 ······················ 25
1.5.2 layout 函数··················· 27
习题························· 29
第 2 章 数据的可视化 ················ 30
2.1 数据的频数分布 ·················· 30
2.1.1 类别数据的频数分布 ········· 30
2.1.2 数值数据的类别化············ 37
2.2 类别数据的可视化 ··············· 40
2.2.1 条形图及其变种 ·············· 40
2.2.2 饼图及其变种················· 46
2.3 数值数据的可视化 ··············· 48
2.3.1 展示数据分布的图形 ········· 48
2.3.2 展示变量间关系的图形······· 65
2.3.3 比较多样本相似性的图形 ···· 72
2.3.4 时间序列图 ··················· 79
2.4 洛伦茨曲线 ························ 81
2.5 ggplot2 绘图的一个示例 ········ 84
2.6 使用图表的注意事项 ············ 86
习题···························· 87
第 3 章 数据的描述统计量··········· 91
3.1 描述水平的统计量 ··············· 91
3.1.1 平均数 ························ 91
3.1.2 分位数 ························ 93
3.1.3 众数··························· 95
3.2 描述差异的统计量 ··············· 96
3.2.1 极差和四分位差 ·············· 96
3.2.2 方差和标准差················· 97
3.2.3 变异系数······················ 98
3.2.4 标准分数······················ 100
3.3 描述分布形状的统计量·········· 101
3.3.1 偏度系数······················ 101
3.3.2 峰度系数······················ 102
3.4 数据的综合描述 ·················· 103
3.4.1 几个常用的 R 函数··········· 103
3.4.2 一个综合描述的例子 ········· 105
习题····························· 111
第 4 章 随机变量的概率分布········ 114
4.1 什么是概率 ························ 114
4.2 随机变量的概率分布 ············ 115
4.2.1 随机变量及其概括性度量 ···· 115
4.2.2 随机变量的概率分布 ········· 117
4.2.3 其他几个重要的统计分布 ···· 123
4.3 样本统计量的概率分布·········· 128
4.3.1 统计量及其分布 ·············· 128
4.3.2 样本均值的分布 ·············· 129
4.3.3 其他统计量的分布············ 132
4.3.4 统计量的标准误 ·············· 134
习题···························· 136
第 5 章 参数估计 ······················ 137
5.1 参数估计的原理 ·················· 137
5.1.1 点估计与区间估计············ 137
5.1.2 评量估计量的标准············ 141
5.2 总体均值的区间估计 ············ 145
5.2.1 一个总体均值的估计 ········· 145
5.2.2 两个总体均值之差的估计 ···· 148
5.3 总体比例的区间估计 ············ 152
5.3.1 一个总体比例的估计 ········· 152
5.3.2 两个总体比例之差的估计 ···· 155
5.4 总体方差的区间估计 ············ 157
5.4.1 一个总体方差的估计 ········· 157
5.4.2 两个总体方差比的估计······· 158
习题······························ 159
第 6 章 假设检验 ······················ 162
6.1 假设检验的原理 ·················· 162
6.1.1 提出假设······················ 162
6.1.2 做出决策······················ 164
6.1.3 表述结果······················ 167
6.1.4 效应量 ························ 168
6.2 总体均值的检验 ·················· 168
6.2.1 一个总体均值的检验 ········· 168
6.2.2 两个总体均值之差的检验 ···· 172
6.3 总体比例的检验 ·················· 178
6.3.1 一个总体比例的检验 ········· 178
6.3.2 两个总体比例之差的检验 ···· 179
6.4 总体方差的检验 ·················· 181
6.4.1 一个总体方差的检验 ········· 181
6.4.2 两个总体方差比的检验······· 183
6.5 非参数检验 ························ 183
6.5.1 总体分布的检验 ·············· 184
6.5.2 总体位置参数的检验 ········· 188
习题····························· 193
第 7 章 类别变量分析 ················ 197
7.1 一个类别变量的拟合优度
检验 ································· 197
7.1.1 期望频数相等················· 197
7.1.2 期望频数不等················· 199
7.2 两个类别变量的独立性检验···· 201
7.2.1 列联表与 χ
2 独立性检验····· 201
7.2.2 应用 χ
2 检验的注意事项····· 203
7.3 两个类别变量的相关性度量···· 204
7.3.1 ϕ 系数和 Cramer’s V 系数·· 204
7.3.2 列联系数······················ 205
习题··························· 206
第 8 章 方差分析 ······················ 208
8.1 方差分析的原理 ·················· 208
8.1.1 什么是方差分析 ·············· 208
8.1.2 误差分解······················ 209
8.2 单因子方差分析 ·················· 210
8.2.1 数学模型······················ 210
8.2.2 效应检验······················ 211
8.2.3 效应量分析 ··················· 215
8.2.4 多重比较······················ 215
8.3 双因子方差分析 ·················· 221
8.3.1 数学模型······················ 221
8.3.2 主效应分析 ··················· 222
8.3.3 交互效应分析················· 228
8.4 方差分析的假定及其检验······· 233
8.4.1 正态性检验 ··················· 233
8.4.2 方差齐性检验················· 235
8.5 单因子方差分析的非参数
方法 ··························· 239
习题······························· 241
第 9 章 一元线性回归 ················ 244
9.1 确定变量间的关系 ··············· 244
9.1.1 变量间的关系················· 244
9.1.2 相关关系的描述 ·············· 245
9.1.3 关系强度的度量 ·············· 247
9.2 模型估计和检验 ·················· 249
9.2.1 回归模型与回归方程 ········· 249
9.2.2 参数的最小二乘估计 ········· 250
9.2.3 模型的拟合优度 ·············· 253
9.2.4 模型的显著性检验············ 255
9.3 利用回归方程进行预测·········· 257
9.3.1 均值的置信区间 ·············· 257
9.3.2 个别值的预测区间············ 258
9.4 回归模型的诊断 ·················· 261
9.4.1 残差与残差图················· 261
9.4.2 检验模型假定················· 263
习题···························· 266
第 10 章 多元线性回归··············· 269
10.1 多元线性回归模型及其参数
估计······················ 269
10.1.1 回归模型与回归方程········ 269
10.1.2 参数的最小二乘估计········ 270
10.2 拟合优度和显著性检验 ········ 274
10.2.1 模型的拟合优度············· 274
10.2.2 模型的显著性检验 ·········· 276
10.2.3 模型诊断 ···················· 277
10.3 多重共线性及其处理 ··········· 279
10.3.1 多重共线性及其识别········ 280
10.3.2 变量选择与逐步回归········ 282
10.4 相对重要性和模型比较 ········ 286
10.4.1 自变量的相对重要性········ 286
10.4.2 模型比较 ···················· 288
10.5 利用回归方程进行预测 ········ 290
10.6 哑变量回归······················· 292
10.6.1 在模型中引入哑变量········ 292
10.6.2 含有一个哑变量的回归 ····· 292
习题······················ 299
第 11 章 时间序列预测··············· 302
11.1 时间序列的成分和预测方法 ·· 302
11.1.1 时间序列的成分············· 302
11.1.2 预测方法的选择与评估 ····· 305
11.2 指数平滑预测··············· 306
11.2.1 指数平滑模型的一般表达··· 306
11.2.2 简单指数平滑预测 ·········· 308
11.2.3 Holt 指数平滑预测·········· 311
11.2.4 Winter 指数平滑预测······· 313
11.3 趋势外推预测···················· 316
11.3.1 线性趋势预测 ··············· 317
11.3.2 非线性趋势预测············· 319
11.4 分解预测·························· 325
11.5 时间序列平滑···················· 329
习题····················· 332
附录 1 求置信区间的自助法·········· 335
附录 2 本书使用的 R 函数 ··········· 343
参考书目 ··················· 346