RescorlaWagner implements an iterative simulation based on the Rescorla-Wagner equations. Given a data frame specifying cues, outcomes, and frequencies, it calculates, for a given cue-outcome pair, the temporal sequence of developing weights.
cuesOutcomes: A data frame specifying cues, outcomes, and frequencies of combinations of cues and outcomes. In the data frame, cues and outcomes should be character vectors.
traceCue: A character string specifying the cue to be traced over time.
traceOutcome: A character string specifying the outcome to be traced over time.
nruns: An integer specifying the number of times the data have to be presented for learning. The total number of learning trials is nruns*sum(cuesOutcomes$Frequency).
random: A logical specifying whether the order of the learning trials for a given run should be randomly reordered. Can be set to FALSE in case all frequencies are 1, and the sequence of learning trials in cuesOutcomes
is given by the order of the rows.
randomOrder: If not NA, a vector specifying the (usually random) order of the learning trials.
alpha: The salience of the trace cue.
lambda: The maximum level of associative strength possible.
beta1: The salience of the situation in which the outcome occurs.
beta2: The salience of the situation in which the outcome does not occur.
Details
The equilibrium weights (Danks, 2003) are also estimated.
Returns
An object of the class "RescorlaWagner", being a list with the following components:
weightvector: A numeric vector with the weights for all nruns*sum(dat[,"Frequency"]) training trials.
equilibriumWeight: The weight of the cue-outcome link at equilibrium.
traceCue: A character string specifying the trace cue.
traceOutcome: A character string specifying the trace outcome.
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.