author: Alexander Fengler date: 03.03.2015 font-family: 'Helvetica';
Equations: 2 Items
Fixation left: $$ \begin{aligned} RDV_t = RDV_{t-1} + d(r_{left} - \thetar_{right}) + \epsilon_t \end{aligned} $$
Fixation right: $$ \begin{aligned} RDV_t = RDV_{t-1} + d(\thetar_{left} - r_{right}) + \epsilon_t \end{aligned} $$
Decision taken if $RDV_t > 1$ | $RDV_t < -1$ ....
Acummulate Evidence (Item 1 Fixated):
$$ \begin{align} E^{1}t &= E^{1}{t-1} + dV^{1} + \epsilon_{t} \ E^{2}t &= E^{2}{t-1} + \thetadV^{2} + \epsilon_{t} \ E^{3}t &= E^{3}{t-1} + \thetadV^{3} + \epsilon_{t} \ \end{align*} $$
Compute Global RDV:
$$ \begin{align} RDV^{1}_t &= E^{1}_t - max(E^{2}_t,E^{3}_t) \ RDV^{2}_t &= E^{2}_t - max(E^{1}_t,E^{3}_t) \ RDV^{3}_t &= E^{3}_t - max(E^{1}_t,E^{2}_t) \ \end{align} $$
$$ \begin{align} RDVG_t &= max(RDV^{1}_t, RDV^{2}_t, RDV^{3}_t) \ \end{align} $$
Fixation left (Attribute 1):
$$ \begin{align*}
RDV_t = RDV_{t-1} + d(V^{1}_1 - \thetaV^{2}_1 + \gamma(V^{1}_2 - thetaV^{2}_2)) + \epsilon_t
\end{align*} $$
Decision taken if $RDV_t > 1$ | $RDV_t < -1$ ....
New parameter $\gamma$ that discounts unfixated attributes separately.
left: 30%
Variables:
# Item Valuations
v1 = 2
v2 = 4
# Model
rdv = 0
theta = 0.1
d = 0.002
sd = 0.02
Model:
fixpos.vector = rep(c(1, 2, 1, 2), each = 250)
time = 1
while (rdv < 1 & rdv > -1) {
if (fixpos.vector[time] == 1) {
rdv = rdv + d * (v1 - theta * v2) + rnorm(1, 0, sd)
}
if (fixpos.vector[time] == 2) {
rdv = rdv + d * (theta * v1 - v2) + rnorm(1, 0, sd)
}
time = time + 1
}
We simulate the model (many times) with a given set of parameters...
Then produce table like this,
| Trial id | Choice | RT Bin | Likelihood of event (given our model / parameters)| | ---------|------ |------|----------| |1| 1 | 1800 | 0.03 | |2| 1 | 2200 | 0.05 | |3| 2 | 2000 | 0.04 | |.| . | . | . | |.| . | . | . | |n| 1 | 3000 | 0.02 |
Then we take the sum of the log of the likelihood values.
Standard way of fitting the addm,
define unique trial conditions
build fixation model
simulate model by unique trial condition with own fixation model
Implemented in addmtoolbox. You can supply your own arbitrary fixation model and the package will use it in the simulations.
Example fixation models included. Fixed and random fixation pathways with fixed duration length.
Alternative way of fitting the addm,
simulate model by unique trial
use empirical fixations and rt to inform simulations
no need for separate fixation model for model fits
Implemented in addmtoolbox. Note, that you will still need a fixation model when simulating a fake data set, once you have the optimal parameters!
What does it do for you?
Data Preprocessing
Generate Fake Data
Model Simulation
Model Fitting
Plotting Results
Functions
addm_preprocess()
addm_generate...()
addm_run...()
addm_fit...()
addm_plot...()
What does it do for you?
Internal computations
Evidence Accumulation
Functions
addm_support...( )
aevacc_...( ) (c++)
All functions are documented and available to you!
Every function that has a "2" in it's name (addm2_, aevacc2_) is preferred when working with two items. Other functions with the same name are item general.
General Package info:
?addmtoolbox
Detailed function documentation:
?addm_preprocess
Tutorials:
# List Vignettes
vignette(package = 'addmtoolbox')
# Access Vignette
vignette('addmtoolbox_modelfit_walkthrough')
The addmtoolbox comes with a full set of example data. to make it easier to,
The corresponding data frames are automatically loaded with the package.
View(addm_data_choice)
View(addm_data_eye)
Data Type
Choice/RT Data
Eyetracking Data
Example Loglikelihood output
Detailed aDDM Output
Data Frame
addm_data_choice
addm_data_eye
addm_data_loglik_trial/condition
addm_data_full_output
getwd()
[1] "/Users/admin/OneDrive/git_repos/addmtoolbox/temp/tutorial_intro"
Questions?
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.