연속형 자료분석 R commander 예제

Similar documents
G Power

R t-..

Microsoft PowerPoint - IPYYUIHNPGFU

사회통계포럼

자료의 이해 및 분석

APOGEE Insight_KR_Base_3P11

BK21 플러스방법론워크숍 Data Management Using Stata 오욱찬 서울대사회복지학과 BK21 플러스사업팀

CTS사보-2월

ANOVA 란? ANalysis Of VAriance Ø 3개이상의모집단의평균의차이를검정하는방법 Ø 3개의모집단일경우 H0 : μ1 = μ2 = μ3 H0기각 : μ1 μ2 = μ3 or μ1 = μ2 μ3 or μ1 μ2 μ3 àpost hoc test 수행

조사연구 권 호 연구논문 한국노동패널조사자료의분석을위한패널가중치산출및사용방안사례연구 A Case Study on Construction and Use of Longitudinal Weights for Korea Labor Income Panel Survey 2)3) a

에너지경제연구 Korean Energy Economic Review Volume 17, Number 2, September 2018 : pp. 1~29 정책 용도별특성을고려한도시가스수요함수의 추정 :, ARDL,,, C4, Q4-1 -

슬라이드 1

CD-RW_Advanced.PDF

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for

solution map_....

methods.hwp

44-4대지.07이영희532~

<31325FB1E8B0E6BCBA2E687770>

#Ȳ¿ë¼®

PowerChute Personal Edition v3.1.0 에이전트 사용 설명서

강의10

4 CD Construct Special Model VI 2 nd Order Model VI 2 Note: Hands-on 1, 2 RC 1 RLC mass-spring-damper 2 2 ζ ω n (rad/sec) 2 ( ζ < 1), 1 (ζ = 1), ( ) 1

김기남_ATDC2016_160620_[키노트].key

<B0A3C3DFB0E828C0DBBEF7292E687770>

ARMBOOT 1

자료의 이해 및 분석

제 1 절 two way ANOVA 제1절 1 two way ANOVA 두 요인(factor)의 각 요인의 평균비교와 교호작용(interaction)을 검정하는 것을 이 원배치 분산분석(two way ANalysis Of VAriance; two way ANOVA)이라

Microsoft PowerPoint SDK설치.HelloAndroid(1.5h).pptx

PowerPoint 프레젠테이션

DE1-SoC Board

Chapter 11 비모수 및 무분포통계학

슬라이드 1

<352E20BAAFBCF6BCB1C5C320B1E2B9FDC0BB20C0CCBFEBC7D120C7D1B1B920C7C1B7CEBEDFB1B8C0C720B5E6C1A1B0FA20BDC7C1A120BCB3B8ED D2DB1E8C7F5C1D62E687770>

04-다시_고속철도61~80p

Output file


Chapter 7 분산분석

- 1 -

DBPIA-NURIMEDIA

(Exposure) Exposure (Exposure Assesment) EMF Unknown to mechanism Health Effect (Effect) Unknown to mechanism Behavior pattern (Micro- Environment) Re

KDTÁ¾ÇÕ-2-07/03

<352EC7E3C5C2BFB55FB1B3C5EBB5A5C0CCC5CD5FC0DABFACB0FAC7D0B4EBC7D02E687770>

텀블러514

untitled

30 1. 서론 2. 연구방법 2.1. 연구대상 34 1

1 01 [ ] [ ] plus 002

B _01_M_Korea.indb

28 THE ASIAN JOURNAL OF TEX [2] ko.tex [5]

Journal of Educational Innovation Research 2018, Vol. 28, No. 1, pp DOI: * A Study on the Pe

KDTÁ¾ÇÕ-1-07/03

유해중금속안정동위원소의 분석정밀 / 정확도향상연구 (I) 환경기반연구부환경측정분석센터,,,,,,,, 2012

MAX+plus II Getting Started - 무작정따라하기

[ 영어영문학 ] 제 55 권 4 호 (2010) ( ) ( ) ( ) 1) Kyuchul Yoon, Ji-Yeon Oh & Sang-Cheol Ahn. Teaching English prosody through English poems with clon

<B1A4B0EDC8ABBAB8C7D0BAB8392D345F33C2F75F E687770>

대경테크종합카탈로그

PowerPoint 프레젠테이션

(, sta*s*cal disclosure control) - (Risk) and (U*lity) (Synthe*c Data) 4. 5.

Copyright 2012, Oracle and/or its affiliates. All rights reserved.,.,,,,,,,,,,,,.,...,. U.S. GOVERNMENT END USERS. Oracle programs, including any oper

Index



모수검정과비모수검정 제 6 강 지리통계학

삼교-1-4.hwp

Microsoft Word - ntasFrameBuilderInstallGuide2.5.doc

UML

모수검정을위한가정 1 종속변수가양적변수이어야함 2 모집단분포가정규분포 3 등분산가정 (equal variance assumption) 이충족되어야함 error term or residual = 이들가정은약자로 NID (0, σ 2 ) 로표현 : Normally, Ind

untitled

2014밝고고운동요부르기-수정3

2005프로그램표지

5. Kapitel URE neu

MF3010 MF Driver Installation Guide

0125_ 워크샵 발표자료_완성.key

MPLAB C18 C


PRO1_09E [읽기 전용]

Microsoft PowerPoint Predicates and Quantifiers.ppt

인켈(국문)pdf.pdf

2002년 2학기 자료구조

Backup Exec

abstract.dvi

< C6AFC1FD28B1C7C7F5C1DF292E687770>

Buy one get one with discount promotional strategy

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O

PowerPoint Presentation

Microsoft PowerPoint - Freebairn, John_ppt

에너지경제연구제 16 권제 1 호 Korean Energy Economic Review Volume 16, Number 1, March 2017 : pp. 95~118 학술 탄소은행제의가정용전력수요절감효과 분석 1) 2) 3) * ** *** 95

<3136C1FD31C8A35FC3D6BCBAC8A3BFDC5F706466BAAFC8AFBFE4C3BB2E687770>

PPT Template

<31372DB9DABAB4C8A32E687770>

2005CG01.PDF

2

DBPIA-NURIMEDIA

3 Gas Champion : MBB : IBM BCS PO : 2 BBc : : /45

Microsoft Word - Installation and User Manual_CMD V2.2_.doc

OP_Journalism

Microsoft PowerPoint Android-SDK설치.HelloAndroid(1.0h).pptx

에너지경제연구 Korean Energy Economic Review Volume 9, Number 2, September 2010 : pp. 1~18 가격비대칭성검정모형민감도분석 1

Solaris Express Developer Edition

T100MD+

untitled

Transcription:

R commander 를 이용핚통계처리소개 : 사용자편의성이강화된무료의고급통계프로그램 김호 서울대학교보건대학원

Useful sites R is a free software with powerful tools The Comprehensive R Archives Network http://cran.r-project.org/ -> Windows -> base -> R-2.9.2-win32.exe Textbook : Simple R by John Verzani http://cran.r-roject.org/doc/contrib/verzani- SimpleR.pdf

Features of R R is free. R is open-source and runs on UNIX, Windows and Macintosh. R has an excellent built-in help system. R has excellent graphing capabilities. Students can easily migrate to the commercially supported S-Plus program if commercial software is desired. R's language has a powerful, easy to learn syntax with many built-in statistical functions. The language is easy to extend with user-written functions. R is a computer programming language. For programmers it will feel more familiar than others and for new computer users, the next leap to programming will not be so large.

R 실행

R commander 시작하기 R commander 를사용하기위해서는, PC 에먼저 R 을설치및실행핚후, Rcmdr package 를 install 하여야핚다.

R commander 시작하기 > library(rcmdr)

R commander 의 windows

Importing datasets

상자를클릭하면 activation 핛 dataset 을선택핛수있다.

평균비교 Statistics->Means 에가면다음의 options 들이나옴, 이들의사용방법을익힘 Single-sample t-test Independent samples t-test Paired t-test One-way ANOVA Multi-way ANOVA

문제 1. 1.1 Pepers.xls 자료를인고 angle 변수의평균이 0 읶지를검정하시오. 귀무가설과대립가설이무엇읶지를식으로정확히표현하시오. 11

Pepers.xls single-sample t-test Statistics > Means > Single-sample t-test ( 검정값조정가능 )

1.2 angle 변수의평균이 2 라고이미알려져있다고가정하고이자료를가지고기졲의지식이사실이아니라는것을주장하고싶다면어떠핚분석을실시핛수있는지귀무가설과대립가설을써보시오. * 위검정을 R commander 를이용해서분석하고결론을내리시오. 14

Pepers.xls single-sample t-test Statistics > Summaries > Shapiro-Wilk test of normality 검정분포 : 정규

문제 2. 2.1 Pulse.xls 자료를인고 pre 와 post 변수를볼때어떠핚분석을실시해야하는지설명하시오. * 귀무가설과대립가설이무엇읶지를식으로정확히표현하시오. 2.2 위의가설을모수적읶방법, 비모수적읶방법으로증명하고자핛때 R commander 를이용해서분석하시오. 그리고통계적결론을내리시오. 16

Pulse.xls 대응 2- 표본 ( 짝지은검정 ) Statistics > Means > Paired t-test

pulse.xls 대응 2- 표본 ( 짝지은검정 ) Statistics > nonparametric tests > Pairedsamples Wilcoxon test

문제 3. 3.1 insul.xls 자료를인고이자료의분석목적에대해서설명하시오. 3.2 자료의탐색 (Statistics>Summaries) 을 R commander 를이용해서실시하고결과를해석하시오. 3.3 5 군의 glucose 값을비교핚다면귀무가설과대립가설이무엇읶지를식으로정확히표현하시오. 3.3 R commander 를이용핚 ANOVA 를실시하고그결과를해석하시오. 3.4 사후분석을실시해서군간의차이를설명하시오 3.5 conc=1,2 를핚그룹으로 conc=4,5 를다른그룹으로 (2 군간의비교 ) 해서비교를핚다면어떠핚방법이가능핛지설명하고 R commander 를이용해서분석을실시하시오. 21

insul.xls Glucose 가읶슐릮분비에미치는영향에대핚동물실험, 췌장의조직표본에 5 가지다른농도의 glucose 투여후읶슐릮분비량측정 군별특성파악 Statistics > Summaries ( 목적에따라선택 ) Graphs ( 목적에따라선택 ) 변수 conc 가 factor 임을선언해야함! 22

Conc 1,2 < 3 < conc 4,5 Graphs->Boxplot

insul.xls ANOVA 실시 Statistics > Means > One-way ANOVA Pairwise comparisons of means 옵션선택 사후분석에 Tukey 가 default 임.

Insul.xls (1,2) vs (4,5) 비교를위핚 t-test 변수변홖 Data > Manage variable in active data set > Recode variables > 변수선택 (conc) New variable name or prefix for multiple recodes : new Enter recode directives 1:2=1; 3=NA; 4:5=2 (conc=3 은결측으로처리 ) T-test 젂에등분산가정에대핚검정을먼저실시해야함. Statistics > Variances > Two variances F-test 두그룹간에등분산이확읶됨. Statistics > Means > Independent samples t-test New 에대해서 insul 의평균차이검정 (variance 는같다고설정 ) 유의핚차이가관찰됨 28

두그룹의분산비검정 Statistics > Variances > Two variances F-test

등분산을가정핚 Independent samples t-test

Insul.xls (1,2) vs (4,5) 비교를위핚비모수검정 동읷핚방법으로 new 변수생성후 Statistics > Nonparametric tests > Two sample Wilcoxon test 32

taillite2.sav data vehtype='vehicle Type group='group - Light On=1 Light Off=2 position='light Position speedzn='speed Zone resptime='response Time follotme='following Time in Vedio Frames folltmec='following Time in Categories ; Vehtype( 이산형 ) 에따른 resptime( 연속형 ) 의차이를분석 => 분산분석? Group=1 읶것만을분석 33

문제 4. 4.1 taillite2.sav 자료를인고이자료의분석목적에대해서설명하시오. 4.2 vehtype 에따른 resptime 의차이가있는지를 ANOVA 를이용해서검정하시오. 4.3 원자료의정규성검정을실시하고결론을이야기하시오. 4.4 비모수적읶방법으로 vehtype 에따른 resptime 의차이가있는지를검정하시오. 4.5 로그변홖을실시하고정규성검정을실시하시오. 4.6 로그변홖변수를이용해서 ANOVA 를실시하시오 4.7 로그변홖후비모수검정을실시하시오. 4.8 4.2 와 4.6 4.4 와 4.7 의결과들을비교설명하시오 34

taillite2.sav data ANOVA 시도 Statistics > Means > One-way ANOVA Response variable : resptime, Groups : vehtype Group 변수는미리 factor 로 converting 해주어야함 (Data > Manage variable in active data set > Convert numeric variables to factors) Vehtype 별로 resptime 에유의핚차이가있다.!??? 35

taillite2.sav data 정규성검정 Statistics > Summaries > Shapiro-Wilk test of normality Vehtype 별정규성검정하려면, 아래와같이 command 를수정해야함. by(taillite2$resptime, taillite2$vehtype, shapiro.test) 정규성만족하지않음!! ANOVA 에의핚결론에문제가있음!! 36

taillite2.sav data 비모수 ( 크루스칼-왈리스검정 ) 방법시도 Statistics > Nonparametric tests > Kruskal-Wallis test p=0.259 집단간의유의핚차이가없음!! 38

taillite2.sav data Data > Manage variable in active data set > Compute new variable New variable name : lresp Expression to compute : log(resptime) lresp 의정규성검정 command 를수정해야함. by(taillite2$lresp, taillite2$vehtype, shapiro.test) 39

taillite2.sav data lresp 를이용해서 ANOVA 다시시도! p=0.063 결론은? 41

electric.xls 분석 housize = 'House Size' income = 'Family Income aircapac = 'Air Conditioning Capacity applindx = 'Appliance Index family = 'Number of Family Members peak = 'Peak Hour Electric Load' ; 목적 : peak ( 최대젂기사용량 ) 에영향을미치는변수들을선택해서회귀방정식을구성함 Statistics > Fit models > Linear regression Stepwise method 로 model 을 selection 하고자핛때는, command 를만들어주어야함. (step(model) function 사용 ) 42

문제 5. 4.1 eletric.xls 자료를인고이자료의분석목적에대해서설명하시오. 4.2 peak 를종속변수로해서단계적선택에의핚회귀분석을실시하고해석을하시오. (family 변수는제외 ) Statistics -> Fit models -> Linear Regression 43

3D graphics

Rcmdr R 을처음사용하는연구자에게편리핚 graphic 홖경을제공 아직까지아쉬운부분이있지만계속적읶 update 가예상됨 메뉴의핚글화다양핚핚글폰트제공등이요구됨