Description Usage Format Details Slots Built-in DOR functions Make a DOR object from a DOR function References See Also Examples
Delay of Reinforcement Gradients are represented as elements in the DOR class. The use of DORs can be found in Catania (2005) and Berg & McDowell (2011). The DOR class is used to set up the DOR function, that is, its parameters are not set here. Instead, the DOR will go into a DOR_control object that contains both the DOR as well as its associted parameters.
1 2 3 |
The show method prints the function that is contained in the DOR object as well as the type of object (i.e. "elemental") and the class (i.e. "DOR" ).
In the CAB package, objects from classes like DOR are called 'elemental' objects That is, they comprise a particular element of the simulation without any specified parameter values. 'Control' objects are elemental objects with an associated list of parameter values.
The way to put a DOR in your model is as follows:
Code up the function that you want to use for the DOR or use an existing function.
Construct a DOR object from the function.
Make a list specifying the values of the parameters for the DOR function.
Make a DOR_control object, which contains the DOR object and the parameters. See make.control.
The show method for the DOR class can be removed with the function remove.DOR.show() and reinstated with DOR.show.
DORThis will contain a DOR function. See examples.
nameThe name of the DOR object. Inherited from elemental.
typeThis will be elemental because the DOR is an elemental object. Inherited from elemental.
Here is a list of the built-in DOR functions. The function definitions can be seen by calling the name of the function without brackets. For each of these functions, t is the time difference between a response and the latest reinforcement. Each function takes three parameters, t, max as the maximum reinforcement effect of an individual behaviour, and scale as a scaling parameter of the DOR.
linear_DOR_fxA DOR where the reinforcement effect is a linear function of time since latest reinforcement.
f(t) = max - 1/scale * t
Note that the reinforcemet effect is bounded by zero.
exponential_DOR_fxA DOR where the reinforcement effect is an exponential function of the time since latest reinforcement.
f(t) = max * exp( -t/scale )
reciprocal_DOR_fxA DOR where the reinforcement effect is a reciprocal function of the time since latest reinforcement.
f(t) = max / ( t+1 )^( 1/scale )
hyperbolic_DOR_fxA DOR where the reinforcement effect is a hyperbolic function of the time since latest reinforcement.
f(t) = 2 * max / ( ( t + 1 )^( 1/scale ) + 1 )
With respect to the actual implementation of these DOR functions, each of the built-in DOR functions have five arguments.
maxThe maximum increment from an individual response.
scaleA scaling factor on the DOR. The scaling is independent of max.
IRI_resp_timesA vector containing response times counting backward from the most recent reinforcement time.
reserveA numeric specifying the value of the reserve.
input object.The DOR function will return the value of the reserve after the increment.
DOR object from a DOR functionUse the make.DOR function to make a DOR object.
make.DOR(DOR_fx, name)
DOR_fxA function that represents the DOR of interest
nameA character vector specifying the name of your DOR object
Returns a DOR object.
Berg, J. P., & McDowell, J. J (2011). Quantitative, steady-state properties of Catania's computational model of the operant reserve. Behavioural Processes, 87(1), 71-83. https://doi.org/10.1016/j.beproc.2011.01.006
Catania, A. C. (2005). The operant reserve: A computer simulation in (accelerated) real time. Behavioural Processes, 69(2), 257-278. https://doi.org/10.1016/j.beproc.2005.02.009
make.control for making DOR_control objects.
set.custom_elemental for setting custom elemental classes.
make.custom_elemental for making custom elemental objects.
e_show for the function that is called by the show method.
accessor_helpers for the helper functions used in the built-in DOR functions.
class.elemental for the parent elemental class.
get.reserve for a helper function that gets the reserve value.
get.IRI_resp_times for a helper function that gets the inter-reinforcement interval response times.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Look at the definition of the linear DOR
linear_DOR_fx
# Look at the form of the DOR
iri_resp_times = seq(0, 15 , by = 0.1 )
my_DOR = linear_DOR_fx( max = 1, scale = 10, iri_resp_times, reserve_value = 0 )
plot( iri_resp_times, my_DOR, ylab = "increment to the reserve", xlab = "time since last rft" )
# Make a DOR object out of the linear DOR function
linear_DOR = make.DOR( linear_DOR_fx, "linear_DOR" )
# Look at the form of the DOR with the "DOR" object
my_DOR2 = linear_DOR@DOR( max = 1, scale = 10, iri_resp_times, reserve_value = 0, ylab = "increment to the reserve", xlab = "time since last rft" )
plot( iri_resp_times, my_DOR2 )
# Look at the exponential DOR
exponential_DOR_fx
my_expo_DOR = exponential_DOR_fx( max = 1, scale = 10, iri_resp_times, reserve_value = 0 )
plot( iri_resp_times, my_expo_DOR, ylab = "increment to the reserve", xlab = "time since last rft" )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.