plot.RescorlaWagner: Plot function for the output of 'RescorlaWagner'.

Description Usage Arguments Value Author(s) References See Also Examples

Description

This function graphs the Rescorla-Wagner weights for a cue-outcome pair against learning time.

Usage

1
2
## S3 method for class 'RescorlaWagner'
plot(x, asymptote=TRUE, xlab="t", ylab="weight", ylimit=NA, ...)

Arguments

x

A object of the class "RescorlaWagner" produced by RescorlaWagner, consisting of a list including estimated weights for the incremental and equilibrium stages.

asymptote

A logical specifying whether the equilibrium asymptotic weight should be added to the plot.

xlab

Label for x-axis, by default "t".

ylab

Label for y-axis, by default "weight".

ylimit

The range of values to be displayed on the Y axis. By default, this will be determined from the data itself.

...

Arguments to be passed to methods, such as graphical parameters (see link{par}).

Value

A plot is produced on the graphics device.

Author(s)

R. H. Baayen and Antti Arppe

References

Danks, D. (2003). Equilibria of the Rescorla-Wagner model. Journal of Mathematical Psychology, 47 (2), 109-121.

Rescorla, R. A., & Wagner, A. R. (1972). A theory of Pavlovian conditioning: Variations in the effectiveness of reinforcement and nonreinforcement. In Black, A. H., & Prokasy, W. F. (Eds.), Classical conditioning II: Current research and theory (pp. 64-99). New York: Appleton-Century-Crofts.

See Also

RescorlaWagner, orthoCoding

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
data(lexample)
lexample$Cues <- orthoCoding(lexample$Word, grams=1)
lexample.rw <- RescorlaWagner(lexample, nruns=25, 
   traceCue="h", traceOutcome="hand")
plot(lexample.rw)
mtext("h - hand", 3, 1)

# Full example

## Not run: 
par(mfrow=c(2,2))
lexample.rw <- RescorlaWagner(lexample, nruns=25, 
   traceCue="h", traceOutcome="hand")
plot(lexample.rw)
mtext("h - hand", 3, 1)

lexample.rw <- RescorlaWagner(lexample, nruns=25, 
   traceCue="s", traceOutcome="plural")
plot(lexample.rw)
mtext("s - plural", 3, 1)

lexample.rw <- RescorlaWagner(lexample, nruns=25, 
   traceCue="a", traceOutcome="as")
plot(lexample.rw)
mtext("a - as", 3, 1)

lexample.rw <- RescorlaWagner(lexample, nruns=25, 
   traceCue="s", traceOutcome="as")
plot(lexample.rw)
mtext("s - as", 3, 1)
par(mfrow=c(1,1))

## End(Not run)

ndl documentation built on May 2, 2019, 10:28 a.m.