+ All Categories
Home > Documents > Analysis of RT distributions with R

Analysis of RT distributions with R

Date post: 05-Jan-2016
Category:
Upload: rasha
View: 23 times
Download: 1 times
Share this document with a friend
Description:
Analysis of RT distributions with R. Emil Ratko-Dehnert WS 2010/ 2011 Session 09 – 18.01.2011. Last time. Recap of contents so far (Chapter 1 + 2) Hierarchical Interference (Townsend‘s system) Functional forms of RVs Density function (TAFKA „distribution“) - PowerPoint PPT Presentation
Popular Tags:
41
Analysis of RT distributions with R Emil Ratko-Dehnert WS 2010/ 2011 Session 09 – 18.01.2011
Transcript
Page 1: Analysis of RT distributions with R

Analysis of RT distributionswith R

Emil Ratko-DehnertWS 2010/ 2011

Session 09 – 18.01.2011

Page 2: Analysis of RT distributions with R

Last time...

• Recap of contents so far (Chapter 1 + 2)

• Hierarchical Interference (Townsend‘s system)

• Functional forms of RVs

– Density function (TAFKA „distribution“)

– Cumulative distribution function

– Quantiles

– Kolmogorov-Smirnof test2

Page 3: Analysis of RT distributions with R

RT DISTRIBUTIONS IN THE FIELD

3

II

Page 4: Analysis of RT distributions with R

RTs in visual search

4

Page 5: Analysis of RT distributions with R

Why analyze distribution?

1. Normality assumption almost always violated

2. Experimental manipulations might affect only

parts of RT distribution

3. RT distributions can be used to constrain

models e.g. of visual search (model fitting and

testing)5

Page 6: Analysis of RT distributions with R

RT distributions

• Typically unimodal and positively skewed

• Can be characterized by e.g. the following

distributions

6

Ex-Gauss Ex-Wald

Gamma Weibull

Page 7: Analysis of RT distributions with R

Ex-Gauss distribution

• Introduced by Burbeck and Luce (1982)

• Is the convolution of a normal and an

exponential distribution

• Density:

2

2

2

2exp

1),,;(

tt

tf

7

Ex-Gauss

CDF of N(0,1)

Page 8: Analysis of RT distributions with R

Convolution• ... is a modified version of the two original functions

• It is the integral of the product of the two functions

after one is reversed and shifted:

dtgftgf )()())(*(

8

Ex-Gauss

Page 9: Analysis of RT distributions with R

9-4 -2 0 2 4 6 8 10

0.0

0.1

0.2

0.3

0.4

0.5

Manipulating gaussian parameters

xx

y1

exg(mu=0, sigma=1, nu=1)exg(mu=2, sigma=1, nu=1)exg(mu=0, sigma=3, nu=1)exg(mu=0, sigma=0.5, nu=1)

Page 10: Analysis of RT distributions with R

10-5 0 5 10

0.0

0.2

0.4

0.6

0.8

1.0

Manipulating gaussian parameters

xx

y1

exg(mu=0, sigma=1, nu=1)exg(mu=2, sigma=1, nu=1)exg(mu=0, sigma=3, nu=1)exg(mu=0, sigma=0.5, nu=1)

Page 11: Analysis of RT distributions with R

11-4 -2 0 2 4 6 8 10

0.0

00

.05

0.1

00

.15

0.2

00

.25

0.3

0

Manipulating exponential parameter

xx

y5exg(mu=0, sigma=1.5, nu=0.5)exg(mu=0, sigma=1.5, nu=1)exg(mu=0, sigma=1.5, nu=2)exg(mu=0, sigma=1.5, nu=5)exg(mu=0, sigma=1.5, nu=9)

Page 12: Analysis of RT distributions with R

120 5 10 15

0.0

0.2

0.4

0.6

0.8

1.0

Manipulating exponential parameter

xx

y5

exg(mu=0, sigma=1.5, nu=0.5)exg(mu=0, sigma=1.5, nu=1)exg(mu=0, sigma=1.5, nu=2)exg(mu=0, sigma=1.5, nu=5)exg(mu=0, sigma=1.5, nu=9)

Page 13: Analysis of RT distributions with R

Why popular?

• Components of Ex-Gauss might correspond to

different mental processes

– Exponential Decision; Gaussian Residual

perceptual and response-generating processes

• It is known to fit RT distributions very well

(particularly hard search tasks)

• One can look at parameter dynamics and infer on

trade-offs13

Ex-Gauss

Page 14: Analysis of RT distributions with R

Further reading• Overview:

– Schwarz (2001)

– Van Zandt (2002)

– Palmer, et al. (2009)

• Others:

– McGill (1963)

– Hohle (1965)

– Ratcliff (1978, 1979)

– Burbeck, Luce (1982)

– Hockley (1984)

– Luce (1986)

– Spieler, et al. (1996)

– McElree & Carrasco (1999)

– Spieler, et al. (2000)

– Wagenmakers, Brown (2007)

14

Ex-Gauss

Page 15: Analysis of RT distributions with R

Ex-Wald distribution

• Is the convolution of an exponential and a Wald

distribution

• Represents decision and response components

as a diffusion process (Schwarz, 2001)

15

Ex-Wald

Page 16: Analysis of RT distributions with R

Ex-Wald density

where

16

Ex-Wald

Page 17: Analysis of RT distributions with R

Diffusion Process

17

A

B

z

drift rate ~N(ν,η)

time

Evid

ence

Boundary separation

Mean drift ν

Respond „A“

Respond „B“

Information space

Ex-Wald

Page 18: Analysis of RT distributions with R

Qualitative Behaviour

18

A2

0

A1

time

lax criterion

strict criterion

larger drift rate

smaller drift rate

Decision times for lax and strict criterion

Ex-Wald

Page 19: Analysis of RT distributions with R

19200 300 400 500 600 700

0.0

00

0.0

02

0.0

04

0.0

06

0.0

08

Ex-Wald densities

xx

y1exwald(mu=0.320, sigma=1, a = 108, gamma = 1/22)exwald(mu=0.356, sigma=1, a = 111, gamma = 1/22)exwald(mu=0.321, sigma=1, a = 97, gamma = 1/22)exwald(mu=0.348, sigma=1, a = 98, gamma = 1/20)

Page 20: Analysis of RT distributions with R

20200 300 400 500 600 700

0.0

0.2

0.4

0.6

0.8

1.0

Ex-Wald distributions

xx

y1

exwald(mu=0.320, sigma=1, a = 108, gamma = 1/22)exwald(mu=0.356, sigma=1, a = 111, gamma = 1/22)exwald(mu=0.321, sigma=1, a = 97, gamma = 1/22)exwald(mu=0.348, sigma=1, a = 98, gamma = 1/20)

Page 21: Analysis of RT distributions with R

Why popular?

• Parameters can be interpreted psychologically

• Very successful in modelling RTs for a number of

cognitive and perceptual tasks

• Are neurally plausible

– Neuronal firing behaves like a diffusion process

– Observed via single cell recordings

21

Ex-Wald

Page 22: Analysis of RT distributions with R

Further reading

• Theoretical Papers:

– Schwarz (2001, 2002)

– Ratcliff (1978)

– Heathcote (2004)

– Palmer, et al. (2005)

– Wolfe, et al. (2009)

• Cognitive+perceptual tasks:

– Palmer, Huk & Shadlen (2005)

• Visual Search:

– Reeves, Santhi & Decaro

(2005)

– Palmer, et al. (2009)

22

Ex-Wald

Page 23: Analysis of RT distributions with R

Gamma distribution

• Series of exponential distributions

• α = average scale of processes

• β = reflects approximate number of processes

23

Gamma

Page 24: Analysis of RT distributions with R

240 2 4 6 8 10 12

0.0

0.1

0.2

0.3

0.4

0.5

Gamma densities

xx

y1gamma(shape = 1, scale = 2)gamma(shape = 2, scale = 2)gamma(shape = 3, scale = 2)gamma(shape = 5, scale = 1)gamma(shape = 9, scale = 0.5)

Page 25: Analysis of RT distributions with R

25

0 5 10 15 20

0.0

0.2

0.4

0.6

0.8

1.0

Gamma distributions

xx

y1

gamma(shape = 1, scale = 2)gamma(shape = 2, scale = 2)gamma(shape = 3, scale = 2)gamma(shape = 5, scale = 1)gamma(shape = 9, scale = 0.5)

Page 26: Analysis of RT distributions with R

Why popular?

• In fact, not too popular (publication-wise)

• It has very decent fits, when assuming a

model, that sees RT distributions as composed

of three exponentially distributed processes

(Initial feed-forward search response selection)26

Gamma

Page 27: Analysis of RT distributions with R

Further reading

• Dolan, van der Maas, & Molenaar (2002):

A framework for ML estimation of parameters

of (mixtures of) common reaction time distri-

butions given optional truncation or censoring

(in Behavioral Research Methods, Instruments

& Computers, 34(3), 304-323)

27

Gamma

Page 28: Analysis of RT distributions with R

Weibull Distribution• Like a series of races (bounded by 0 and ∞) the

weibull distribution renders an asymptotic

description of their minima

• Johnsons (1994) version as 3 parameters: α, γ, ξ

– For γ = 1 exp. distr., for γ ~ 3.6 normal distr.

– Hence γ must lie somewhere in between28

Weibull

Page 29: Analysis of RT distributions with R

290 1 2 3 4 5 6 7

0.0

0.2

0.4

0.6

0.8

1.0

Weibull densities

xx

y1weibull(shape = 1, scale = 1)weibull(shape = 1, scale = 2)weibull(shape = 1.5, scale = 1)weibull(shape = 2, scale = 2)weibull(shape = 2, scale = 3)weibull(shape = 3.6, scale = 3)

Page 30: Analysis of RT distributions with R

300 1 2 3 4 5 6 7

0.0

0.2

0.4

0.6

0.8

1.0

Weibull distributions

xx

y1

weibull(shape = 1, scale = 1)weibull(shape = 1, scale = 2)weibull(shape = 1.5, scale = 1)weibull(shape = 2, scale = 2)weibull(shape = 2, scale = 3)weibull(shape = 3.6, scale = 3)

Page 31: Analysis of RT distributions with R

Why popular?

• Has been used in a variety of cognitive tasks

• Excels in those, which can be modeled as a

race among competing units (e.g. Memory

search RTs)

• Has decent functional fits31

Weibull

Page 32: Analysis of RT distributions with R

Further reading

• Logan (1992)

• Johnson, et al. (1994)

• Dolan, et al. (2002)

• Chechile (2003)

• Rouder, Lu, Speckman, Sun & Jiang (2005)

• Cousineau, Goodman & Shiffrin (2002)

• Palmer, Horowitz, Torrabla, Wolfe (2009)

32

Weibull

Page 33: Analysis of RT distributions with R

Comparing functional fits• Null hypothesis is fit of data with normal distribution

(standard assumption for mean/var analysis)

• All proposed distributions beat the gaussian, but not

equally well

1) Ex-Gauss, 2) Ex-Wald, 3) Gamma, 4)Weibull

