Description Usage Arguments Details Value See Also Examples
A function to divide the response time data into a fixed number of small consecutive intervals or bins, in a way that is optimal given the distribution of the reponse time data. This involves finding an optimal offset (or start) of bining, and possily an optimal bin size.
| 1 2 3 4 | 
| RT | a numeric vector containing the raw response time information | 
| maxRT | numeric. Maximum duration of response time above which will be trimmed for the estimation. | 
| breaksize | a single number representing the size of bins (in milisecond) used in the intermediate step. | 
| startbin | integer. | 
| endbin | integer. | 
| binsize | a single number corresponding to the initial (and final if  | 
| type | a character string indicating whether to use the window of prespecified width ("fixed") or the widow of data-specific width ("free"). | 
| add.two | logical. An option for compatibility. If  | 
| shift.edge | logical. An option forcompatibility with old codes. If  | 
This function is meant to be called internally from a wapper function get.bins.
The optimal timing bin size (if window="free") and offset are estimated by fitting the half-rectified sine wave against the histgram of response data.
A list containing:
| maxRT, breaksize, endbin, binsize, type | same as scpecified in the arguemnts | 
| peaktime | a vector of time points representing peak in each time bin | 
| offset | difference in time between the offset of the stimulus and the onset of the fastest response. | 
| fit | root mean squared distance between the actual distribution of the data and the half-rectified sine wave | 
| phase | phase (in ms) for the sign wave function. | 
| omega | fitted window size. If  | 
| rt.hist | an object of class "histogram", with  | 
| amp | amplitude for the sign wave function. | 
| 1 2 3 4 5 | data(Auditory_demo)
rt_col <- grep("rt[0-3][0-9]",colnames(Auditory_demo), value=TRUE)
RT <- Auditory_demo[,rt_col]
d.opt <- opt.bins(unlist(na.omit(RT)))
plot(d.opt)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.