Issues with event types #280
-
Hi everyone, In our event structure (created with Matlab and imported into Julia), there are 6 types of event: "Saccade" For each event, the same columns : For "Fixation" events, there are features of the saccade preceding the fixation (amplitude of the saccade,etc). However, for some fixations, the preceding saccade is not taken into account (typically if the fixation is preceded by a blink), so for this fixation, the ‘saccade amplitude’ is NaN. So, finally, in "sac_amplitude", across event types, we have three possibilities: value or NaN or []. And my problems begin when I want to run an EFRP estimation model (i.e. on the “fixation” event) with splines on saccade amplitude, for example. fstim= @formula(0 ~ 1 ) bfstim = firbasis((-0.2, 0.8), sfreq) bfDict = [ "Conflict" => (fstim, bfstim), m = Unfold.fit(
ArgumentError: quantiles are undefined in presence of NaNs or missing values
In fact, it seems to me that Unfold's functions initially consider the whole events structure, rather than just feature of interest depending on the event (ie sac_amplitude for Fixations in this example)? What would you recommend for managing features whose values don't exist for certain events, please? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
thanks for your report! I just did some testing to figure out what's going on. Some questions I think I can adress:
The central question is: What value to put here? This is a problem I don't think there is a right answer to. The general term is "imputation", you could e.g. replace this with an average value of What you could think is to simply model blink onset (or offset? or both?) as a dedicated event, that should cover the activity. I hope my logic is clear! edit: I'm working on providing more helpful error messages in #279 but it is not merged yet |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer But this doesn't entirely solve my problem... In my example, in for the rows concerning the “conflict” event, When I try to model for different types of event (each event, a basis function) with splines on Best, |
Beta Was this translation helpful? Give feedback.
I see - that is a very strange empty object you have there 🙈 this makes the conversion a little bit more complex: