help > new to NBS - NBS input
Showing 1-6 of 6 posts
Display:
Results per page:
Apr 29, 2020  09:04 AM | Laura Koster
new to NBS - NBS input
Hi all,

I am new to NBS, therefore I have some questions. I already read the manual and the forum but I have some diffulculties to understand. 
So I will briefly desribe my research: I do have have 10 epilepsy patiens who suffer from both 1) clinical seizures and 2) subclinical seizures. I want to investigate whether the clinical seizures differ from the subclinical seizures. (within subjects?). Is this considered a paired t-test or two-sample t test?

This is what I do have: connectivity matrices of clinical seizures and subclinical seizures. I also averaged them element by element so that I have 1 averaged conn matrix of clinical seizures and 1 averaged conn matrix of subclinical seizures. These matrices are all .mat files

1) How should the input (connectivity matrix) look like? Can you only load 1 connectivity matrix? So that I should concatenate all individual matrices?
2) How should the design matrix look like?
For instance, when I have 3 subjects, should it look like this? 

1100
1010
1001
-1100
-1010
-1001

in which the first column represents the main effect of group/seizures: clincal seizures versus subclinical seizures. and column 2,3,4 model the subject means. Note that all of my subjects have both clinical and subclinical seizures.

3) What should I do for contrast? [1 0 0 0] [-1 0 0 0] ?? or [-1 1], [1 -1]??
4) And exchange blocks (is this necesarry)?

Many thanks,
Laura
Apr 30, 2020  12:04 AM | Andrew Zalesky
RE: new to NBS - NBS input
Hi Laura,

This would be a paired t-test because you have measured two (paired) connectivity matrices for each subject.

The easiest way is to concatenate all the connectivity matrices and input a three-dimensional matrix (nodes x nodes x subjects). This would be a single mat file that contains one three-dimensional matrix. It is important to order the connectivity matrices so that they are consistent with your design matrix. Example order: S1clinical S2clinical S3clinical S1sub S2sub S3sub

Your design matrix is correct.

Your contrast would be [1 0 0 0] and [-1 0 0 0] and select the "t-test" option

Exchange blocks would be helpful. The exchange block would be: [1 2 3 1 2 3]

Andrew

Originally posted by Laura Koster:
Hi all,

I am new to NBS, therefore I have some questions. I already read the manual and the forum but I have some diffulculties to understand. 
So I will briefly desribe my research: I do have have 10 epilepsy patiens who suffer from both 1) clinical seizures and 2) subclinical seizures. I want to investigate whether the clinical seizures differ from the subclinical seizures. (within subjects?). Is this considered a paired t-test or two-sample t test?

This is what I do have: connectivity matrices of clinical seizures and subclinical seizures. I also averaged them element by element so that I have 1 averaged conn matrix of clinical seizures and 1 averaged conn matrix of subclinical seizures. These matrices are all .mat files

1) How should the input (connectivity matrix) look like? Can you only load 1 connectivity matrix? So that I should concatenate all individual matrices?
2) How should the design matrix look like?
For instance, when I have 3 subjects, should it look like this? 

1100
1010
1001
-1100
-1010
-1001

in which the first column represents the main effect of group/seizures: clincal seizures versus subclinical seizures. and column 2,3,4 model the subject means. Note that all of my subjects have both clinical and subclinical seizures.

3) What should I do for contrast? [1 0 0 0] [-1 0 0 0] ?? or [-1 1], [1 -1]??
4) And exchange blocks (is this necesarry)?

Many thanks,
Laura
Apr 30, 2020  10:04 AM | Laura Koster
RE: new to NBS - NBS input
Hi Andrew,

Thank you for your quick and detaied reply!
I do still have some doubts, sorry about this. So to make it clear:
I have patients with both clincal and subclinical seizures. 
However, I do have some patients who have more clinical seizures than subclinical seizures or the other way around (so it is not always equally distrubuted (NOT 1:1), like 1 clinical seizure and 1 subclinical seizure). This is also the reason why I am doubting if it indeed is a paired t-test. 
So for instance subject 1 could have 3 subclinical seizures and 1 clinical seizure and subject 2 could have 1 subclinical seizure and 2 clnical seizures. Is this then still considered a paired t-test? Or should I then average all the seizure events of subclinical seizures and average all seizure events of clinical seizures. Then concatenate, and then treat it like a paired? But when averaging I am scared I loose interesting information of the seizure events. 

Also a question regarding the treshold. How do you determine what the right treshold is?

Many thanks,
Laura
May 1, 2020  01:05 AM | Andrew Zalesky
RE: new to NBS - NBS input
Hi Laura,

You would still need to include a column for each subject in your design matrix because you have multiple connectivity matrices measured in the same individual, and thus modeling the within-subject mean would be useful. So in this sense, your design is still repeated measures.

However, you cannot use exchange blocks if there a different number of matrices were measured in each subject.

To keep things simple, you may want to average all the subclinical connectivity matrices for any given subject. And do the same for the clinical matrices. Therefore, after averaging, you would have one clinical and one subclinical matrix for each subject. 

There is no right or wrong threshold. Try a few different values. This forum has lots of discussion on the choice of threshold.

Andrew



Originally posted by Laura Koster:
Hi Andrew,

Thank you for your quick and detaied reply!
I do still have some doubts, sorry about this. So to make it clear:
I have patients with both clincal and subclinical seizures. 
However, I do have some patients who have more clinical seizures than subclinical seizures or the other way around (so it is not always equally distrubuted (NOT 1:1), like 1 clinical seizure and 1 subclinical seizure). This is also the reason why I am doubting if it indeed is a paired t-test. 
So for instance subject 1 could have 3 subclinical seizures and 1 clinical seizure and subject 2 could have 1 subclinical seizure and 2 clnical seizures. Is this then still considered a paired t-test? Or should I then average all the seizure events of subclinical seizures and average all seizure events of clinical seizures. Then concatenate, and then treat it like a paired? But when averaging I am scared I loose interesting information of the seizure events. 

Also a question regarding the treshold. How do you determine what the right treshold is?

Many thanks,
Laura
May 20, 2020  09:05 AM | Laura Koster
RE: new to NBS - NBS input
Hi Andrew, 

Thank you for your help. I would like to know if I understand it correctly. Can you check my input matrices? 
I have now 7 subjects (after excluding some). I followed your advise and I made an averaged conn. matrix for clinical seizures for each subject.  I did the same for subclinical seizures. So I do have 1 averaged matrix for clinical and 1 averaged matrix for subclinical seizures per subject. After this, I concatenated all these clinical matrices. I did the same for subclincal. Lastly, I concatenated those so that I first have the clinical seizures of the 7 subjects and then the subclinical seizures of those same 7 subjects. 
So you consider this as repeated measures? What statistical test should I select? t-test? or one-sample?

Design matrix (also see attached) --> I was only doubting if the -1 in the design matrix are correct or should be replaced by 0?
1 1 0 0 0 0 0 0
1 0 1 0 0 0 0 0
1 0 0 1 0 0 0 0
1 0 0 0 1 0 0 0
1 0 0 0 0 1 0 0
1 0 0 0 0 0 1 0
1 0 0 0 0 0 0 1
-1 1 0 0 0 0 0 0
-1 0 1 0 0 0 0 0
-1 0 0 1 0 0 0 0
-1 0 0 0 1 0 0 0
-1 0 0 0 0 1 0 0
-1 0 0 0 0 0 1 0
-1 0 0 0 0 0 0 1

exchange block:
[1 2 3 4 5 6 7 1 2 3 4 5 6 7]

contrast:
[1 0 0 0 0 0 0 0] and [-1 0 0 0 0 0 0 0]
And what do those -1 and 1 actually say? I know this is how you specify the hyopthesis that will be tested but how to read it? Is it: clinical greater than/lower than subclinical? or is it subclinical greater/lower than clinical? does this have to do with the order of your matrices?

threshold: 0.5 --> I saw in your previous answers on the forum that you whenever testing for effect size 0.2 (small effect) or above you can calculate the threshold by t = sqrt(n) * 0.2, where n is number of subjects --> in my case t - sqrt (7) * 0.2 = 0.5 Does this seem reasonable? Or should I have done sqrt (14) and consider n as observations, since there are 14 "observations"? but there are 7 subjects (therefore I choose 7) who have both subclinical seizures (one matrix) and clinical seizures (other matrix), so that makes a total of 14 matrices)

