-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hit and signal regressions per subject #25
Comments
@psokolhessner I've added the ideas from above for regressions, the first of which found here: https://github.com/sokolhessnerlab/itrackvalr/blob/main/notebooks/behavioral_data_preprocessing.md#predict-is_hit-using-signal_time The models as written output fit warnings, one of which is common to both: The |
Ah that warning ( |
The |
When running models, you want to store their output too. So the calls to
What to name the models... we may be working with them quite a bit, so keeping names clear but also not too long would be good. Here, I'd consider a name that features some text that indicates this is regression output, e.g. |
Left suggestions for how to do this in the RMD file with this commit: e2efb35 |
@psokolhessner thanks for all of this. I updated the Predicting ## Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) [glmerMod
## ]
## Family: binomial ( logit )
## Formula: is_hit ~ 1 + signal_time + (1 | id)
## Data: scaled_combined_hits_df
##
## AIC BIC logLik deviance df.resid
## 2307.5 2323.9 -1150.7 2301.5 1797
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.494411658 -0.784968172 -0.477289551 0.902517615 2.366707656
##
## Random effects:
## Groups Name Variance Std.Dev.
## id (Intercept) 0.698673966 0.835867194
## Number of obs: 1800, groups: id, 50
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.230697540 0.157237994 1.46719 0.14233
## signal_time -0.859634004 0.182285149 -4.71588 2.4067e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## signal_time -0.572 Predicting ## Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
## Formula: reaction_time ~ 1 + signal_time + (1 | id)
## Data: scaled_combined_hits_df %>% na.omit()
##
## REML criterion at convergence: 2463
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.856746002 -0.522942508 -0.203867491 0.199189511 5.955977930
##
## Random effects:
## Groups Name Variance Std.Dev.
## id (Intercept) 0.253031509 0.503022374
## Residual 1.067215435 1.033061196
## Number of obs: 821, groups: id, 50
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 1.424493424 0.100223741 105.550683060 14.21313 < 2.22e-16 ***
## signal_time 0.774275825 0.128541525 793.026666766 6.02355 2.6097e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## signal_time -0.585 |
Models to run: Predict the probability of a hit by signal time with signal time random effects is_hit ~ 1 + signal_time + (1 + signal_time | id) Predict the reaction time for a hit by signal time with signal time random effects reaction_time ~ 1 + signal_time + (1 + signal_time | id) Predict the probability of a false alarm by response time is_false_alarm ~ 1 + resp_time + (1 | id) Predict the probability of a false alarm by response time with response time random effects is_false_alarm ~ 1 + resp_time + (1 + resp_time | id) Note:
Checklist:
|
A tweak to the definition of Alternatively, variable can be identified as |
I think it's clearer to identify boolean variables as For example, the strictly boolean variable |
Per conversation, will transition to use |
Plus: |
The models we've discussed are now part of the main pipeline via the |
Fantastic. Really nice, clear evidence - with increasing time in the task, people...
(note the careful phrasing of no. 3; if we wanted to say "are more likely to false alarm when no signal is present", that would require a fourth regression or pair of regressions on Interesting to note how robust all of these effects are - fully RFX models identify the exact same effects, implying that most participants experience the effects of the passage of time on hits, reaction time, and false alarms in the same or very similar ways. Visualization or characterization of the individual-level estimates (either given by The remaining items from the checklist above (#25 (comment) - mainly plotting model output, and mean p(hit) by half) will nicely wrap this up. Thank you @aridyckovsky this is looking great!! |
TODO:
is_hit
logical column (0, 1)Potential regression ideas:
The text was updated successfully, but these errors were encountered: