Skip to content
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

PsPM GLM for PS: exclude_missing settings #346

Open
SerenXia opened this issue Jan 27, 2022 · 2 comments · May be fixed by #699
Open

PsPM GLM for PS: exclude_missing settings #346

SerenXia opened this issue Jan 27, 2022 · 2 comments · May be fixed by #699
Assignees
Labels
Bug Something isn't working Waiting for Feedbacks Waiting for feedbacks from the user
Milestone

Comments

@SerenXia
Copy link
Contributor

SerenXia commented Jan 27, 2022

Summary

The feature of automatically excluding trials with missing data over a cut-off is not working as expected. After model inversion, the algorithm will do save data missing percentage of each trial in the output datafiles, but the information of whether any trial should be excluded is incorrect and exclusion of those trials with a missing percentage over the cut-off set in the model is not done automatically.

Example:

model = struct();
model.modelspec = {'ps_fc'};
model.modelfile = 'output datafile';
model.datafile = 'pupil size data with all trials of one participant';
model.norm = 0;
options = struct('overwrite', 1);
model.timeunits = 'markers';

model.timing = 'timing data, basically it contains timing.names{icondition} with trial names and timing.onsets{icondition} with condition names';
options.exclude_missing.segment_length = 10;
options.exclude_missing.cutoff = 0.5;
model.nuisance = nuisance_fn; % this is optional
mdl = pspm_glm(model, options);

This will produce an output datafile, containing a vector called "glm".

In this file, glm.stats_missing contains missing percentage of each trial with segment length of 10 s; glm.stats_exclude contains whether a trial should be excluded or not (data incorrect; always showed me 1 to exclude trials even though that missing data in that trial is not over 50%); glm.stats_exclude_names contains trials names of those should be excluded, same issue as glm.stats_exclude.

What we want to implement:

  1. correct the information in glm.stats_exclude and glm.stats_exclude_names
  2. fix the bug by making PsPM automatically exclude those trials should be excluded (for example, change glm.stats of these trials to be NaN)
  3. (not 100% sure) would it be a good idea to still save the original stats in glm? so users know the estimates of those excluded trials as well.

Technical Info

  • PsPM version: 5.1.1
  • MATLAB version: 2018b
@teddychao teddychao self-assigned this Feb 2, 2022
@teddychao teddychao added Bug Something isn't working Improvement A minor improvement to the project labels Feb 2, 2022
@teddychao teddychao added this to the v6.0.0 milestone Feb 2, 2022
@teddychao
Copy link
Contributor

The feature of automatically excluding trials with missing data over a cut-off is not working as expected.

Thank you for posting the very clearly explained issue. Could you please send me a sample datafile so that I can find out the error in pspm_glm? Currently that is just a sentence under datafile and I could not process it in PsPM or find out how the glm.stats_exclude was incorrectly calculated. Thanks.

@teddychao teddychao added Waiting for Feedbacks Waiting for feedbacks from the user and removed Improvement A minor improvement to the project labels Feb 7, 2022
@teddychao
Copy link
Contributor

Use the data of design matrix issue.

@teddychao teddychao modified the milestones: v6.0, v6.1 Jan 14, 2023
@teddychao teddychao modified the milestones: v6.1, v6.2 Aug 20, 2023
@teddychao teddychao modified the milestones: v6.1.1, v6.2 Jan 22, 2024
@dominikbach dominikbach linked a pull request Apr 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Waiting for Feedbacks Waiting for feedbacks from the user
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants