How to specify conditions in the sample object for modeling RT within a factorial design ? #118
-
|
Hi, I am trying to model reaction time data for a behavioral experiment which has a 2 (stimulus_1) x2 (stimulus_2) design. I need separate drift rates for the different conditions. The example in the documentation creates the sample from the solution itself, hence I am not able to find an appropriate example for a factorial design. In my case, the RT is modelled for stimulus_1 (emotion discrimination - Positive or Negative) which is paired with stimulus_2 valence (compatible or incompatible). Here's how I have approached the solution: I've created a custom Drift class to handle the varying drift rates based on the "compatibility" condition: class CustomDrift(Drift): And defined my model as follows: model_1 = Model(name='PvsN', I am struggling to understand how to specify the conditions in the sample object. With my half-baked understanding I would write: The documentation states: " To specify conditions, pass a keyword argument to the constructor. The name should be the name of the property, and the value should be a tuple of length two or three. The first element of the tuple should be a list of length equal to the number of correct trials, and the second should be equal to the number of error trials." It is unclear to me what data do I have to put in the tuple as a list of length equal to the number of correct trials. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
You don't need to use the Sample constructor directly, you can make it from a pandas dataframe. Also, you probably don't want to be using the object oriented interface anymore. Take a look at the quickstart guide which describes the new way of interfacing with PyDDM - I think this guide will address all of your questions. |
Beta Was this translation helpful? Give feedback.
You don't need to use the Sample constructor directly, you can make it from a pandas dataframe. Also, you probably don't want to be using the object oriented interface anymore. Take a look at the quickstart guide which describes the new way of interfacing with PyDDM - I think this guide will address all of your questions.