Since these data is EEG data I was wondering if I should do something with node coordinates or node labels? And where can I find that information? Or is this not necesarry? (since I don't neccesarily want to view/visualize them, but do statistical test)

Also, I was wondering how many permutations I should fill in? Just take the standard 5000?
And component size: exent or intensity? How do I know which one to choose? 

Many thanks.
Laura

Originally posted by Andrew Zalesky:
Hi Laura,

You would still need to include a column for each subject in your design matrix because you have multiple connectivity matrices measured in the same individual, and thus modeling the within-subject mean would be useful. So in this sense, your design is still repeated measures.

However, you cannot use exchange blocks if there a different number of matrices were measured in each subject.

To keep things simple, you may want to average all the subclinical connectivity matrices for any given subject. And do the same for the clinical matrices. Therefore, after averaging, you would have one clinical and one subclinical matrix for each subject. 

There is no right or wrong threshold. Try a few different values. This forum has lots of discussion on the choice of threshold.

Andrew
Attachment: Designmatrix.txt
May 21, 2020  12:05 AM | Andrew Zalesky
RE: new to NBS - NBS input
HI Laura,

this all looks good to me, including the design matrix, contrast and exchange blocks.

It does not matter if you replace -1 with 0 in the first column. Results will be the same.

Use t-test.

Yes - this would still be repeated measures.

5000 permutations would probably be enough.

The node coordinates will come from your EEG system. You will need to convert them to MNI space. The program should run without any node coordinates - the coordinates are not essential.

The meaning of the contrast depends on the order of the matrices - please refer to the NBS manual for a detailed explanation.

The main concern here is that your sample size of 7 subjects is extremely small. It will be hard to accurately estimate effects sizes with 7 subjects, so I suggest to experiment with a few different thresholds.

Andrew

Originally posted by Laura Koster:
Hi Andrew, 

Thank you for your help. I would like to know if I understand it correctly. Can you check my input matrices? 
I have now 7 subjects (after excluding some). I followed your advise and I made an averaged conn. matrix for clinical seizures for each subject.  I did the same for subclinical seizures. So I do have 1 averaged matrix for clinical and 1 averaged matrix for subclinical seizures per subject. After this, I concatenated all these clinical matrices. I did the same for subclincal. Lastly, I concatenated those so that I first have the clinical seizures of the 7 subjects and then the subclinical seizures of those same 7 subjects. 
So you consider this as repeated measures? What statistical test should I select? t-test? or one-sample?

Design matrix (also see attached) --> I was only doubting if the -1 in the design matrix are correct or should be replaced by 0?
1 1 0 0 0 0 0 0
1 0 1 0 0 0 0 0
1 0 0 1 0 0 0 0
1 0 0 0 1 0 0 0
1 0 0 0 0 1 0 0
1 0 0 0 0 0 1 0
1 0 0 0 0 0 0 1
-1 1 0 0 0 0 0 0
-1 0 1 0 0 0 0 0
-1 0 0 1 0 0 0 0
-1 0 0 0 1 0 0 0
-1 0 0 0 0 1 0 0
-1 0 0 0 0 0 1 0
-1 0 0 0 0 0 0 1

exchange block:
[1 2 3 4 5 6 7 1 2 3 4 5 6 7]

contrast:
[1 0 0 0 0 0 0 0] and [-1 0 0 0 0 0 0 0]
And what do those -1 and 1 actually say? I know this is how you specify the hyopthesis that will be tested but how to read it? Is it: clinical greater than/lower than subclinical? or is it subclinical greater/lower than clinical? does this have to do with the order of your matrices?

threshold: 0.5 --> I saw in your previous answers on the forum that you whenever testing for effect size 0.2 (small effect) or above you can calculate the threshold by t = sqrt(n) * 0.2, where n is number of subjects --> in my case t - sqrt (7) * 0.2 = 0.5 Does this seem reasonable? Or should I have done sqrt (14) and consider n as observations, since there are 14 "observations"? but there are 7 subjects (therefore I choose 7) who have both subclinical seizures (one matrix) and clinical seizures (other matrix), so that makes a total of 14 matrices)

Since these data is EEG data I was wondering if I should do something with node coordinates or node labels? And where can I find that information? Or is this not necesarry? (since I don't neccesarily want to view/visualize them, but do statistical test)

Also, I was wondering how many permutations I should fill in? Just take the standard 5000?
And component size: exent or intensity? How do I know which one to choose? 

Many thanks.
Laura

Originally posted by Andrew Zalesky:
Hi Laura,

You would still need to include a column for each subject in your design matrix because you have multiple connectivity matrices measured in the same individual, and thus modeling the within-subject mean would be useful. So in this sense, your design is still repeated measures.

However, you cannot use exchange blocks if there a different number of matrices were measured in each subject.

To keep things simple, you may want to average all the subclinical connectivity matrices for any given subject. And do the same for the clinical matrices. Therefore, after averaging, you would have one clinical and one subclinical matrix for each subject. 

There is no right or wrong threshold. Try a few different values. This forum has lots of discussion on the choice of threshold.

Andrew