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
412
11장 선형회귀와 분산분석
#> 2.5 % 97.5 %
#> (Intercept) -3.90 6.47
#> x1 -2.58 6.24
#> x2 4.67 5.17
󺙋󻰧
“해결책”은
y
=
b
0
+
b
1
(
x
1
)
i
+
b
2
(
x
2
)
i
+
f
i
모형을 사용한다.
confint
함수는 절편(
b
0
),
x
1
의 계수(
b
1
),
x
2
의 계수(
b
2
)에 대한 신뢰구간을 반환해 준다.
confint(m)
#> 2.5 % 97.5 %
#> (Intercept) -3.90 6.47
#> x1 -2.58 6.24
#> x2 4.67 5.17
기본 설정으로
confint
95
%의 신뢰수준을 사용한다. 다른 수준을 선택하려면
level
인자를 사용하면 된다.
confint(m, level = 0.99)
#> 0.5 % 99.5 %
#> (Intercept) -5.72 8.28
#> x1 -4.12 7.79
#> x2 4.58 5.26
󺠣󽴔󻨛󻨓󻇃󺋿
arm
패키지의
coefplot
함수로 회귀계수들의 신뢰구간을 그래프로 그릴 수 있다.
11.15
󼭛󺊏󽴔󻱣󼃷󽴔󺋇󺱧󼧓󽴔󺋇󺹻󺋿
󻀇󻳫
회귀 잔차를 시각적으로 보고 싶다.
󼩃󺅿󼄔
broom
을 사용해서 모형의 결과를 데이터 프레임에 넣고,
ggplot
으로 모형 객체의 그
래프를 그릴 수 있다.
가능한 그래프들 중 잔차 그래프를 선택해서 모형 객체를 그리면 된다.
m <- lm(y ~ ...
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