SlideShare a Scribd company logo
R 기초 – 평균차이검정,
  일원배치분산분석

   한림대학교 금융정보통계학과
       이 윤 환
평균차이 검정
t.test(
   x,
   y = NULL,
   alternative = c("two.sided", "less", "greater"),
   mu = 0,
   paired = FALSE,
   var.equal = FALSE,
   conf.level = 0.95
)




 간호 통계                                                이윤환, yoonani72@gmail.com
평균차이 검정

 > setwd("c://r_nur")
 > delivery <- read.table("delivery.txt", header=TRUE)
 > attach(delivery)
 > t.test(time[type==2], time[type==1], var.equal=TRUE)

        Welch Two Sample t-test

 data: time[type == 2] and time[type == 1]
 t = 2.3003, df = 24.777, p-value = 0.03013
 alternative hypothesis: true difference in means is not equal to 0
 95 percent confidence interval:
 0.1999658 3.6358431
 sample estimates:
 mean of x mean of y
 10.473529 8.555625



간호 통계                                                 이윤환, yoonani72@gmail.com
일원배치 분산분석
   > one.way <- read.table("fuel.txt", header=T)
   > attach(one.way)
   > Trt <- factor(trt)
   > one.way.anova <- aov(y ~ Trt)
   > summary.aov(one.way.anova)
   > model.tables(one.way.anova)
   > Tukey <- TukeyHSD(one.way.anova)
   > print(Tukey,3)
   > plot(Tukey)




                      R을 활용한 통계적 개념, 방법, 응용 – 허명회 저 중
간호 통계                                   이윤환, yoonani72@gmail.com
분산분석표

                       Df          Sum Sq                  Mean Sq          F value   Pr(>F)
Trt                     3          1636.5                  545.5            5.4063    0.006876 **
Residuals              20          2018.0                  100.9
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1




   간호 통계                                                             이윤환, yoonani72@gmail.com
다중 비교

        Tukey multiple comparisons of means
          95% family-wise confidence level

        Fit: aov(formula = y ~ Trt)

        $Trt
                 diff      lwr               upr        p adj
        2-1       13        -3.23            29.23      0.146
        3-1         4      -12.23            20.23      0.900
        4-1      -10       -26.23     6.23   0.338
        3-2       -9       -25.23     7.23   0.427
        4-2      -23       -39.23            -6.77      0.004
        4-3      -14       -30.23     2.23   0.107




간호 통계                                                이윤환, yoonani72@gmail.com
다중비교




간호 통계          이윤환, yoonani72@gmail.com

More Related Content

Similar to R 기초 anova

Issues in time series econometrics
Issues in time series econometricsIssues in time series econometrics
Issues in time series econometrics
Babu Tyagu
 
Stat2013
Stat2013Stat2013
Bel ventutorial hetero
Bel ventutorial heteroBel ventutorial hetero
Bel ventutorial heteroEdda Kang
 
R programming intro with examples
R programming intro with examplesR programming intro with examples
R programming intro with examples
Dennis
 
Statistical Estimation and Testing Lecture Notes.pdf
Statistical Estimation and Testing Lecture Notes.pdfStatistical Estimation and Testing Lecture Notes.pdf
Statistical Estimation and Testing Lecture Notes.pdf
Dr. Tushar J Bhatt
 
Quantitative Analysis for Emperical Research
Quantitative Analysis for Emperical ResearchQuantitative Analysis for Emperical Research
Quantitative Analysis for Emperical Research
Amit Kamble
 
Interpreting Logistic Regression.pptx
Interpreting Logistic Regression.pptxInterpreting Logistic Regression.pptx
Interpreting Logistic Regression.pptx
GairuzazmiMGhani
 
L estimation
L estimationL estimation
L estimation
Mmedsc Hahm
 
eggs_project_interm
eggs_project_intermeggs_project_interm
eggs_project_intermRoopan Verma
 
Kano GIS Day 2014 - The Application of Multivariate Geostatistical analyses i...
Kano GIS Day 2014 - The Application of Multivariate Geostatistical analyses i...Kano GIS Day 2014 - The Application of Multivariate Geostatistical analyses i...
Kano GIS Day 2014 - The Application of Multivariate Geostatistical analyses i...
eHealth Africa
 
Statistics and Data Mining with Perl Data Language
Statistics and Data Mining with Perl Data LanguageStatistics and Data Mining with Perl Data Language
Statistics and Data Mining with Perl Data Languagemaggiexyz
 
Bigger Data v Better Math
Bigger Data v Better MathBigger Data v Better Math
Bigger Data v Better Math
Brent Schneeman
 
One-way ANOVA research paper
One-way ANOVA research paperOne-way ANOVA research paper
One-way ANOVA research paperJose Dela Cruz
 
Two Means, Two Dependent Samples, Matched Pairs
Two Means, Two Dependent Samples, Matched PairsTwo Means, Two Dependent Samples, Matched Pairs
Two Means, Two Dependent Samples, Matched Pairs
Long Beach City College
 
Data Project 1-use a significance level of 0.05Companies in the Do.pdf
Data Project 1-use a significance level of 0.05Companies in the Do.pdfData Project 1-use a significance level of 0.05Companies in the Do.pdf
Data Project 1-use a significance level of 0.05Companies in the Do.pdf
tesmondday29076
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
ShaikhSaifullahKhali
 
Engineering Statistics
Engineering Statistics Engineering Statistics
Engineering Statistics
Bahzad5
 
Inferences about Two Proportions
 Inferences about Two Proportions Inferences about Two Proportions
Inferences about Two Proportions
Long Beach City College
 
BUS173 Lecture 4.pptx
BUS173 Lecture 4.pptxBUS173 Lecture 4.pptx
BUS173 Lecture 4.pptx
SusantoSaha1
 

Similar to R 기초 anova (20)

Issues in time series econometrics
Issues in time series econometricsIssues in time series econometrics
Issues in time series econometrics
 
Stat2013
Stat2013Stat2013
Stat2013
 
Bel ventutorial hetero
Bel ventutorial heteroBel ventutorial hetero
Bel ventutorial hetero
 
R programming intro with examples
R programming intro with examplesR programming intro with examples
R programming intro with examples
 
Statistical Estimation and Testing Lecture Notes.pdf
Statistical Estimation and Testing Lecture Notes.pdfStatistical Estimation and Testing Lecture Notes.pdf
Statistical Estimation and Testing Lecture Notes.pdf
 
Quantitative Analysis for Emperical Research
Quantitative Analysis for Emperical ResearchQuantitative Analysis for Emperical Research
Quantitative Analysis for Emperical Research
 
Interpreting Logistic Regression.pptx
Interpreting Logistic Regression.pptxInterpreting Logistic Regression.pptx
Interpreting Logistic Regression.pptx
 
L estimation
L estimationL estimation
L estimation
 
eggs_project_interm
eggs_project_intermeggs_project_interm
eggs_project_interm
 
Kano GIS Day 2014 - The Application of Multivariate Geostatistical analyses i...
Kano GIS Day 2014 - The Application of Multivariate Geostatistical analyses i...Kano GIS Day 2014 - The Application of Multivariate Geostatistical analyses i...
Kano GIS Day 2014 - The Application of Multivariate Geostatistical analyses i...
 
Statistics and Data Mining with Perl Data Language
Statistics and Data Mining with Perl Data LanguageStatistics and Data Mining with Perl Data Language
Statistics and Data Mining with Perl Data Language
 
Bigger Data v Better Math
Bigger Data v Better MathBigger Data v Better Math
Bigger Data v Better Math
 
One-way ANOVA research paper
One-way ANOVA research paperOne-way ANOVA research paper
One-way ANOVA research paper
 
Two Means, Two Dependent Samples, Matched Pairs
Two Means, Two Dependent Samples, Matched PairsTwo Means, Two Dependent Samples, Matched Pairs
Two Means, Two Dependent Samples, Matched Pairs
 
Statistical ppt
Statistical pptStatistical ppt
Statistical ppt
 
Data Project 1-use a significance level of 0.05Companies in the Do.pdf
Data Project 1-use a significance level of 0.05Companies in the Do.pdfData Project 1-use a significance level of 0.05Companies in the Do.pdf
Data Project 1-use a significance level of 0.05Companies in the Do.pdf
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Engineering Statistics
Engineering Statistics Engineering Statistics
Engineering Statistics
 
Inferences about Two Proportions
 Inferences about Two Proportions Inferences about Two Proportions
Inferences about Two Proportions
 
BUS173 Lecture 4.pptx
BUS173 Lecture 4.pptxBUS173 Lecture 4.pptx
BUS173 Lecture 4.pptx
 

More from Yoonwhan Lee

R 기초 : R Basics
R 기초 : R BasicsR 기초 : R Basics
R 기초 : R Basics
Yoonwhan Lee
 
03.기술통계 자료의 중심과 퍼진정도
03.기술통계 자료의 중심과 퍼진정도03.기술통계 자료의 중심과 퍼진정도
03.기술통계 자료의 중심과 퍼진정도Yoonwhan Lee
 
02.자료다루기
02.자료다루기02.자료다루기
02.자료다루기Yoonwhan Lee
 
13.상관과 회귀
13.상관과 회귀13.상관과 회귀
13.상관과 회귀Yoonwhan Lee
 
12.세표본 이상의 평균비교
12.세표본 이상의 평균비교12.세표본 이상의 평균비교
12.세표본 이상의 평균비교Yoonwhan Lee
 
11.두표본의 평균비교
11.두표본의 평균비교11.두표본의 평균비교
11.두표본의 평균비교Yoonwhan Lee
 
10.단일표본 평균 모비율
10.단일표본 평균 모비율10.단일표본 평균 모비율
10.단일표본 평균 모비율Yoonwhan Lee
 
09.통계적가설검정
09.통계적가설검정09.통계적가설검정
09.통계적가설검정Yoonwhan Lee
 
00.통계학입문
00.통계학입문00.통계학입문
00.통계학입문Yoonwhan Lee
 
14.범주형자료분석
14.범주형자료분석14.범주형자료분석
14.범주형자료분석Yoonwhan Lee
 
Smart work 자료 1
Smart work 자료 1Smart work 자료 1
Smart work 자료 1
Yoonwhan Lee
 
통계자료 분석을 위한 R
통계자료 분석을 위한 R통계자료 분석을 위한 R
통계자료 분석을 위한 R
Yoonwhan Lee
 
통계자료분석을 ㅇ
통계자료분석을 ㅇ통계자료분석을 ㅇ
통계자료분석을 ㅇYoonwhan Lee
 
PHP를 이용한 간단한 방명록 만들기
PHP를 이용한 간단한 방명록 만들기PHP를 이용한 간단한 방명록 만들기
PHP를 이용한 간단한 방명록 만들기
Yoonwhan Lee
 

More from Yoonwhan Lee (20)

R 기초 : R Basics
R 기초 : R BasicsR 기초 : R Basics
R 기초 : R Basics
 
03.기술통계 자료의 중심과 퍼진정도
03.기술통계 자료의 중심과 퍼진정도03.기술통계 자료의 중심과 퍼진정도
03.기술통계 자료의 중심과 퍼진정도
 
02.자료다루기
02.자료다루기02.자료다루기
02.자료다루기
 
01.r 기초
01.r 기초01.r 기초
01.r 기초
 
13.상관과 회귀
13.상관과 회귀13.상관과 회귀
13.상관과 회귀
 
12.세표본 이상의 평균비교
12.세표본 이상의 평균비교12.세표본 이상의 평균비교
12.세표본 이상의 평균비교
 
11.두표본의 평균비교
11.두표본의 평균비교11.두표본의 평균비교
11.두표본의 평균비교
 
10.단일표본 평균 모비율
10.단일표본 평균 모비율10.단일표본 평균 모비율
10.단일표본 평균 모비율
 
09.통계적가설검정
09.통계적가설검정09.통계적가설검정
09.통계적가설검정
 
08.추정
08.추정08.추정
08.추정
 
07.표본분포
07.표본분포07.표본분포
07.표본분포
 
06.확률분포
06.확률분포06.확률분포
06.확률분포
 
05.확률
05.확률05.확률
05.확률
 
00.통계학입문
00.통계학입문00.통계학입문
00.통계학입문
 
14.범주형자료분석
14.범주형자료분석14.범주형자료분석
14.범주형자료분석
 
Smart work 자료 1
Smart work 자료 1Smart work 자료 1
Smart work 자료 1
 
통계자료 분석을 위한 R
통계자료 분석을 위한 R통계자료 분석을 위한 R
통계자료 분석을 위한 R
 
통계자료분석을 ㅇ
통계자료분석을 ㅇ통계자료분석을 ㅇ
통계자료분석을 ㅇ
 
PHP를 이용한 간단한 방명록 만들기
PHP를 이용한 간단한 방명록 만들기PHP를 이용한 간단한 방명록 만들기
PHP를 이용한 간단한 방명록 만들기
 
Class10
Class10Class10
Class10
 

Recently uploaded

Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 

Recently uploaded (20)

Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 

R 기초 anova

  • 1. R 기초 – 평균차이검정, 일원배치분산분석 한림대학교 금융정보통계학과 이 윤 환
  • 2. 평균차이 검정 t.test( x, y = NULL, alternative = c("two.sided", "less", "greater"), mu = 0, paired = FALSE, var.equal = FALSE, conf.level = 0.95 ) 간호 통계 이윤환, yoonani72@gmail.com
  • 3. 평균차이 검정 > setwd("c://r_nur") > delivery <- read.table("delivery.txt", header=TRUE) > attach(delivery) > t.test(time[type==2], time[type==1], var.equal=TRUE) Welch Two Sample t-test data: time[type == 2] and time[type == 1] t = 2.3003, df = 24.777, p-value = 0.03013 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: 0.1999658 3.6358431 sample estimates: mean of x mean of y 10.473529 8.555625 간호 통계 이윤환, yoonani72@gmail.com
  • 4. 일원배치 분산분석 > one.way <- read.table("fuel.txt", header=T) > attach(one.way) > Trt <- factor(trt) > one.way.anova <- aov(y ~ Trt) > summary.aov(one.way.anova) > model.tables(one.way.anova) > Tukey <- TukeyHSD(one.way.anova) > print(Tukey,3) > plot(Tukey) R을 활용한 통계적 개념, 방법, 응용 – 허명회 저 중 간호 통계 이윤환, yoonani72@gmail.com
  • 5. 분산분석표 Df Sum Sq Mean Sq F value Pr(>F) Trt 3 1636.5 545.5 5.4063 0.006876 ** Residuals 20 2018.0 100.9 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 간호 통계 이윤환, yoonani72@gmail.com
  • 6. 다중 비교 Tukey multiple comparisons of means 95% family-wise confidence level Fit: aov(formula = y ~ Trt) $Trt diff lwr upr p adj 2-1 13 -3.23 29.23 0.146 3-1 4 -12.23 20.23 0.900 4-1 -10 -26.23 6.23 0.338 3-2 -9 -25.23 7.23 0.427 4-2 -23 -39.23 -6.77 0.004 4-3 -14 -30.23 2.23 0.107 간호 통계 이윤환, yoonani72@gmail.com
  • 7. 다중비교 간호 통계 이윤환, yoonani72@gmail.com