Back to PLS Help

recreating correlation plot
mvlombardo
Posted on 02/08/14 14:15:41
Number of posts: 10
mvlombardo posts:

Hi,

 

I would like to recreate the correlation plot that plsgui creates in a Behav PLS analysis.  I think I might be able to find the data for this plot in the *STRUCTresult.mat file, but not sure which variable within that .mat file is the correct one for the upper and lower limits estimated from the boostrapping.

 

If I were interested in LV1, then I could figure out that boot_result.orig_corr(:,1) are the correlations, but where could I find the values that correspond to the upper and lower limits of the confidence intervals from that plot?  Is it boot_result.llcorr_adj and boot_result.ulcorr_adj?

 

Thanks,

 

Mike

Replies:

Untitled Post
rmcintosh
Posted on 02/08/14 15:23:16
Number of posts: 394
rmcintosh replies:

HI Mike - the confidence intervals are in:  boot_result.llcorr and boot_result.ulcorr.  The 'adj' variables are not used, they are an 'adjusted' interval that tries to centre the parameter estimate in the middle of the interval assuming a normal distribution, which would not be the case for correlations.  In practice there is not much difference between the 'adj' estimate and unadjusted ones



Untitled Post
mvlombardo
Posted on 02/10/14 02:41:23
Number of posts: 10
mvlombardo replies:

Hi Randy,

 

Thanks for the info about where to find the errorbar information.

 

One last question then on this topic:

 

The correlation for one of my variables is 0.40 (got this from boot_result.orig_corr) and in the boot_result.llcorr field for this variable it says 0.4247, which I interpret to mean that the lower limit bootstrap CI is above the original correlation estimate.  However, when I look at the correlation plot that plsgui creates, it has a lower limit below 0.40.  My question then is how is plsgui making this plot and where is it getting the lower limit information from to make the lower limit below 0.40?

 

Thanks,

 

Mike



Untitled Post

I'm Online
jshen
Posted on 02/10/14 15:07:55
Number of posts: 291
jshen replies:

I can understand your question. This seems like caused by the skewed distribution in your data. That why we measure the CI directly via bootstrap rather than estimate assuming a normal distribution.

Would please you post here the orig_corr, llcorr and ulcorr three vectors for this particular LV (i.e. with orig_corr=0.40 and llcorr=0.4247)?

 



Untitled Post
mvlombardo
Posted on 02/10/14 15:34:08
Number of posts: 10
mvlombardo replies:

Hi Jimmy,

Yes, my distributions are skewed.  Here they three vectors:

boot_result.orig_corr(:,1)

-0.1784
-0.0528
-0.0786
 0.4000
-0.1198
 
boot_result.llcorr(:,1)
 
-0.4029
-0.2009
-0.2478
 0.4247
-0.3536
 
boot_result.ulcorr(:,1)
 
-0.0764
 0.1006
 0.0830
 0.6066
-0.0253

Mike



Untitled Post
mvlombardo
Posted on 02/10/14 16:55:32
Number of posts: 10
mvlombardo replies:

Hi,

It might also be pertinent to know that this analysis I did here was where I ran a Behavior PLS, and the 5 behavioral variables are binary dummy coded group variables (e.g., 1 for all individuals of a particular group, and 0 for everyone else not in that group).   The number of subjects per group differs amongst the 5 groups (e.g., n=24, n=12, n=24, n=24, and n=16).  For example, the matlab code that would give you the behavioral matrix, would be:

behav_mat = zeros(100,5);  behav_mat(1:24,1) = 1;  behav_mat(25:36,2) = 1;  behav_mat(37:60,3) = 1;  behav_mat(61:84,4) = 1; behav_mat(85:100,5) = 1;

I ran it this way under the intuition that this was the best way to look for some kind of group differentiation, as I was expecting that running it this way would show a correlation plot whereby groups 1,2,3 and 5 would all be higher than 4, and I did find this.  But just wanted to put that out there, in case this was something wrong to run as an analysis and could be a reason behind the weird bootstrap CI intervals?  If this wasn't the proper way to run this kind of analysis, could you suggest what would have been correct?

Thanks,

Mike



Untitled Post
rmcintosh
Posted on 02/10/14 17:22:35
Number of posts: 394
rmcintosh replies:

quote:

Hi Jimmy,

Yes, my distributions are skewed.  Here they three vectors:

boot_result.orig_corr(:,1)

-0.1784
-0.0528
-0.0786
 0.4000
-0.1198
 
boot_result.llcorr(:,1)
 
-0.4029
-0.2009
-0.2478
 0.4247
-0.3536
 
boot_result.ulcorr(:,1)
 
-0.0764
 0.1006
 0.0830
 0.6066
-0.0253

Mike

Hi Mike - the CI limits look reasonable - I don't expect them to line up with orig_corr right in the middle but its pretty good e.g.,

for the first orig corr ll, orig and ul are [-0.4, -0.17, -0.07] which means its stable

 



Untitled Post
rmcintosh
Posted on 02/10/14 17:35:37
Number of posts: 394
rmcintosh replies:

quote:

Hi,

It might also be pertinent to know that this analysis I did here was where I ran a Behavior PLS, and the 5 behavioral variables are binary dummy coded group variables (e.g., 1 for all individuals of a particular group, and 0 for everyone else not in that group).   The number of subjects per group differs amongst the 5 groups (e.g., n=24, n=12, n=24, n=24, and n=16).  For example, the matlab code that would give you the behavioral matrix, would be:

behav_mat = zeros(100,5);  behav_mat(1:24,1) = 1;  behav_mat(25:36,2) = 1;  behav_mat(37:60,3) = 1;  behav_mat(61:84,4) = 1; behav_mat(85:100,5) = 1;

I ran it this way under the intuition that this was the best way to look for some kind of group differentiation, as I was expecting that running it this way would show a correlation plot whereby groups 1,2,3 and 5 would all be higher than 4, and I did find this.  But just wanted to put that out there, in case this was something wrong to run as an analysis and could be a reason behind the weird bootstrap CI intervals?  If this wasn't the proper way to run this kind of analysis, could you suggest what would have been correct?

Thanks,

Mike

Interesting idea and probably okay, but  I wouldn't do it that way to get the info you want.  

You could do it two ways.

one is set up a series of orthogonal contrasts and use them either in a behavior or better in a non-rotated pls

for your hypothesis you could do

- 1- 1 -1 4 -1

-1 -1 3 0 -1

- 1 -1 0  0 2

-1 1 0 0 0

which covers your 4 degrees of freedom and the first vector tests your hypothesis

 

a second is to do a mean-centred PLS with 5 groups and use centring option 1 or 2, which will extract the major group differences without needing to specific contrasts 



Untitled Post
rmcintosh
Posted on 02/10/14 19:39:43
Number of posts: 394
rmcintosh replies:

quote:

Hi Jimmy,

Yes, my distributions are skewed.  Here they three vectors:

boot_result.orig_corr(:,1)

-0.1784
-0.0528
-0.0786
 0.4000
-0.1198
 
boot_result.llcorr(:,1)
 
-0.4029
-0.2009
-0.2478
 0.4247
-0.3536
 
boot_result.ulcorr(:,1)
 
-0.0764
 0.1006
 0.0830
 0.6066
-0.0253

Mike

actually it was just pointed out that your 4th correlation is outside the CI bounds.  I suspect this is b/c you contrasts are over-determined with respect to the group membership.  For 5 groups, you need 4 vectors to code.  But for curiosity sake, try it with 4 vectors and lets see what the results are.




Login to reply to this topic.

  • Keep in touch

Enter your email above to receive electronic messages from Baycrest, including invitations to programs and events, newsletters, updates and other communications.
You can unsubscribe at any time.
Please refer to our Privacy Policy or contact us for more details.

  • Follow us on social
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube

Contact Us:

3560 Bathurst Street
Toronto, Ontario
Canada M6A 2E1
Phone: (416) 785-2500

Baycrest is an academic health sciences centre fully affiliated with the University of Toronto