-
Notifications
You must be signed in to change notification settings - Fork 9
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
Correlation #8
Comments
Hey! The behavioural option is currently only capable of a single correlation. So the behavioural data should just be a single dimension vector of length n_participants. If you want to measure 6 different correlations unfortunately you'll have to run each correlation separately for now. The other way I'm currently working on is using linear mixed models with these 6 predictors... but unfortunately this is still too slow if you have more than just the channels (you mentioned you had multiple frequencies). Hope this way is not too much of a bother for you. Let me know how you get on! |
I should also mention that the parameter settings for e and h (normally semi-hidden parameters) might not be optimal for correlation analysis (in particular the h parameter)... so you might want to test out a couple of different settings here (e.g. h = 1, or h = 3; default is 2) in case the results aren't quite what you are expecting. We can discuss this parameter more in detail if it turns out other settings than the default give more expected results. |
Great! Thanks
Sue Peters
…On Aug 11, 2017 5:42 AM, "Armand Mensen" ***@***.***> wrote:
I should also mention that the parameter settings for *e* and *h*
(normally semi-hidden parameters) might not be optimal for correlation
analysis (in particular the *h* parameter)... so you might want to test
out a couple of different settings here (e.g. h = 1, or h = 3; default is
2) in case the results aren't quite what you are expecting. We can discuss
this parameter more in detail if it turns out other settings than the
default give more expected results.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHH7xsX5i-KAO374ipmPh0k-9BAZS32iks5sXCIJgaJpZM4O0JFm>
.
|
I'm still getting this error when I try to run, even with a single vector.
I tried my summary data file in two different formats: 19 x124 (at one
freq bin) or 19x124x141 (all freq bins). The behavior data is 19x1. Any
tip for what i might be doing wrong? Thanks!
Error using -
Matrix dimensions must agree.
Error in ept_TFCE>@(x)(x-mean(x))./std(x) (line 325)
condition = @(x) (x-mean(x))./std(x);
Error in ept_TFCE (line 334)
T_Obs = (condition(Data{1})' * condition(behavior_repeated)) /
sum(condition(Data{1}).^2);
…On Fri, Aug 11, 2017 at 9:37 AM, Sue Peters ***@***.***> wrote:
Great! Thanks
Sue Peters
On Aug 11, 2017 5:42 AM, "Armand Mensen" ***@***.***> wrote:
> I should also mention that the parameter settings for *e* and *h*
> (normally semi-hidden parameters) might not be optimal for correlation
> analysis (in particular the *h* parameter)... so you might want to test
> out a couple of different settings here (e.g. h = 1, or h = 3; default is
> 2) in case the results aren't quite what you are expecting. We can discuss
> this parameter more in detail if it turns out other settings than the
> default give more expected results.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#8 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AHH7xsX5i-KAO374ipmPh0k-9BAZS32iks5sXCIJgaJpZM4O0JFm>
> .
>
--
Sue Peters
PhD Candidate
Infancy Studies Laboratory
Facebook: RUBabyLab <https://www.facebook.com/RUbabylab/>
Center for Molecular and Behavioral Neuroscience
Facebook: CMBN <https://www.facebook.com/cmbnrutgers/>
Rutgers University - Newark
sp@suepeters.com
mobile: 646-337-7025
www.linkedin.com/in/suepeters
|
So I couldn't reproduce the I did find another error with multidimensional data for the correlation calculation and I fixed that in 3b44dcd, and maybe that fixed your particular error by magic? Probably not, but let me know what version you are using and I'll try to reproduce the error. |
Thanks. I'm using Matlab 2014a. I recently re-installed your code, as it
had been a while since I used it. So I think all the code is updated, but
will try with your latest changes as well.
Also, just trying now to use the ANOVA, repeated measures with gender as a
factor. I have 12 subjects, 6 male and 6 female, at two ages. I'm trying
to figure out arrange the data. Does this sound right:
First file:
12x124x141 (freq bins) concatenated with 12x124x1(gender) for first age
group
Second file:
same as above, but at the second time point/age for with the same subject
order.
…On Sat, Aug 12, 2017 at 10:25 AM, Armand Mensen ***@***.***> wrote:
So I couldn't reproduce the matrix dimension must agree ... what version
of matlab are you using?
I did find another error with multidimensional data for the correlation
calculation and I fixed that in 3b44dcd
<3b44dcd>,
and maybe that fixed your particular error by magic? Probably not, but let
me know what version you are using and I'll try to reproduce the error.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHH7xkgE_mgGc_pUCajDNw73246gla_4ks5sXbW9gaJpZM4O0JFm>
.
--
Sue Peters
PhD Candidate
Infancy Studies Laboratory
Facebook: RUBabyLab <https://www.facebook.com/RUbabylab/>
Center for Molecular and Behavioral Neuroscience
Facebook: CMBN <https://www.facebook.com/cmbnrutgers/>
Rutgers University - Newark
sp@suepeters.com
mobile: 646-337-7025
www.linkedin.com/in/suepeters
|
Tried correlation again. Different error. I could update to newer Matlab.
What version?
Error using -
Array dimensions must match for binary array op.
Error in ept_TFCE>@(x)(x-mean(x))./std(x) (line 329)
condition = @(x) (x-mean(x))./std(x);
Error in ept_TFCE (line 338)
temp_observed = [reshape(condition(Data{1}), nA, [])' ...
…On Sat, Aug 12, 2017 at 10:50 AM, Sue Peters ***@***.***> wrote:
Thanks. I'm using Matlab 2014a. I recently re-installed your code, as it
had been a while since I used it. So I think all the code is updated, but
will try with your latest changes as well.
Also, just trying now to use the ANOVA, repeated measures with gender as a
factor. I have 12 subjects, 6 male and 6 female, at two ages. I'm trying
to figure out arrange the data. Does this sound right:
First file:
12x124x141 (freq bins) concatenated with 12x124x1(gender) for first age
group
Second file:
same as above, but at the second time point/age for with the same subject
order.
On Sat, Aug 12, 2017 at 10:25 AM, Armand Mensen ***@***.***>
wrote:
> So I couldn't reproduce the matrix dimension must agree ... what version
> of matlab are you using?
>
> I did find another error with multidimensional data for the correlation
> calculation and I fixed that in 3b44dcd
> <3b44dcd>,
> and maybe that fixed your particular error by magic? Probably not, but let
> me know what version you are using and I'll try to reproduce the error.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#8 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AHH7xkgE_mgGc_pUCajDNw73246gla_4ks5sXbW9gaJpZM4O0JFm>
> .
>
--
Sue Peters
PhD Candidate
Infancy Studies Laboratory
Facebook: RUBabyLab <https://www.facebook.com/RUbabylab/>
Center for Molecular and Behavioral Neuroscience
Facebook: CMBN <https://www.facebook.com/cmbnrutgers/>
Rutgers University - Newark
***@***.***
mobile: 646-337-7025 <(646)%20337-7025>
www.linkedin.com/in/suepeters
--
Sue Peters
PhD Candidate
Infancy Studies Laboratory
Facebook: RUBabyLab <https://www.facebook.com/RUbabylab/>
Center for Molecular and Behavioral Neuroscience
Facebook: CMBN <https://www.facebook.com/cmbnrutgers/>
Rutgers University - Newark
sp@suepeters.com
mobile: 646-337-7025
www.linkedin.com/in/suepeters
|
I've recently been seeing a lot of problems with things pre-2014b... I think Matlab made a lot of changes to more basic functions after that, and since I usually keep up-to-date with Matlab, it becomes difficult to make sure things are backwards compatible. I have 2014a on another computer for this reason, and I'll try it out there and see if I can get a workaround for these older versions. If you can get your hands on the newest possible one (I think still 2017a for now), then this should be fine. However, I think even 2014b should make a difference. In regards to the ANOVA... your data should be structured in a 2 x 2 cell array. So a 6 x 124 x 141 in each cell array just keeping consistent across the dimensions (e.g. gender differences in columns, and age differences in the rows... or the other way, just not mixed). |
Thanks Armand!! =)
…On Sat, Aug 12, 2017 at 11:40 AM, Armand Mensen ***@***.***> wrote:
I've recently been seeing a lot of problems with things pre-2014b... I
think Matlab made a lot of changes to more basic functions after that, and
since I usually keep up-to-date with Matlab, it becomes difficult to make
sure things are backwards compatible. I have 2014a on another computer for
this reason, and I'll try it out there and see if I can get a workaround
for these older versions.
If you can get your hands on the newest possible one (I think still 2017a
for now), then this should be fine. However, I think even 2014b should make
a difference.
------------------------------
In regards to the ANOVA... your data should be structured in a 2 x 2 cell
array. So a 6 x 124 x 141 in each cell array just keeping consistent across
the dimensions (e.g. gender differences in columns, and age differences in
the rows... or the other way, just not mixed).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHH7xrEDVtpA5iUx_mMrGT9PE4UC6l77ks5sXceIgaJpZM4O0JFm>
.
--
Sue Peters
PhD Candidate
Infancy Studies Laboratory
Facebook: RUBabyLab <https://www.facebook.com/RUbabylab/>
Center for Molecular and Behavioral Neuroscience
Facebook: CMBN <https://www.facebook.com/cmbnrutgers/>
Rutgers University - Newark
sp@suepeters.com
mobile: 646-337-7025
www.linkedin.com/in/suepeters
|
The ANOVA function asks for two data files (2 groups) group 1 condition and
group 2 condition. So how does this fit with a 2x2 cell array with all of
the data (from both groups) in one file? or do I create 2 separate 1x2 cell
arrays, or set it as 1 group in the initial viewer/gui, and just upload one
data file?
…On Sat, Aug 12, 2017 at 11:47 AM, Sue Peters ***@***.***> wrote:
Thanks Armand!! =)
On Sat, Aug 12, 2017 at 11:40 AM, Armand Mensen ***@***.***>
wrote:
> I've recently been seeing a lot of problems with things pre-2014b... I
> think Matlab made a lot of changes to more basic functions after that, and
> since I usually keep up-to-date with Matlab, it becomes difficult to make
> sure things are backwards compatible. I have 2014a on another computer for
> this reason, and I'll try it out there and see if I can get a workaround
> for these older versions.
>
> If you can get your hands on the newest possible one (I think still 2017a
> for now), then this should be fine. However, I think even 2014b should make
> a difference.
> ------------------------------
>
> In regards to the ANOVA... your data should be structured in a 2 x 2 cell
> array. So a 6 x 124 x 141 in each cell array just keeping consistent across
> the dimensions (e.g. gender differences in columns, and age differences in
> the rows... or the other way, just not mixed).
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#8 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AHH7xrEDVtpA5iUx_mMrGT9PE4UC6l77ks5sXceIgaJpZM4O0JFm>
> .
>
--
Sue Peters
PhD Candidate
Infancy Studies Laboratory
Facebook: RUBabyLab <https://www.facebook.com/RUbabylab/>
Center for Molecular and Behavioral Neuroscience
Facebook: CMBN <https://www.facebook.com/cmbnrutgers/>
Rutgers University - Newark
***@***.***
mobile: 646-337-7025 <(646)%20337-7025>
www.linkedin.com/in/suepeters
--
Sue Peters
PhD Candidate
Infancy Studies Laboratory
Facebook: RUBabyLab <https://www.facebook.com/RUbabylab/>
Center for Molecular and Behavioral Neuroscience
Facebook: CMBN <https://www.facebook.com/cmbnrutgers/>
Rutgers University - Newark
sp@suepeters.com
mobile: 646-337-7025
www.linkedin.com/in/suepeters
|
Just FYI, I tried correlation on another computer of mine with 15a
installed, and same error as last time. Maybe there's a problem with my
data structures (attached). I will try installing 2017 and running again.
…On Sat, Aug 12, 2017 at 11:54 AM, Sue Peters ***@***.***> wrote:
The ANOVA function asks for two data files (2 groups) group 1 condition
and group 2 condition. So how does this fit with a 2x2 cell array with all
of the data (from both groups) in one file? or do I create 2 separate 1x2
cell arrays, or set it as 1 group in the initial viewer/gui, and just
upload one data file?
On Sat, Aug 12, 2017 at 11:47 AM, Sue Peters ***@***.***> wrote:
> Thanks Armand!! =)
>
> On Sat, Aug 12, 2017 at 11:40 AM, Armand Mensen ***@***.***
> > wrote:
>
>> I've recently been seeing a lot of problems with things pre-2014b... I
>> think Matlab made a lot of changes to more basic functions after that, and
>> since I usually keep up-to-date with Matlab, it becomes difficult to make
>> sure things are backwards compatible. I have 2014a on another computer for
>> this reason, and I'll try it out there and see if I can get a workaround
>> for these older versions.
>>
>> If you can get your hands on the newest possible one (I think still
>> 2017a for now), then this should be fine. However, I think even 2014b
>> should make a difference.
>> ------------------------------
>>
>> In regards to the ANOVA... your data should be structured in a 2 x 2
>> cell array. So a 6 x 124 x 141 in each cell array just keeping consistent
>> across the dimensions (e.g. gender differences in columns, and age
>> differences in the rows... or the other way, just not mixed).
>>
>> —
>> You are receiving this because you authored the thread.
>> Reply to this email directly, view it on GitHub
>> <#8 (comment)>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/AHH7xrEDVtpA5iUx_mMrGT9PE4UC6l77ks5sXceIgaJpZM4O0JFm>
>> .
>>
>
>
>
> --
>
> Sue Peters
> PhD Candidate
>
>
> Infancy Studies Laboratory
> Facebook: RUBabyLab <https://www.facebook.com/RUbabylab/>
> Center for Molecular and Behavioral Neuroscience
> Facebook: CMBN <https://www.facebook.com/cmbnrutgers/>
> Rutgers University - Newark
> ***@***.***
> mobile: 646-337-7025 <(646)%20337-7025>
>
> www.linkedin.com/in/suepeters
>
--
Sue Peters
PhD Candidate
Infancy Studies Laboratory
Facebook: RUBabyLab <https://www.facebook.com/RUbabylab/>
Center for Molecular and Behavioral Neuroscience
Facebook: CMBN <https://www.facebook.com/cmbnrutgers/>
Rutgers University - Newark
***@***.***
mobile: 646-337-7025 <(646)%20337-7025>
www.linkedin.com/in/suepeters
--
Sue Peters
PhD Candidate
Infancy Studies Laboratory
Facebook: RUBabyLab <https://www.facebook.com/RUbabylab/>
Center for Molecular and Behavioral Neuroscience
Facebook: CMBN <https://www.facebook.com/cmbnrutgers/>
Rutgers University - Newark
sp@suepeters.com
mobile: 646-337-7025
www.linkedin.com/in/suepeters
|
Re: ANOVA... I don't get any attachment, but could you send it to my regular email address? (research.mensen (at) gmail... |
Ok, thanks.
…On Sat, Aug 12, 2017 at 12:46 PM, Armand Mensen ***@***.***> wrote:
Re: ANOVA...
I should probably redo the initial GUI since the procedure there is not
quite clear. However, you could manually create a Data cell array in
Matlab itself and then run the command: ept_TFCE_ANOVA(Data, e_loc) and
manually put the data through the command line.
I don't get any attachment, but could you send it to my regular email
address? (research.mensen (at) gmail...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHH7xkNoHvxSHDEvyXSsv_pBzSHVk7srks5sXdbUgaJpZM4O0JFm>
.
--
Sue Peters
PhD Candidate
Infancy Studies Laboratory
Facebook: RUBabyLab <https://www.facebook.com/RUbabylab/>
Center for Molecular and Behavioral Neuroscience
Facebook: CMBN <https://www.facebook.com/cmbnrutgers/>
Rutgers University - Newark
sp@suepeters.com
mobile: 646-337-7025
www.linkedin.com/in/suepeters
|
Thanks for help with ANOVA. It's working, but it's not totally clear to me
which are Factor A, Factor B, Level 1 and level 2. My data were organized
in the cell array as 3mo, 6mo as columns, and male, female as rows.
Based on my experience with the data, it seems that the results make most
sense as Factor B, being the age difference. Then Factor A is sex, with
level 1, and 2 are males and females. This could make sense based on what
I see. But So Factor A comparing males as a group and females as a group
(regardless of age): nothing significant there, and that too would make
sense.
I'm going to send you a separate email with screenshots. Very interesting,
as there is a trend (not significant) in the interaction plot, which
matches (topographic and direction) of my earlier analyses done comparing a
larger group using TCFE Ttest, at 6mos, across sex. That was the analyses
where I changed the E and H values a while back (spring), with
justification based on the signal to noise theory, in an infant brain.
Hopefully you received that email I sent to you.
Thanks again. =)
…On Sat, Aug 12, 2017 at 12:51 PM, Sue Peters ***@***.***> wrote:
Ok, thanks.
On Sat, Aug 12, 2017 at 12:46 PM, Armand Mensen ***@***.***>
wrote:
> Re: ANOVA...
> I should probably redo the initial GUI since the procedure there is not
> quite clear. However, you could manually create a Data cell array in
> Matlab itself and then run the command: ept_TFCE_ANOVA(Data, e_loc) and
> manually put the data through the command line.
>
> I don't get any attachment, but could you send it to my regular email
> address? (research.mensen (at) gmail...
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#8 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AHH7xkNoHvxSHDEvyXSsv_pBzSHVk7srks5sXdbUgaJpZM4O0JFm>
> .
>
--
Sue Peters
PhD Candidate
Infancy Studies Laboratory
Facebook: RUBabyLab <https://www.facebook.com/RUbabylab/>
Center for Molecular and Behavioral Neuroscience
Facebook: CMBN <https://www.facebook.com/cmbnrutgers/>
Rutgers University - Newark
***@***.***
mobile: 646-337-7025 <(646)%20337-7025>
www.linkedin.com/in/suepeters
--
Sue Peters
PhD Candidate
Infancy Studies Laboratory
Facebook: RUBabyLab <https://www.facebook.com/RUbabylab/>
Center for Molecular and Behavioral Neuroscience
Facebook: CMBN <https://www.facebook.com/cmbnrutgers/>
Rutgers University - Newark
sp@suepeters.com
mobile: 646-337-7025
www.linkedin.com/in/suepeters
|
Back to the correlation. Tried it on another computer, now running Matlab 2017a. It appeared to be working this time until this error appeared. I did install the compiler and run mex -setup. But when installing the compiler there was an option for C++ or Fortran, but I ignored it. Not sure if relevant (see below the error for that Matlab message) Calculating Channel Neighbours... Error in ept_TFCE (line 354) end of error msg
To choose a different language, select one from the following: |
A note on the ANOVA that is not explicitly made in the scripts... The default h value for ANOVA is 1 since the F-values that are compared are already squared T-values. Just good to know for reporting statistics in case you go into that much detail in the methods sections. Re the mex issue... At some point the matlab-mex stuff stopped recognising the command There's probably no issue with the compiler... but you'll still need to go into the dependencies folder and I tested my own correlation scripts with your data, and, as you also now saw, they work with the latest matlab version. However, I saw they were incredibly slow! Hope this is not too annoying. I don't have the time at the moment to go through these another way but will make a note on the TODO list. |
Hi Mensen,
I'm trying to use the correlation option with the TFCE code. I'm wondering what the format of the behavioral data should be? I've tried a few different things but I'm getting an error. I was looking to do 6 different behavioral measures (six scores) per subject (19 subjects). For my EEG data, though, I'm still using subject x chan x freq. Do I need to scale that down to one chan or one freq? Thanks.
Error using -
Array dimensions must match for binary array op.
Error in ept_TFCE>@(x)(x-mean(x))./std(x) (line 325)
condition = @(x) (x-mean(x))./std(x);
Error in ept_TFCE (line 334)
T_Obs = (condition(Data{1})' * condition(behavior_repeated)) / sum(condition(Data{1}).^2);
The text was updated successfully, but these errors were encountered: