Why? • Not always lots of RA opportunities in our laboratory from semester to semester. • Provide opportunity for awesome students who applied or from recent classes to gain some experiences. • To translate some cognitive science into day-to- day practice , hone training materials, disseminate resources, etc. Caveats Goals • This workshop will be a rough draft . • Learn some solid RStudio . • Material may not always be super clear, however I will be • Learn how to plot and describe data that is here to collaborate on RStudio. organized in time. • Apply this knowledge to real-world case studies. • Today : we start slow and simple just to get everyone on the same page.
COMPLEX DYNAMICAL SYSTEMS IN SOCIAL AND PERSONALITY PSYCHOLOGY 269 Time Series Types 15 50 Limb Posi � on 40 12 Anxiety 30 9 20 6 10 measurement sampling 0 3 0 5 10 15 20 25 30 35 40 45 50 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Time (seconds) Session 9 1500 8 Self-Esteem 7 RT (msec) 1000 6 regular irregular 5 500 4 3 2 0 1 65 129 193 257 321 385 449 513 577 641 705 769 833 897 961 64 128 192 256 320 384 448 512 Trial Trial measurement type 6 3 Daily Hedonic Level 2 5 Numeric Code 1 4 second-by-second word sequence in a 3 categorical 0 emotion type conversation -1 2 -2 1 -3 0 1 8 15 22 29 36 43 50 57 64 71 78 0 500 1000 1500 2000 2500 3000 3500 Time (seconds) Time (msec) brain waves or motion reaction time , or arm while walking (Harrison & Richardson, 2009). In Figure 11.8. Hypothetical examples of several types of behav- continuous ioral time series. (top left) Change in anxiety level for an indi- other cases the patterns of change over time are highly tracking keystrokes ( trial series ) vidual over 50 therapy sessions. (middle left) An individual’s complex and appear to be nondeterministic or stochas- self-esteem recorded on a 9-point Likert-scale twice a day for tic (i.e., random): an individual’s self-esteem over the 512 days. (bottom left) An individual’s daily hedonic (mood) course of 1.5 years (see Deligni` eres et al., 2004) and level recorded over 12 weeks. (top right) Motion sensor record- the trial-by-trial RT and an individual completing a ing of a individuals right arm movements while walking. (mid- 512 trial lexical decision task (see Holden, 2005). Oth- dle right) Reaction times of a participant completing a 512 ers seem to fall somewhere in between, containing trial lexical decision task. (bottom right) A time series repre- senting categorical data obtained from eye movement behav- semi-periodic patterns or other complex regularities. Recap Day 1 • Setting up RStudio • Navigating your computer to get to your working directory (setwd) • Loading in a table (read.table) for inspection and plotting (plot) • Time series concepts.
Time Series Types reaction time! measurement sampling 1500 RT (msec) 1000 continuous trial series 500 regular irregular 0 64 128 192 256 320 384 448 512 Trial 6 measurement type motion tracking! second-by-second word sequence in a categorical emotion type conversation 15 Limb Posi � on 12 continuous regular 9 6 3 brain waves or motion reaction time , or 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Time (seconds) continuous tracking keystrokes ( trial series ) quantities for continuous time series Goals Day 2 15 Limb Posi � on 12 mean • Taking the mean and standard deviation (sd) of deviation 9 your time series. 6 (sd) 3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 • The concept of entropy as a measure of “disorder” Time (seconds) • Taking the difference (diff) of your time series to explore how “stable” a process it. • E.g., mental processing during typing • E.g., stock prices
examples quantities for continuous time series lower entropy 15 Limb Posi � on 12 RT mean deviation 9 6 (sd) t 3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Time (seconds) + a new measure of disorder higher entropy entropy RT how (in)consistent the higher the is the time series in entropy, the more general its values? “disorder” in the time series t examples lower entropy RT t Exercise 4 higher entropy RT t
example of taking the difference entropy of differences RT t RT t example of taking the difference example of taking the difference 0 0 0 0 0 0 lower entropy 100 100 100 100 100 100 100 100 0 0 RT 0 0 RT 0 0 t t higher entropy 32 34 … 32 34 … 24 21 24 21 RT RT 18 18 t t
how do we get the difference, like this? entropy of differences 0 0 0 lower entropy 100 100 100 100 0 RT 0 0 t (0, 100, 0, 100, 0, 100, 0, 0, …) entropy of differences Exercise 5
Recap Days 1, 2 • Setting up RStudio • Taking the mean and standard deviation ( sd ) of your time series. • Navigating your • The concept of entropy as a computer to get to measure of “disorder” your working directory ( setwd ) • Taking the difference ( diff ) of your time series to explore how “stable” • Loading in a table a process it. ( read.table ) for inspection and plotting • E.g., mental processing during ( plot ) typing • Time series concepts . • E.g., stock prices Goals Day 3 more fun • How to subset data. with dynamic • E.g.: Deleting outliers from your data (like a 47-second data keystroke!?) • “ Devilish details .” • Analyzing typing speed for individuals characters (e.g., ‘e’ vs. ‘p’). • Which do you think would be faster? • Experience collecting dynamic data with eye tracking.
Plan for Eye Tracking • Used a “relay” method for training • I will get things prepped at the back of the room. Exercise 6 • Kevin will join me, and act as my subject as I show him the tracker. • Kevin will then act as me, and train Mario on the eye tracker. • Mario will then act as Kevin, and train Mitzy on the eye tracker, etc. • … Recap Days 1, 2, 3 How to subset data. • • Taking the mean and standard deviation ( sd ) of Setting up RStudio • E.g.: Deleting outliers from your time series. • your data (like a 47-second keystroke!?) • The concept of entropy Navigating your • as a measure of computer to get to your “disorder” working directory “ Devilish details .” • ( setwd ) • Taking the difference Analyzing typing speed for • ( diff ) of your time series Loading in a table individuals characters (e.g., ‘e’ • to explore how “stable” a vs. ‘p’). ( read.table ) for process it. inspection and plotting ( plot ) • E.g., mental Which do you think would be • processing during faster? typing Time series concepts . • Experience collecting dynamic • • E.g., stock prices data with eye tracking.
Goals Last Day! Promise of Data • It is our era… for example, today… • More hands-on training on dynamic data collection ( eye tracking glasses ). society • Mario VR demo!? • Case study in a cultural domain: word frequencies over historical time . • Case study challenge : I give you some data, some basic code, and you hack at it . self Strategies for Next Steps 3 Strategies most structured • 1. Find a structured course online. • E.g.: Coursera. What kind of • 2. Find videos and other structured resources. learner are you? • https://www.youtube.com/channel/ UC5ktyacv_aPSBmKB7uX5Piw • 3. Hack, hack away using Google and manuals most disorder
Skill Concepts • Program planning (“logic in pseudo-code”) • Not even actually programming • Debugging process • When starting out, any time you are writing a script, run each line as you write it . • Learn how to maximize use of online resources • Become familiar with help(function) or an RStudio reference site that can help (e.g.: r-dir.com).
Recommend
More recommend