JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for SPM Archives


SPM Archives

SPM Archives


SPM@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

SPM Home

SPM Home

SPM  1999

SPM 1999

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: Correlated Covariates

From:

Jean-Baptiste POLINE <[log in to unmask]>

Reply-To:

Jean-Baptiste POLINE <[log in to unmask]>

Date:

Tue, 2 Nov 1999 15:57:29 +0100 (MET)

Content-Type:

MULTIPART/mixed

Parts/Attachments:

Parts/Attachments

TEXT/plain (227 lines) , spc_fullsp.m (78 lines) , spc_sf_fullsp.m (21 lines)

Hi Rik ! hope you're well.

(this mail is also for Steven G. with the hope that it will clarifies things
for him as well).

> 
> Hi JB!
> 
> Following Andrade et al 1999, could you help my interpretation of
> the following example?
> 
> I have two covariates, C1 and C2 (a canonical HRF, and an HRF
> shifted 3s later), which are negatively correlated.
> 
> I want to test for regions showing T1) a significant canonical response,
> and T2) a significant delayed response "over and above" any significant
> canonical response.
> 
> Given contrasts c1 and c2:
> 
>             C1  C2
> 
> c1        1     0
> c2        0     1
> 
> I originally tested for T1 with contrast c1, and for T2 with
> c2-orthogonalised-
> with-respect-to-c1 in SPM99.
> 
> Is this correct? According to Andrade et al, it is not. Your interpretation
> 
> is that c1 tests for "a component that correlates with C1 that does not
> correlate with C2".

with contrast c1  (c1 = [1 0]), you are indeed testing the part of C1 that
is not correlated with C2. 

with contrast c2 (c2 = [0 1]), you are testing the part of C2 that is not
correlated with C1.

If you have orthogonolised C2 wrt C1 (removing what is correlated to C1 from
C2) and test for C2, then the orthogonalisation should have had no effect on 
this test. (but it has on the result of c1)

> 
> Therefore, should I be testing T2 with contrast c2 instead ("additional
> effects
> of delayed response relative to canonical response")? 

well, you should get the same answer ...

And how do I test T1
> ("all effects modelled by the canonical response") via contrasts in SPM99
> (i.e. fitting C1 in the context of an orthogonalised C2)?

humm, that requires a "special constrast", I think I have what you need.
Please TEST it before you report results with it .... (do the orthogonalisation
by hand and compare the results ...:-) Please tell me if that's working fine or not.
I'd be careful with its use as well : you have to be sure that that's you want ...

> 
> Also, how does the interpretation of c2-orthogonalised-with-respect-to-c1
> differ from that for c2 (alone)? 

no, that should be the same. 

> Sorry for any confusion,

no, you're very welcome. 

I hope this clarifies the matter a wee bit ...

I include a matlab exemple to make things absolutly clear.
I also include my first answer to Stefan's email that apparently
I forgot to cc to the mailbase list).

the very best,

JB



%- model M
%---------------------------------------------------------
C1 = [0 0 0 0 1 1 1 1]'; C1 = C1 - mean(C1);
C2 = [1 2 3 4 5 6 7 8]'; C2 = C2 - mean(C2);
X = [C1 C2];

%- data
%---------------------------------------------------------

Y = C1 + C2 + 2*randn(size(C1)); Y = Y - mean(Y);

%- model M_
%---------------------------------------------------------

%- remove from C2 every thing that can be explained by C1 
%- leave C1 unchanged

C2_ = C2 - C1*pinv(C1)*C2;
X_ = [C1 C2_];

%- resolution
%---------------------------------------------------------

b   = pinv(X)*Y;
b_  = pinv(X_)*Y;

%- sum of square
%---------------------------------------------------------

r2   = sum((Y - X*b).^2); 
%-  same as   sum((Y - X_*b_).^2);

%- degrees of freedom 
%---------------------------------------------------------

df  = trace(eye(size(X,1)) - X*pinv(X));
%-  same as   trace(eye(size(X,1)) - X_*pinv(X_));

MSE = r2/df; %- mean square error identical for M and M_

%- test under M
%---------------------------------------------------------

c1 = [1 0]';
c2 = [0 1]';

