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

How can i set the contrast in SLM? #349

Closed
Ashley95555 opened this issue Apr 18, 2024 · 1 comment
Closed

How can i set the contrast in SLM? #349

Ashley95555 opened this issue Apr 18, 2024 · 1 comment

Comments

@Ashley95555
Copy link

  • What is the current behavior?
    Now, I expected the results of the interaction effect of gender and group on cortical thickness, but I have no idea how how to set the contrast.

  • Please provide the steps to reproduce and if possible a minimal demo of the problem.

contrast_sex_int = (demographics.group .* ...
                    (demographics.gender == "F")) - ...
                   (demographics.group .* ...
                   (demographics.gender == "M"));
  • What is the expected behavior?
    Wish your reply

  • Please tell us about your computing environment:
    Matlab R2022a

  • Other information

@zihuaihuai
Copy link
Collaborator

zihuaihuai commented Sep 24, 2024

Please refer to this section of the tutorial

Next, we must define a contrast in observations (here: age). With the model, contrast, and cortical thickness data, we can then assess whether there is an effect of age on cortical thickness.
contrast_age = demographics.AGE_AT_SCAN;
mask = fetch_mask('fsaverage5');

slm = SLM( ...
model, ...
contrast_age, ...
'surf', 'fsaverage5', ...
'correction', {'rft', 'fdr'}, ...
'cluster_threshold', 0.01, ...
'mask', mask);
slm.fit(cortical_thickness);

Before we go any further, we can quickly assess the quality and robustness of the fitted model. We can do this for every vertex/parcel on the cortex (default), for one vertex (see example below for vertex #88), or for a set of specific vertices. Our function slm.qc outputs a histogram of the residuals and a qq plot of the residuals versus the theoretical quantile values from a normal distribution. We can also map vertexwise measures of skewness and kurtosis (characterizing the residuals distribution) across the cortex.

If anything is not clear or wrong in the tutorial, feel free to submit a new issue about tutorial, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants