통계에 대한 기초적인 이해 가설과 가설검증 * 가설의 종류와 그 종류에 따른 통계분석법 * z-test * t-test * ANOVA * Factorial ANOVA * correlation * regression * multiple regression * factor analysis * . . . * 위를 위해서 꼭 이해해야 할 것들 * Variance * Standard Deviation * Standard Error (Standard Deviation of Sample Means) * Hypothesis Testing R Cookbook [[:b:r cookbook:getting_started|Chapter 1 Getting Started and Getting Help]] [[:b:r cookbook:basics|Chapter 2 Some Basics]] [[:b:r cookbook:navigating|Chapter 3 Navigating the Software]] [[:b:r cookbook:input output|Chapter 4 Input and Output]] [[:b:r cookbook:data structures|Chapter 5 Data Structures]] [[:b:r cookbook:data transformations|Chapter 6 Data Transformations]] [[:b:r cookbook:strings and dates|Chapter 7 Strings and Dates]] [[:b:r cookbook:probability|Chapter 8 Probability]] [[:b:r cookbook:general statistics|Chapter 9 General Statistics]] [[:b:r cookbook:graphics|Chapter 10 Graphics]] [[:b:r cookbook:linear regression and ANOVA|Chapter 11 Linear Regression and ANOVA]] [[:b:r cookbook:useful tricks|Chapter 12 Useful Tricks]] [[:b:r cookbook:beyond basic numerics and statistics|Chapter 13 Beyond Basic Numerics and Statistics]] [[:b:r cookbook:times series analysis|Chapter 14 Time Series Analysis]] [[../2023|이전 페이지]] * Week 01: March 1 (삼일절), 6 * Week 02: March 8, 13 * Week 03: March 15, 20 * Week 04: March 22, 27 * Week 05: March 29, April 3 * Week 06: April 5 (식목일), 10 * Week 07: April 12, 17 * Week 08: April 19, 24 * Week 09: April 26, May 1 * Week 10: May 3, 8 * Week 11: May 10, 15 * Week 12: May 17, 22 * Week 13: May 24, 29 * Week 14: May 31, June 5 * Week 15: June 7, 12 * Week 16: June 14, 19 ====== Week01 ====== Course Introduction --> [[../2021|syllabus]] ===== ideas and concepts ===== 동영상 (R 관련) * [[https://youtu.be/6ExajWI_r2w]] 수업소개 * [[https://youtu.be/J8e5dEH8K_Q]] 서베이 참여 설명 * [[https://youtu.be/KYQFY8c2ePI]] R 과 R studio 인스톨 * [[https://youtu.be/qCeTcvWBDNY]] R studio 기초 설명 Introduction to R and others - Downloading and Installing R - [[:the_r_project_for_statistical_computing]] - [[:r]], [[:r:getting started]] - Starting R - Entering Commands - Exiting from R - Interrupting R - Viewing the Supplied Documentation - Getting Help on a Function - Searching the Supplied Documentation - Getting Help on a Package - Searching the Web for Help - Finding Relevant Functions and Packages - Searching the Mailing Lists - Submitting Questions to the Mailing Lists 동영상 (통계관련 샘플링에 대한 설명) *[[https://youtu.be/1hJm0O-RY4Q]] Sampling 과 관련된 아이디어와 용어 설명 기본용어 기술통계 ([[:descriptive statistics]]) 추론통계 ([[:inferential statistics]]) 아래의 개념은 [[:sampling|샘플링]] 문서를 먼저 볼것 * 전집 ([[:population]]) * 표본 ([[:sample]]) * 모수치 ([[:sampling#parameter_statistics|parameter]]) * 통계치 ([[:sampling#parameter_statistics|statistics]]) * sampling methods * probability * non-probability 가설 ([[:hypothesis]]) * 차이와 연관 (difference and association) 변인 ([[:variables]]) * [[:types of variables]] * [[:level of measurement]] ===== Assignment ===== ====== Week02 ====== ===== Concepts and ideas ===== [[:Sampling]] [[:Hypothesis|가설]] [[https://youtu.be/k1sdZtdeDu0|지난 동영상 리캡 및 가설에 대한 소개]] [[https://youtu.be/gLWjVDl2_6o|가설에 대한 소개 및 설명]] [[https://youtu.be/Q9cradIrY2M|가설이 만들어지는 이유]] [[https://youtu.be/hvTnKaX6wSg|가설의 예]] [[https://youtu.be/eno5USKD34U|변인의 종류와 변인측정의수준]] Some [[:b:r cookbook:basics|basics]] - Introduction - Printing Something - Setting Variables - Listing Variables - Deleting Variables - Creating a Vector - Computing Basic Statistics - Creating Sequences - Comparing Vectors - Selecting Vector Elements - Performing Vector Arithmetic - Getting Operator Precedence Right - Defining a Function - Typing Less and Accomplishing More - Avoiding Some Common Mistakes ---- from the previous lecture (research question and hypothesis) * [[:Research Question]]s (or Problems) * Two ideas guided by theories * Questions on their relationships * Conceptualization * [[:Hypothesis]] * Educated guess (via theories) * Difference * Association * [[:Variables]] (vs. ideas, concepts, and constructs) * [[:Operationalization]] * [[:Types of Variables]] * [[:Independent Variable|IV]] * [[:Dependent Variable|DV]] * Control variable * Mediating (Intervening) variable * [[:Level of Measurement]] ===== Qs ===== 가설을 만들게 된 이유에서 여러 개의 social science theory를 가지고 가설을 세워서 옳다는 결과가 나오면 법칙을 맞다고 증명하기 위해 가설을 만드는 것인지 아니면 하나의 social science theory가 맞는 지 틀리는 지 가설로 측정을 해본 다음 인정을 받기 위한 것인 지 (물론 이론이 100퍼센트 옳다고 확신할 수 없다고 하고) ===== Assignment ===== ====== Week03 ====== [[./grouping explained|그룹핑 설명 때 쓴 자료]] 3주차 온라인 강의 동영상은 4주에 걸쳐서 보시기 바랍니다. 즉, 4주 중에 따로 동영상 올리지 않습니다. * [[https://www.youtube.com/watch?v=nluWkZZ8zM8| MS the 3rd Week 012: the Basic (R cookbook)]] 32:00 * [[https://www.youtube.com/watch?v=IEr7MM4vpEU| MS the 3rd Week 013: Navigating the R]] 12:31 * [[https://www.youtube.com/watch?v=TPSApVNCM_c| MS the 3rd Week 014: Mean, Median, Mode (Howell, Ch. 4 Part)]] 16:17 * https://youtu.be/JvpOJPCBQkQ : R cookbook: data structure ----- * [[https://youtu.be/_ynGzFFmm7U]] Howell Ch 4. Variance 01: Introduction (DS, error, and SS) * [[https://youtu.be/HugtyhU7Im8]] Howell Ch. 4. Variance 02: Variance for sample and n-1 * [[https://youtu.be/RE6DSk1DcJI]] 왜 분산에는 n-1을 사용하는가? (직관적인 이해) * [[https://youtu.be/PrPoOCW3v1s]] n-1 증명 * [[https://youtu.be/Ssznnbdj5Lg]] Degrees of freedom * [[https://youtu.be/valhVpf-haY]] Standard deviation ----- Howell, Ch. 4 내용 중 [[:Variance]]와 (분산) [[:Standard deviation]]은 (표준편차는) 이후 통계 검증방법을 이해하는데 기초가 되는 중요한 내용이니 꼭 숙지하시기 바랍니다. ===== Concepts and ideas ===== [[:b:r cookbook:navigating|Navigating]] software - Introduction - Getting and Setting the Working Directory - Saving Your Workspace - Viewing Your Command History - Saving the Result of the Previous Command - Displaying the Search Path - Accessing the Functions in a Package - Accessing Built-in Datasets - Viewing the List of Installed Packages - Installing Packages from CRAN - Setting a Default CRAN Mirror - Suppressing the Startup Message - Running a Script - Running a Batch Script - Getting and Setting Environment Variables - Locating the R Home Directory - Customizing R [[:Mean]] [[:Mode]] [[:Median]] [[:Variance]] [[:Standard Deviation]] +-1 sd = 68% = +-1 sd +-2 sd = 95% = +-1.96 sd +-3 sd = 99% (99.7%) = +-3 sd 표준점수 (unit with a standard deviation) = [[:z score]] [[:Sampling distribution]] via random [[:sampling]] * sa [[:sampling distribution in r]] [[:Central Limit Theorem]] ===== Assignment ===== ====== Week04 ====== ===== Class Activity ===== Lecture materials for this week ===== Concepts and ideas ===== [[:b:r cookbook:input_output|Input and output]] - Introduction - Entering Data from the Keyboard - Printing Fewer Digits (or More Digits) - Redirecting Output to a File - Listing Files - Dealing with “Cannot Open File” in Windows - Reading Fixed-Width Records - Reading Tabular Data Files - Reading from CSV Files - Writing to CSV Files - Reading Tabular or CSV Data from the Web - Reading Data from HTML Tables - Reading Files with a Complex Structure - Reading from MySQL Databases - Saving and Transporting Objects # +-1SD = 68% # +-2SD = 95% # +-3SD = 99% 라고 했지만 # pnorm(2) = ? pnorm(2) pnorm(2) - pnorm(-2) pnorm(90,70,10) pnorm(90,70,10) - pnorm(50,70,10) pnorm(3) - pnorm(-3) qnorm(0.975) qnorm(0.025) qnorm(0.995) qnorm(0.005) pnorm(3) - pnorm(-3) # sa, http://commres.net/wiki/sampling_distribution_in_r?#n_4 m.ca <- 70 sd.ca <- 10 rnorm(n, m.ca, sd.ca) set.seed(1001) iter <- 10000 n <- 4 rnorm(n, m.ca, sd.ca) means <- rep (NA, iter) for(i in 1:iter){ means[i] = mean(rnorm(n, m.ca, sd.ca)) } # according to the prefessor m.means.should.be <- m.ca v.means.should.be <- sd.ca^2/n sd.means.should.be <- sqrt(v.means.should.be) m.means.should.be v.means.should.be sd.means.should.be m.means <- mean(means) v.means <- var(means) m.means v.means sd.means <- sd(means) sd.means se <- sd.means.should.be se2 <- se*2 m.means - se2 m.means + se2 s1 <- rnorm(n, m.ca, sd.ca) mean(s1) ===== Assignment ===== ====== Week05 ====== ===== Announcement Quiz 01 ===== 다음 주 수요일 (6주차 첫시간) 퀴즈 있습니다. 퀴즈 범위는 * 5주차까지 언급된 모든 동영상 * R 과 관련해서는 동영상 내용만 포함합니다. 문서 * [[:Sampling]] * [[:Hypothesis]] * [[:Variables]] * [[:Types of Variables]] * [[:Level of Measurement]] * [[:Operationalization]] * [[:Conceptualization]] * [[:Mean]], [[:Median]], [[:Mode]] * [[:Variance]], [[:Standard Deviation]] * [[:Sampling Distribution]] * [[:Central Limit Theorem]] * [[:Sampling Distribution in R]] * 시험문제는 4지선다 혹은 단답식 답입니다. * 문제는 모두 50문제 정도입니다. 동영상 시청 * https://youtu.be/Qaxj6LZ-iL0 : sampling distribution * https://youtu.be/0RZJbZtzs6s : sampling distribution e.g. in R * https://youtu.be/AbeIQvJJ5Vw : mean and variance (standard deviation) in sampling distribution (샘플평균들의 집합에서의 평균과 분산 (표준편차)) * https://youtu.be/zFdbt2XoeM4 : CLT (central limit theorem) and standard error 중심극한정리와 표준오차 * https://youtu.be/Udp-4MLAlvc : Testing hypothesis based on CLT principle CLT에 근거를 둔 가설의 검증 * [[:sampling distribution in r]] ===== Concepts and ideas ===== [[:b:r cookbook:Data Structures]] - Introduction - Appending Data to a Vector - Inserting Data into a Vector - Understanding the Recycling Rule - Creating a Factor (Categorical Variable) - Combining Multiple Vectors into One Vector and a Factor - Creating a List - Selecting List Elements by Position - Selecting List Elements by Name - Building a Name/Value Association List - Removing an Element from a List - Flatten a List into a Vector - Removing NULL Elements from a List - Removing List Elements Using a Condition - Initializing a Matrix - Performing Matrix Operations - Giving Descriptive Names to the Rows and Columns of a Matrix - Selecting One Row or Column from a Matrix - Initializing a Data Frame from Column Data - Initializing a Data Frame from Row Data - Appending Rows to a Data Frame - Preallocating a Data Frame - Selecting Data Frame Columns by Position - Selecting Data Frame Columns by Name - Selecting Rows and Columns More Easily - Changing the Names of Data Frame Columns - Editing a Data Frame - Removing NAs from a Data Frame - Excluding Columns by Name - Combining Two Data Frames - Merging Data Frames by Common Column - Accessing Data Frame Contents More Easily - Converting One Atomic Value into Another - Converting One Structured Data Type into Another {{:c:ms:2023:pasted:20230329-102748.jpeg}} 아래 두번째 그림은 population의 평균이 102 일 때 400명을 (1600명이 아니라) 샘플로 취했을 때의 샘플평균들의 집합을 그린것입니다. {{:c:ms:2023:pasted:20230329-102811.jpeg}} ##### mu.pop <- 100 sd.pop <- 10 set.seed(101) treated.group <- rnorm(16, 112, 10) treated.group m.tg <- mean(treated.group) m.tg # install.packages("BSDA") # library(BSDA) z.test(treated.group, mu=mu.pop, sigma.x=sd.pop) mu.pop <- 100 sd.pop <- 10 set.seed(100) treated.group.2 <- rnorm(16, 102, 10) treated.group.2 m.treated.group.2 <- mean(treated.group.2) m.treated.group.2 # install.packages("BSDA") # library(BSDA) z.test(treated.group.2, mu=mu.pop, sigma.x=sd.pop) set.seed(100) treated.group.2 <- rnorm(1600, 102, 10) treated.group.2 m.treated.group.2 <- mean(treated.group.2) m.treated.group.2 # install.packages("BSDA") # library(BSDA) z.test(treated.group.2, mu=mu.pop, sigma.x=sd.pop) ===== Assignment ===== ====== Week06 ====== ===== Concepts and ideas ===== 이번 주 동영상 * https://youtu.be/hX0mbKm6M4s : z-test (z 테스트) * https://youtu.be/06xTY1cVtb8 : z score (표준점수) * https://youtu.be/aG8X6EUu7xI : probability in R (R에서의 확률분포함수들) 또한 R에서 데이터를 (테이블 혹은 어레이) 이용하여 function을 적용하는 것에 대해서 잘 익혀두시기 바랍니다. 이는 R cookbook의 아래 내용에 해당이 됩니다 (특히 sapply, tapply, by 등) [[:b:r cookbook:Data Transformations]] - Introduction - Splitting a Vector into Groups - Applying a Function to Each List Element - Applying a Function to Every Row - Applying a Function to Every Column - Applying a Function to Groups of Data - Applying a Function to Groups of Rows - Applying a Function to Parallel Vectors or Lists Strings and Dates [[./schedule/week06 t-test and anova note]] ===== Announcement ===== ===== Assignment ===== ====== Week07 ====== ===== Concepts and ideas ===== [[:Hypothesis testing]] [[:z-test]] * r 에서 qnorm(proportion) pnorm(z-score) function 이해 필요 * [[:z_score]] 참조 [[:types of error]] 7주차 동영상 * t-test * https://youtu.be/Eje8lR8EXPc t-test: Intro * https://youtu.be/BL9TZbDUVWg t-test: One sample t-test * https://youtu.be/E7QUCYRcbM0 t-test: Independent samples t-test; repeated measure t-test 일부 * https://youtu.be/CV-DY9xdxtc t-test: Repeated measure t-test 계속 * 관련 문서: [[:t-test]] * [[:r:t-test|t-test in r]] * r 에서, qt(proportion, df), pt(t-score, df) function 이해 필요 * [[:r/probability?s[]=qnorm]] 참조 * [[:t_distribution_table]] 참조 [[:b:r_cookbook:probability|Probability calculation in R]] <- Probability in R cookbook (텍스트북) [[:b:r cookbook:Probability]] - Introduction - Counting the Number of Combinations - Generating Combinations - Generating Random Numbers - Generating Reproducible Random Numbers - Generating a Random Sample - Generating Random Sequences - Randomly Permuting a Vector - Calculating Probabilities for Discrete Distributions - Calculating Probabilities for Continuous Distributions - Converting Probabilities to Quantiles - Plotting a Density Function [[./w07 anova note]] ===== Assignment ===== ---- * 가설 만들어 보기 * [[http://behavioralsciencewriting.blogspot.kr/2011/09/how-to-write-hypothesis.html|how to write hypothesis]] at behavioral science writing. * One sample hypothesis [[http://www.socialresearchmethods.net/kb/hypothes.php|Hypothesis]] at www.socialresearchmethods.net ===== 8주차 퀴즈 ===== 8주차 정기시험기간 중에 2차 퀴즈 * 4월26일, 09:00 ~ (A, B교시) * 범위 * 처음부터 One-way ANOVA test with post hoc test 까지 (R square에 대한 설명포함) * 제 9주차 내용이지만 수업시간에 다룬 것만 시험에 나옵니다. * 동영상은 7주차까지 보셔야 합니다 * [[:Sampling]] * [[:Hypothesis]] * [[:Variables]] * [[:Types of Variables]] * [[:Level of Measurement]] * [[:Mean]] [[:Median]] [[:Mode]] * [[:Variance]], [[:Standard Deviation]] * [[:Sampling Distribution]] * [[:Central Limit Theorem]], [[:Hypothesis Testing]] * [[:z-test]] * [[:t-test]] * [[:ANOVA]] * [[:post hoc test]] ====== Week08 ====== 시험기간 보강영상 수업 ====== Week09 ====== ===== Concepts and ideas ===== 영상 ANOVA * https://youtu.be/bNK5iIjAoHI : Intro to ANOVA (F-test) * https://youtu.be/L9ns0vuvWJ8 : principles of ANOVA * https://youtu.be/xOixsz4Qkz0 : ANOVA, calculation based on the priciple * https://youtu.be/kyVXFS3jts4 : post-hoc test / t-test vs. ANOVA 위키페이지 참조 * [[:ANOVA]] * [[:Factorial ANOVA]] * [[:repeated measure anova]] [[:b:r cookbook:General Statistics]] - Introduction - Summarizing Your Data - Calculating Relative Frequencies - Tabulating Factors and Creating Contingency Tables - Testing Categorical Variables for Independence - Calculating Quantiles (and Quartiles) of a Dataset - Inverting a Quantile - Converting Data to Z-Scores - Testing the Mean of a Sample (t Test) - Forming a Confidence Interval for a Mean - Forming a Confidence Interval for a Median - Testing a Sample Proportion - Forming a Confidence Interval for a Proportion - Testing for Normality - Testing for Runs - Comparing the Means of Two Samples - Comparing the Locations of Two Samples Nonparametrically - Testing a Correlation for Significance - Testing Groups for Equal Proportions - Performing Pairwise Comparisons Between Group Means - Testing Two Samples for the Same Distribution vene . . . go or come intervene * intervenient convene * convention * convent * convenient contravene prevent advent circumvent ===== Assignment ===== 그룹 assignment week09 {{:r:cookies.xlsx}} --> 2-way ANOVA test 계산해보기 {{:r:repeated_measures_anova_eg.xlsx}} --> Repeated measure ANOVA 계산해보기 ([[:Repeated Measure ANOVA]] 참조). 과제 첫 번째 문제는 Repeated measure ANOVA 입니다. Factorial ANOVA가 아닙니다. patient drug1 drung2 drug3 1 30 28 16 2 14 18 10 3 24 20 18 4 38 34 20 5 26 28 14 edited ms.23.ga.w09.anova - 위 데이터를 엑셀과 같은 스프레드시트 프로그램에 입력하고 F-test를 직접 계산하세요. * {{:detergent.anova.by.hand.xlsx}} 엑셀의 데이터를 가지고 F-test를 직접 계산하세요. * 과제는 ms.23.ga.groupID.w09.anova.by.hand.xlsx 파일에 두개의 tab을 만들어 수행하고 제출하세요 - {{:r:twoway.anova.by.hand.xlsx}} * 위 파일을 다운로드 받아서 anova test를 직접 계산하세요. * 계산한 결과를 ms.23.ga.groupID.w09.twoway.anova.by.hand.xlsx 파일이름으로 저장하여 업로드하세요. - {{:r:twoway.anova.by.hand.data.csv}} 파일을 R에서 데이터로 (df) 불러와서 F-test를 수행하세요. 수행한 내용을 캡춰하여 groupID.w.09.twoway.anova.by.hand.data.docx 에 저장하여 업로드하세요. 과제 작성은 fixed font로 해야 합니다. - 조원과 의논하여 아래를 수행하세요 * Indepdent sample t-test 를 수행할 가설을 전공과 관련하여 만드세요. * Oneway ANOVA 를 수행할 가설을 전공과 관련하여 만드세요. * Repeated measure ANOVA 를 수행할 가설을 전공과 관련하여 만드세요. * Twoway ANOVA 를 수행할 가설을 전공과 관련하여 만드세요. * ms.23.ga.groupID.w09.making.hypothesis.odc 와 같은 파일 이름으로 저장하여 업로드하세요 ---- ===== 소희학생 과제 ===== * 아래를 수행하세요. 소희학생은 group 13으로 되어 있어서 group 13으로 올리시기 바랍니다. * [[:t-test]], [[:ANOVA]], [[:repeated measure ANOVA]], [[:factorial ANOVA|twoway ANOVA]] 를 수행할 수 있는 가설을 만드세요. * 각 가설의 독립변인과 종속변인을 ([[:types of variables]]) 기술하세요. * 각 변인의 측정수준을 ([[:level of measurement]]) 기술하세요. * 아래를 수행하세요 * R에서 ''?ToothGrowth'' 를 친 후에 이 데이터가 무엇에 관한 것인지 설명하세요. * supp를 독립변인으로 하여 가설을 만들고, R에서 검증한 후 (t-test) 결과를 출력하고 (출력은 fixed font로 해야 합니다), 이를 해석하세요. * dose를 독립변인으로 하여 가설을 만들고, R에서 검증을 한 후에 결과를 출력하고, 이를 해석하세요. * supp와 dose를 동시에 독립변인으로 하여 R에서 검증을 한 후에 결과를 출력하고, 이를 해석하세요. * 과제는 ms.23.ga.w09.anova.by.hand 의 과제제출란에 제출하되, * 파일이름은 ga.g13.w09.hypothesis.testing.docx 로 하여 과제파일을 올리세요. ====== Week10 ====== ===== Concepts and ideas ===== 10주차 동영상입니다. * https://youtu.be/IpuyWhk1R9g : Factorial ANOVA * https://youtu.be/UuJhej1eJJI : Factorial ANOVA by hand * https://youtu.be/rl6zs1lK0BE : Factorial ANOVA egs. see [[./schedule/w10.lecture.note]] ===== Assignment ===== ====== Week11 ====== ===== Concepts and ideas ===== 동영상 (총 5 개) * https://youtu.be/vwxdhllHM-8 : Repeated Measures ANOVA, Intro * https://youtu.be/L_jzB650Llo : Repeated Measures ANOVA in R ---- * https://youtu.be/Cj7mxGBrIU8 : Correlations 01 * https://youtu.be/oYKFeuAn140 : Correlations 02 * https://youtu.be/aHdb4j3ybX8 : Spearman (Rank ordered) Correlation [[./schedule/w11.lecture.note]] [[:repeated measure ANOVA]] [[:correlation]] ---- [[:regression]] [[:multiple regression]] [[:using dummy variables]] [[:r:getting started]] [[:b:r cookbook:basics]] [[:b:r cookbook:navigating]] in r [[:b:r cookbook:input output]] in r [[:b:r cookbook:data structures]] [[:b:r cookbook:data transformations]] ---- [[r:graphics|Graphics]] - Introduction - Creating a Scatter Plot - Adding a Title and Labels - Adding a Grid - Creating a Scatter Plot of Multiple Groups - Adding a Legend - Plotting the Regression Line of a Scatter Plot - Plotting All Variables Against All Other Variables - Creating One Scatter Plot for Each Factor Level - Creating a Bar Chart - Adding Confidence Intervals to a Bar Chart - Coloring a Bar Chart - Plotting a Line from x and y Points - Changing the Type, Width, or Color of a Line - Plotting Multiple Datasets - Adding Vertical or Horizontal Lines - Creating a Box Plot - Creating One Box Plot for Each Factor Level - Creating a Histogram - Adding a Density Estimate to a Histogram - Creating a Discrete Histogram - Creating a Normal Quantile-Quantile (Q-Q) Plot - Creating Other Quantile-Quantile Plots - Plotting a Variable in Multiple Colors - Graphing a Function - Pausing Between Plots - Displaying Several Figures on One Page - Opening Additional Graphics Windows - Writing Your Plot to a File - Changing Graphical Parameters ===== Assignment ===== 과제명: ms23.w11.ga.covariance.exercise 제출파일명: ms23.w11.ga.covariance.exercise.group##.odc (docx) 과제내용: 아래 데이터를 다운로드 받아서 두 변인 간의 상관관계계수를 구하시오. {{:income.happiness.csv}} 데이터는 수입과 행복을 측정한 것입니다. 실제 데이터를 살펴보고 R로 읽어 온 후에 R을 이용하여 아래를 구하시오. R에서의 명령어와 아웃풋을 카피/패이스트 하여 제출하시오 (fixed-font를 사용하여). * 각 변인의 deviation score 값을 구하여 ds.inc 와 ds.hap 에 저장하시오. * 두 변인의 SP값을 (Sum of Product) 구하여 sp.dat 에 저장하시오. * 두 변인의 df값을 구하여 df.dat 에 저장하시오. * 두 변인간 covariance값을 r의 cov 명령어를 이용하여 구하여 cov.dat값에 저장하시오. * sp.dat / df.dat 값을 구하여 cov.cal 값에 저장하시오. * cov.cal 과 cov.dat 값이 같은지 비교하시오. (힌트: ''=='' 연산자를 이용하여 확인하시오) * 각 변인의 standard deviation 값을 구하여 sd.inc, sd.hap에 저장하시오 * 우리가 배운 correlation값을 구하는 공식에 따라서 r 값을 구해서 r.cal 에 저장하시오. * R의 cor 명령어를 이용하여 correlation coefficient값을 구하여 r.dat 에 저장하시오. * r.cal 과 r.dat 을 비교하시오. ====== Week12 ====== May 22 (월), 24 (수) [[./schedule/w12.lecture.note]] ===== Announcement ===== ===== Concepts and ideas ===== 동영상 Regression - https://youtu.be/68gho4ubOjs : Regression 1. Intro - https://youtu.be/qXSRgSh1rw0 : Regression 2. e.g. 1 - https://youtu.be/I8wt2W7-Iio : Regression 3. e.g. 2 [[:chi-square test]] [[:b:r cookbook:probability]] [[:b:r cookbook:general statistics]] Graphics ===== Assignment ===== ====== Week13 ====== May 29 (월), 31 (수) May 31 (수) 6월 5일 (월) 세번째 퀴즈 퀴즈 범위는 처음부터 multiple regression까지 퀴즈 범위는 stats part * [[:sampling distribution]] * [[:central limit theorem]] * [[:hypothesis testing]] * [[:z-test]] * [[:types of error]] * [[:t-test]] * [[:ANOVA]] * [[:Factorial ANOVA]] * [[:Repeated Measure ANOVA]] * [[:correlation]] * [[:Regression]] * [[:Multiple Regression]] * [[:Interpretation of Multiple Regression]] * [[:Partial and semipartial correlation]] r part * [[:b/r_cookbook/data_structures|Data structure in r]] * [[:b:r cookbook:data transformations|Data transformation in r]] * [[:b:r_cookbook:general statistics]] in r r은 주로 아웃풋에 대한 질문이 있을 예정입니다. 오픈 북이니 모든 명령어 등을 외울 필요는 없습니다. ===== Concepts and ideas ===== 영상 * https://youtu.be/LOEinkXaskA : Multiple Regression 01 Intro. * https://youtu.be/v6LswXPvEWY : Multiple Regression 03 Interpreting ivs * https://youtu.be/tc6wb7fBmiY : Week13 Multiple Regression 02 Dummy variables ===== Assignment ===== ====== Week14 ====== June 5(월), 7(수) 영상보기 * https://youtu.be/AXMtT5cYpZ4 Factor Analysis ===== Concepts and ideas ===== [[:using dummy variables|Including Dummy variables]] [[:r:dummy variable]] with R [[:interaction effects in regression analysis]] [[:sequential regression]] [[:beta coefficients]] [[:mediation analysis]] ===== Assignment ===== ====== Week15 ====== June 12, 14 ===== Assignment ===== 그룹 assignment: ms.23.ga.w15.multiple.regression.groupID 그룹의 아래의 두 개 중 하나를 택하여 수행하시오. 6월 19일까지 완성 (ABB) - 일 * data: elemapi2.csv * available at http://commres.net/wiki/_media/r/elemapi2.csv * api00 을 종속변인으로 하고 관련이 있을 것 같고 흥미로운 변인들을 독립변인으로 하여 (최소한 3개 이상, 그 중 하나는 종류변인이어야 합니다) multiple regression을 디자인 하고 이를 수행한 후 경과와 결과를 보고하시오 * api00을 종속변인으로 하고 두 개의 독립변인으로 avg_ed와 mealcat 두 개를 골라서 interaction을 포함한 regression을 수행한 후 경과와 결과를 보고하시오. - 이 * data: College (in ISLR package in R) * data에 대한 정보 * ''library(ISLR)'' 후 ''?College'' * 종속변인 하나를 골라서 다른 독립변인들을(최소 3개 이상) 가지고 Regression을 수행한 후 경과와 결과를 보고하시오. * 위에서의 종속변인과 두개의 독립변인을 골라서 (숫자+숫자 혹은 숫자+종류) interaction 효과를 포함하는 Regression을 한 후에 경과와 결과를 보고하시오 ====== Week16 ====== June 19, 21 (퀴즈일자에만 퀴즈를 보고 수업은 없음) __**Final-term**__ * 마지막 퀴즈 * 범위는 다음과 같습니다. * Statistics * [[:sampling distribution]] * [[:central limit theorem]] * [[:hypothesis testing]] * [[:z-test]] * [[:types of error]] * [[:t-test]] * [[:ANOVA]] * [[:Factorial ANOVA]] * [[:Repeated Measure ANOVA]] * [[:correlation]] * [[:Regression]] * [[:Multiple Regression]] * [[:beta coefficients]] * [[:r:dummy variable]] * [[:interaction effects in regression analysis]] * [[:interaction effects in regression analysis]] * [[:sequential regression]] * [[:beta coefficients]] * R 관련 문제는 아웃풋을 이해하는지에 치중을 하시면 됩니다. 실제 명령어 사용 등에 대한 문제는 나오지 않습니다.