t1 = (c1'*b) / sqrt( MSE*c1'*pinv(X'*X)*c1)
t2 = (c2'*b) / sqrt( MSE*c2'*pinv(X'*X)*c2)

%- test under M_
%---------------------------------------------------------

t1_ = (c1'*b_) / sqrt( MSE*c1'*pinv(X_'*X_)*c1)  % does change
t2_ = (c2'*b_) / sqrt( MSE*c2'*pinv(X_'*X_)*c2)  % does not change




%--------------------- answer to Steven's first mail

Dear Steven


> This question is posed to Jean-Baptiste Poline and concerns your recent
> technical note on the problem of correlations between covariates (Andrade et
> al., NeuroImage 10:483, 1999).   You  propose a method to remove the correlation
> between conditions and task performance that occurr when  task performance
> increases across scan conditions. I understand the problem, but not the
> solution.  
> 

thanks for your interest

> 1) Could you explain why your method keeps the effects that are common to both
> the condition and the peformance covariate from being removed from the general
> linear equation ?  The method you propose does not remove the correlation
> between the condition covariate and the performance covariate, nor does it alter
> the slope of the regression between the two covariates.   All it does is add a
> scaling factor to the regression, i.e. the regression equation between the two
> covariates now has a non-zero intercept.  I do not understand why this
> procedure, therefore, removes redundancies between the covariates ?
> 

I'm not sure I get your question right. one take away message of this note is simply
that if you have an important correlation between covariates and test them 
successively, say 2 cov. with 2 contrats, 1 0 and 0 1, you might very well miss 
the part that is "common" to both covariates since the t-test will implicitly 
remove the influence of the "non tested" covariate. Removing this influence
explicitly (orthogonolising c1 wrt c2 for instance) will help you to test
for c2 but keeping the "common part" between c1 and c2 ... Of course, you can
always work in the "contrast space" and you don't have to reparametrize the model
and fit it again ... Incidentally, this is what we do in spm99 to do F tests... 

> 
> 2) Could you explain why only changing the values of the performance covariate
> only changes the contrasts assocatiated with the condition covariate.
> Presumably, your procedure restores effects common to the both covariates to the
> performance covariate as well as the condition covariate.

I know, it sounds conter intuitive .. Best would be to do a little drawing here using
the geometrical interpretation of the general linear model... 
May be you could have a look at the spm short course slides (some of andrew and mine)
that use this interpretation a lot to explain the tests procedures. 
(or you can test that in matlab if you don't trust drawings ...! set up a simple model
with 2 correalted cov. and see what happens to the betas and t-stat when you orthogonolise
one wrt the other) 

The simplest way to think of it is that if you have removed the influence
of c2 from c1 (so, changing c1), then when you test for c2, you test for everything in c2.
If you haven't, then when you test for c2, you test for the part of c2 that is 
"free from c1" (orhtogonal to c1). If you test for c1, then you do exatly the same
thing as if you hadn't remove the influence of c2 in c1 because the test does it implicitly
anyway. Things get a bit more complicated for complex contrasts but the principle 
remains always the same.

> 
> 3)  Was a condition-specific fit used for the performance variable in either the
> original model (M) or the model with the modified performance covariates (M*).

no, the space span by both models is exatly the same. 

> 
> Thanks

you're welcome. There's one book I would recommand if you want to go deeper in
these matters : "Plane answers to complex questions" by Christensen, Springer verlag 1996.
especially chp. 3. (It does require a bit of background algebra though.)

I hope this makes the matter a bit clearer,

Best,

jb




+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
| Jean-Baptiste Poline   [log in to unmask]        |
| 4 Pl General Leclerc                             |
| CEA/DRM/SHFJ           Tel +33 (0) 1 69 86 78 52 |
| 91406 ORSAY FRANCE     Fax +33 (0) 1 69 86 78 68 |
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+



%- spc_fullsp.m : Special contrast construction %- %- launch from matlab with the spm_99b environement and path. %- The program prompmts for %- 1- a SPM.mat file %- 2- a contrast that defines a main effect (Ct). %- A contrast is defined that tests for the effect of Ct without %- removing anything from the rest of the design. Use carefully... %- %- Ref : %- Ambiguous Results in Functional Neuroimaging Data Analysis %- Due to Covariate Correlation. A. Andrade, A.-L. Paradis, %- S. Rouquette, J.-B. Poline. Neuroimage, 1999, in press. %- %- Please send comments and suggestions to %+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ %| Jean-Baptiste Poline [log in to unmask] | %| 4 Pl General Leclerc | %| CEA/DRM/SHFJ Tel +33 (0) 1 69 86 78 52 | %| 91406 ORSAY FRANCE Fax +33 (0) 1 69 86 78 68 | %+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ %----------------------------------------------------------------------- %--- Get SPM %----------------------------------------------------------------------- swd = spm_str_manip(spm_get(1,'SPM.mat','Select SPM.mat'),'H'); cwd = pwd; %-Note current working directory cd(swd) %-Temporarily move to results dir pwd eval( 'load(fullfile(''.'',''SPM.mat''),''xX'')' ); %- eval( 'load(fullfile(''.'',''xCon.mat''))' ); %- %----------------------------------------------------------------------- %-See if can write to current directory (by trying to resave xCon.mat) %----------------------------------------------------------------------- wOK = 1; try if exist(fullfile('.','xCon.mat')) save('xCon.mat','xCon') end catch wOK = 0; str = { 'Can''t write to the results directory:',...          '(problem saving xCon.mat)',... [' ',swd],... ' ','-> results restricted to contrasts already computed'}; spm('alert!',str,mfilename,1); end %----------------------------------------------------------------------- %-Get contrast that defines the space %----------------------------------------------------------------------- [Ic,xCon] = spm_conman(xX,xCon,'T|F',Inf,... 'Select contrasts...',' for defining main effect',wOK); %----------------------------------------------------------------------- %- Computes the full space contrast %----------------------------------------------------------------------- Ct = xCon(Ic(1)); %- restrict to the first one xCon(length(xCon)+1) = spc_sf_fullsp(Ct, xX.xKXs); %----------------------------------------------------------------------- %- Save in xCon if possible %----------------------------------------------------------------------- if wOK, save('xCon.mat','xCon'), else, fprintf('can''t save, xCon in workspace \n'); end
function CtFull = spc_sf_fullsp(Ct, sX) %----------------------------------------------------------------------- %- The subfunction computes the G-contrast CtFull %- such that CtFull tests for the full space define by %- sX.X*Ct.c %- %- Please send comments and suggestions to %+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ %| Jean-Baptiste Poline [log in to unmask] | %| 4 Pl General Leclerc | %| CEA/DRM/SHFJ Tel +33 (0) 1 69 86 78 52 | %| 91406 ORSAY FRANCE Fax +33 (0) 1 69 86 78 68 | %+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ %--- a name ? cXname = ['Full space defined by ' Ct.name]; CtFull = spm_FcUtil('Set',cXname,Ct.STAT,'c', spm_sp('xpx:',sX,Ct.c), sX);

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
2006
2005
2004
2003
2002
2001
2000
1999
1998


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager