Skip to Content
R Cookbook
book

R Cookbook

by JD Long, Paul Titer, Jee -Won Lee
May 2022
Beginner to intermediate
667 pages
16h 17m
Korean
Insight
Content preview from R Cookbook
R
286
9장 일반 통계
󺠣󽴔󻨛󻨓󻇃󺋿
nortest
패키지를 설치하는 방법에 대해서는 레시피
3
.
10
을 참고하라.
9.14
󺲿󽴘󽴙󽴔󺅏󻳤
󻀇󻳫
여러분의 데이터는 이진값들로 이루어진 수열이다. 다시 말하면, 예-아니오,
0
-
1
, 참-
거짓 등 서로 다른 두 가지 값으로 이루어진 데이터다. 여러분은 이 수열이 랜덤인지
알고 싶다.
󼩃󺅿󼄔
tseries
패키지는
runs.test
함수를 가지고 있는데, 이 함수는 수열의 랜덤성을 확인
한다. 그러려면 수열은 두 가지 수준으로 된 요인이어야 한다.
library(tseries)
runs.test(as.factor(
s
))
runs.test
함수는
p
-값을 보고한다. 통상적으로
0
.
05
보다 작은
p
-값은 그 수열이 랜
덤이 아닐 개연성이 큰 반면,
0
.
05
를 넘는
p
-값은 그러한 증거를 제시하지 못한다.
󺙋󻰧
‘런(
run
)’은 모두
1
또는 모두
0
처럼, 동일한 값들로 이루어진 부분수열이다. 랜덤한
수열은 런이 너무 많지 않으면서, 제대로 섞여 있어야 한다. 런이 너무 ‘적어도’ 안 된
다. 정확히 하나씩 번갈아 나오는 값들로 이루어진 수열(
0
,
1
,
0
,
1
,
0
,
1
,
...
)에는 런
이 없는데, 그걸 랜덤이라고 말할 수 있을까?
runs.test
함수는 여러분의 수열에 있는 런들의 횟수를 확인해 준다. 만약 런이 너
무 많거나 ...
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

R Cookbook

R Cookbook

Paul Teetor
R Graphics Cookbook

R Graphics Cookbook

Winston Chang
R Cookbook, 2nd Edition

R Cookbook, 2nd Edition

JD Long, Paul Teetor

Publisher Resources

ISBN: 9788966262984