This is an old revision of the document!
Table of Contents
Week01 (Sep 4, 7)
ideas and concepts
Introduction to R and others
- Downloading and Installing R
- 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
using theories and making hypotheses
Installing R
Assignment
Week02 (Sep 11 14)
Concepts and ideas
Some 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
using theories and making hypotheses
- Theories
- to build science
- to guide as a frame (what to look, how to think, and how to look at)
- to explain phenomena
- to predict phenomena (to provide a context for predictions)
- Empirically relevant (testing) and always tentative (deductive cycle)
- via research (hypothesis testing)
- hence, not fixed
- generalized statement regarding a connection between A and B (idea, concept, construct, phenomena, etc)
- Levels ?
- Micro . . . frustration and aggression
- Meso . . . online communities and disinhibition
- Macro . . . ethnicity (or socio-econ class) and family bond
- role of T
- Research Questions (or Problems)
- Two ideas guided by theories
- Questions on their relationships
- Conceptualization
-
- Educated guess (via theories)
- Difference
- Association
- Variables (vs. ideas, concepts, and constructs)
-
- Control variable
- Mediating (Intervening) variable
Assignment
In class
small <- c(0.6739635, 1.5524619, 0.3250562, 1.2143595, 1.3107692, 2.1739663, 1.6187899, 0.8872657, 1.9170283, 0.7767406) medium <- c(10.526448, 9.205156, 11.427756, 8.53318, 9.763317, 9.806662, 9.150245, 10.058465, 9.18233, 7.949692) big <- c(99.83624, 100.70852, 99.73202, 98.53608, 100.74444, 98.58961, 100.46707, 99.88068, 100.46724, 100.49814) dframe <- data.frame(small, medium, big)
fib <- c(0,1,1,2,3,5,8,13,21,34)
a1 <- c(1,1,2,3,5,8,13,21) a2 <- c(2,4,5,3,6,9,18,25)
- select all elements that exceeds +-2 sd from the mean of the column, medium in dframe.
- choose only odd numbers from the variable fib.
- combine a1 and a2 into a data frame, dframe2
- name a1 and a2 to x and y in dfram2
Week03 (Sep 18, 21)
Concepts and ideas
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
Assignment
Week04 (Sep 25, 28)
Class Activity
- 가설 만들어 보기
- No need to read theories
- the third person effect
- Read hypothesis
- how to write hypothesis at behavioral science writing.
- One sample hypothesis Hypothesis at www.socialresearchmethods.net
Concepts and ideas
- 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
Assignment
Week05 (Oct 2, Oct 5)
Oct 5: Chooseok Holiday
Oct 3, 4, 5, 6, 7, 8
Concepts and ideas
- 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
Assignment
- 자신의 관심사와 어울리는 참고문헌 수집하기
- 자신의 관심사를 정리하는 2 문단 작성
- 이에 해당하는 키워드 추출 (3-5)
- 키워드를 이용하여 관련된 논문 찾기 (영어논문 1개, 국내논문 3개)
- 논문은 empirical study를 지향하는 것 (연구문제 혹은 가설을 포함하는 사회과학 논문)이어야 합니다.
- 각 논문을 APA style의 참고문헌목록 형식으로 소개하고
- APA 형식은 언론관련학술지논문작성지침.hwp 참조
- 각 논문이 왜 자신의 논문과 관련이 있는지 자신의 글로 정리하여 기록
- 가설 혹은 연구문제가 있다면 무엇이었는지 정리 후 기록
- 이를 토대로 자신의 가설을 만들어 보기 (3)
- Ajou BB journal에서 수행: assignment-w05: building hypotheses
Week06 (<del>Oct 9</del>, 12)
Oct 9: Hangul Day
Concepts and ideas
- 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
Matrix Calculation
Social Network Analysis
Announcement
- First quiz
- The quiz will be held during the mid term schedule.
- 1st quiz + Week 07 materials.
- Two sets:
- without materials
- with materials (textbook + r help)
- No internet connection
Assignment
Week07 (Oct 16, 19)
Concepts and ideas
- 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
Assignment
개인과제
교재를 읽고
- Chi-square test를 할 수 있는 가설과
- One sample t-test를 할 수 있는 가설
- Two sample t-test를 할 수 있는 가설을 만들어 오시오.
Week08 (Oct 23, 26)
Mid-term period
Week09 (Oct 30, Nov 2)
Concepts and ideas
General Statistics
t-test 참조
ANOVA 참조
Factorial ANOVA 참조
- 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
Assignment
Week10 (Nov 6, 9)
Concepts and ideas
General Statistics
Oneway ANOVA
Twoway ANOVA
Assignment
Week11 (Nov 13, 16)
Concepts and ideas
- 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
Week12 (Nov 20, 23)
Announcement
Quiz 03: 다음 주 수요일
범위: input and output ~ twoway ANOVA
방법: 필기(20분) 및 실기 (50분)
Concepts and ideas
Graphics
Assignment
Week13 (Nov 27, 30)
Concepts and ideas
Regression Multiple Regression
Linear Regression and ANOVA
- Introduction
- Performing Simple Linear Regression
- Performing Multiple Linear Regression
- Getting Regression Statistics
- Understanding the Regression Summary
- Performing Linear Regression Without an Intercept
- Performing Linear Regression with Interaction Terms
- Selecting the Best Regression Variables
- Regressing on a Subset of Your Data
- Using an Expression Inside a Regression Formula
- Regressing on a Polynomial
- Regressing on Transformed Data
- Finding the Best Power Transformation (Box?Cox Procedure)
- Forming Confidence Intervals for Regression Coefficients
- Plotting Regression Residuals
- Diagnosing a Linear Regression
- Identifying Influential Observations
- Testing Residuals for Autocorrelation (Durbin?Watson Test)
- Predicting New Values
- Forming Prediction Intervals
- Performing One-Way ANOVA
- Creating an Interaction Plot
- Finding Differences Between Means of Groups
- Performing Robust ANOVA (Kruskal?Wallis Test)
- Comparing Models by Using ANOVA
Assignment
- Do Ex 1 part in linear regression
Week14 (Dec 4, 7)
Concepts and ideas
Linear Regression and ANOVA
http://commres.net/wiki/text_mining_example_with_korean_songs
Assignment
- 자신의 전공과 관심사에 맞는 아래의 테스트를 수행하기 위한 가설을 작성하시오.
- T-test
- F-test
- factorial f-test
- Simple regression
- Multiple regression
- 각 가설의 독립변인과 종속변인을 밝히고 이를 측정하는 방법에 대해서 논하시오.
- 가설과 관련이 있는 논문을 찾아서 (적어도 하나 이상씩) 관련 논문이 밝힌 것을 설명하고 자신의 가설과의 연관성을 논하시오.
- 각 가설에 필요한 데이터를 구한 후, 적절한 테스를 하시오 (r의 인풋과 아웃풋 필요).
- 테스트 결과를 논하시오.
Week15 (Dec 11, 14)
Group Presentation
Week16 (Dec 18, 21)
Group Presentation
Final-term
2016-12-16 시험 금2,금4교시 금(10:30-12:30)
Week 04 -
필기 + 실기 시험
필기시험 해답