Skip to Content
R 语言经典实例(原书第 2 版)
book

R 语言经典实例(原书第 2 版)

by J.D. Long, Paul Teetor
June 2020
Beginner to intermediate
522 pages
9h 6m
Chinese
China Machine Press
Content preview from R 语言经典实例(原书第 2 版)
436
14
而不能知道哪一个相关系数显著。
p
值为 0.8 表示没有检测到第二个时间序列中的自相关。
Box.test 函数还可以执行 Ljung-Box 检验,对于小样本执行该检验较好。该检验计算
一个
p
值,其解释与 Box-Pierce 检验
p
值的解释相同:
Box.test(ts, type = "Ljung-Box")
14.14.4 另请参阅
参见 14.13 节以绘制自相关函数,它可以可视化地查看自相关函数。
14.15 绘制偏自相关函数
14.15.1 问题
绘制时间序列的偏自相关函数(Partial AutoCorrelation FunctionPACF)。
14.15.2 解决方案
使用 pacf 函数:
pacf(
ts
)
14.15.3 讨论
偏自相关函数是另一种用于揭示时间序列中内部关系的工具。然而,它的解释远不如自
相关函数的解释来的直观。我们将偏相关的数学定义留给统计学教科书。在这里,我们
只是说两个随机变量
X
Y
之间的偏相关是在剔除了由于其他变量导致的
X
Y
的相关
性后剩余的
X
Y
的相关性。对于时间序列而言,
k
阶偏自相关函数是考虑相隔
k
步的
数据点,在剔除了这
k
步之间的数据导致的相关性后的相关性。
偏自相关函数可以帮助识别 ARIMA 模型中的自回归(AutoRegressionAR)系数的个
数。以下示例显示了 14.13 节中使用的两个时间序列的 PACF。其中一个序列具有偏自
相关性,而另一个则没有。超出虚线的偏自相关函数在统计上是显著的。在第一个时间
序列(见图 14-7 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)

机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)

Aurélien Géron
大规模数据分析和建模:基于 Spark 与 R

大规模数据分析和建模:基于 Spark 与 R

Javier Luraschi, Kevin Kuo, Edgar Ruiz
管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey

Publisher Resources

ISBN: 9787111656814