|
ADDM.cpp
|
Implementation of a single aDDMTrial object. More...
#include <addm.h>
Public Member Functions | |
| aDDMTrial (unsigned int RT, int choice, float valueLeft, float valueRight, vector< int > fixItem={}, vector< int > fixTime={}, vector< float > fixRDV={}, float uninterruptedLastFixTime=0) | |
| Construct a new aDDM Trial object. | |
| aDDMTrial () | |
| Construct an empty aDDMTrial object. | |
Public Member Functions inherited from DDMTrial | |
| DDMTrial (unsigned int RT, int choice, float valueLeft, float valueRight) | |
| Construct a new DDMTrial object. | |
| DDMTrial () | |
| Construct an empty DDMTrial object. | |
Static Public Member Functions | |
| static void | writeTrialsToCSV (vector< aDDMTrial > trials, string filename) |
| Write a vector of aDDMTrials to a CSV file. | |
| static vector< aDDMTrial > | loadTrialsFromCSV (string filename) |
| Load a dataset of aDDMTrials into program memory. | |
Static Public Member Functions inherited from DDMTrial | |
| static void | writeTrialsToCSV (vector< DDMTrial > trials, string filename) |
| Write a vector of DDMTrials to a CSV file. | |
| static vector< DDMTrial > | loadTrialsFromCSV (string filename) |
| Load a dataset of DDMTrials into program memory. | |
Public Attributes | |
| vector< int > | fixItem |
| vector< int > | fixTime |
| vector< float > | fixRDV |
| float | uninterruptedLastFixTime |
Public Attributes inherited from DDMTrial | |
| unsigned int | RT |
| int | choice |
| float | valueLeft |
| float | valueRight |
| vector< float > | RDVs |
| int | timeStep |
Implementation of a single aDDMTrial object.
An aDDMTrial can either be generated by simulating data trials or loading from a CSV. A single trial represents an individual binary perceptual choice made by one subject. These trials can be aggregated together for model fitting and likelihood computations.
| aDDMTrial::aDDMTrial | ( | unsigned int | RT, |
| int | choice, | ||
| float | valueLeft, | ||
| float | valueRight, | ||
| vector< int > | fixItem = {}, | ||
| vector< int > | fixTime = {}, | ||
| vector< float > | fixRDV = {}, | ||
| float | uninterruptedLastFixTime = 0 ) |
Construct a new aDDM Trial object.
| RT | Response time in milliseconds. |
| choice | Either -1 for the left item or +1 for the right item. |
| valueLeft | Value of the left item. |
| valueRight | Value of the right item. |
| fixItem | Vector of integers representing the items fixated on during the trial in chronological order. 1 corresponds to left, 2 corresponds to right, and any other value is considered a transition or blank fixation. |
| fixTime | Vector of integers corresponding to the duration of each fixation. Must be equal in size to fixItem. |
| fixRDV | Vector of floats corresopnding to the RDV values at the end of each fixation. |
| uninterruptedLastFixTime | Integer corresponding to the duration (milliseconds) that the last fixation in the trial would have if it had not been terminated when a decision had been made. |
|
inline |
Construct an empty aDDMTrial object.
|
static |
Load a dataset of aDDMTrials into program memory.
| filename | Location of the data trials. |
|
static |
Write a vector of aDDMTrials to a CSV file.
| trials | Vector of trials to be saved. |
| filename | File to store the trials in. |
| vector<int> aDDMTrial::fixItem |
Vector of integers representing the items fixated on during the trial in chronological order. 1 corresponds to left, 2 corresponds to right, and any other value is considered a fixation or blank fixation.
| vector<float> aDDMTrial::fixRDV |
Vector of floats corresponding to the RDV values at the end of each fixation.
| vector<int> aDDMTrial::fixTime |
Vector of integers corresponding to the duration of each fixation.
| float aDDMTrial::uninterruptedLastFixTime |
Integer corresponding to the duration (milliseconds) that the last fixation in the trial would have if it had not been terminated when a decision had been made.