• Also the first three have similar parameter trends

• For further reading, see the simulation study by

Palmer, Horowitz, Torrabla, Wolfe (2009)33

Page 34: Analysis of RT distributions with R

EXCURSION: BOOTSTRAPPING

34

Page 35: Analysis of RT distributions with R

Basic idea

• In statistics, bootstrapping is a method to assign

accuracy to sample estimates

• This is done by resampling with replacements

from the original dataset

• By that one can estimate properties of an

estimator (such as its variance)

• It assumes IID data35

Page 36: Analysis of RT distributions with R

Ex: Bootstrapping the sample mean

• Original data: X = x1, x2, x3, ..., x10

• Sample mean: X = 1/10 * (x1 + x2 + x3 + ... + x10)

• Resample data to obtain a bootstrap means:

X1* = x2, x5, x10, x10, x2, x8, x3, x10, x6, x7 μ1*

• Repeat this 100 times to get μ1*, ..., μ100*

• Now one has an empirical bootstrap distribution of μ

• From this one can derive e.g. the bootstrap CI of μ36

Page 37: Analysis of RT distributions with R

Pro bootstrapping

• It is ...

– simple and easy to implement

– straightforward to derive SE and CI for complex

estimtors of complex parameters of the distribution

(percentile points, odds ratio, correlation coefficients)

– an appropriate way to control and check the stability of

the results

37

Page 38: Analysis of RT distributions with R

Contra bootstrapping

• Under some conditions it is asymptotically

consistent, so it does not provide general finite-

sample guarantees

• It has a tendency to be overly optimistic (under-

estimates real error)

• Application not always possible because of IID

restriction38

Page 39: Analysis of RT distributions with R

Situations to use bootstrapping

1. When theoretical distribution of a statistic is compli-

cated or unknown

2. When the sample size is insufficient for straight-

forward statistical inference

3. When power calculations have to be performed and

a small pilot sample is availible

• How many samples are to be computed?

As much as your hardware allows for... 39

Page 40: Analysis of RT distributions with R

AND NOW TO

40

Page 41: Analysis of RT distributions with R

Creating own functionsnew.fun <- function(arg1, arg2, arg3){

x <- exp(arg1)

y <- sin(arg2)

z <- mean(arg2, arg3)

result <- x + y + z

result

}

A <- new.fun(12, 0.4, -4)41

„inputs“

„output“

Algo

rithm

of f

uncti

on

Usage of new.fun


Recommended