Learn R Programming

MLDS (version 0.2-1)

DisplayOneTrial: Helper Functions for Perception of Correlation Difference Scale Experiment

Description

These functions are required by runSampleExperiment to define and display trials. They are provided as examples, and users are expected to define their own functions to define and display stimuli for estimating difference scales along other physical continua. DefineMyScale returns a numeric vector providing the physical levels to be tested (here values of $r$). DisplayOneTrial produces a 2 x 2 graphic of four scatterplots.

Usage

DisplayOneTrial(rr, PntNum = 100, ptSize = 1, 
	xlim = c(-4, 4), ylim = c(-4, 4))
DefineMyScale(rr = c(seq(0, 0.9, len = 10), 0.98))

Arguments

rr
vector of numeric or integer. For DisplayOneTrial, a four element vector of integers, providing the indices of the physical scale values to be displayed. For DefineMyScale, a numeric vector, providing the physical scale values
PntNum
numeric giving the number of points to be displayed in each subgraphic.
ptSize
numeric indicating the size of the points in each graphic, passed to the cex argument of plot.
xlim, ylim
2-element numerics to determine range of values plotted on the display.

Value

  • DisplayOneTrial is used for its side-effect of producing a stimulus on the display. DefineMyScale outputs a numeric vector of the physical scale. While its use here is quite trivial, in general, it permits the tailoring of the stimulus levels to the particular experiment. In the present case, one could imagine, for example, modifying it so that successive levels were evenly spaced in $r^2$ rather than $r$.

See Also

runSampleExperiment

Examples

Run this code
runSampleExperiment(DisplayTrial = "DisplayOneTrial", 
		DefineStimuli = "DefineMyScale")

Run the code above in your browser using DataLab