plot.RescorlaWagner function

Plot function for the output of RescorlaWagner.

Plot function for the output of RescorlaWagner.

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

## 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}).

Returns

A plot is produced on the graphics device.

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.

Author(s)

R. H. Baayen and Antti Arppe

See Also

RescorlaWagner, orthoCoding

Examples

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)
  • Maintainer: Tino Sering
  • License: GPL-3
  • Last published: 2018-09-10

Useful links