From DGREVE@mgh.harvard.edu Wed Aug 28 00:00:46 2019
From: "Greve, Douglas N.,Ph.D." <DGREVE@mgh.harvard.edu>
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] Contrast of interaction between covariates in FSGD
Date: Wed, 28 Aug 2019 04:00:42 +0000
Message-ID: <a936fc39-5f75-6db1-f1a2-25d34e8b3c7c@mgh.harvard.edu>
In-Reply-To:
 <CAGnBb2OT=0eRvCYEUwhjb1++7KfifCgzjuh1HuBqHa7+-RJERA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============4942444383578608941=="

--===============4942444383578608941==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

correct

On 8/27/2019 11:28 AM, Zhi Li wrote:

        External Email - Use Caution

I see. Hence I cannot set the contrast of interaction between two covariates =
if I do not create the interaction term by myself, right?

On Tue, 27 Aug 2019 at 10:53, Greve, Douglas N.,Ph.D. <DGREVE(a)mgh.harvard.e=
du<mailto:DGREVE(a)mgh.harvard.edu>> wrote:

Actually, the wiki page is not quite right. For a simple interaction between =
age and weight, you would need to create a new regressor =3D age*weight, then=
 set the contrast to [0 0 0 0 0 0 1]. If you want an interaction between grou=
p, age, and weight, then you would need two new regressors, age*weight for gr=
oup1 and age*weight for group2, then the contrast will be [0 0 0 0 0 0 1 -1].=
 I would suggest demeaning both age and weight prior to computing the product.


On 8/27/2019 10:12 AM, Zhi Li wrote:

        External Email - Use Caution

Dear Freesurfer experts,

May I ask how to understand the contrast of interaction between covariates in=
 the example https://surfer.nmr.mgh.harvard.edu/fswiki/Fsgdf2G2V? The interac=
tion of group x age x weight is:

[0 0 1 -1 0 0
 0 0 0 0 1 -1]

Why the interaction between group and weight should be put in the second row =
(what does each row mean in the F-contrast matrix)?


If there are three levels in the factor one (three groups), I guess the inter=
action of group x age x weight should be:

[0 0 0 1 -1 0 0 0 0
 0 0 0 0 1 -1 0 0 0
 0 0 0 0 0 0 1 -1 0
 0 0 0 0 0 0 0 1 -1]

Is this correct? If not how should I set this contrast?

In addition, if I would like to know the interaction between age and weight w=
ithout group, how should I set the contrast then?

Looking forward to your kind suggestions.

Thanks and best wishes,

Lizhi





_______________________________________________
Freesurfer mailing list
Freesurfer(a)nmr.mgh.harvard.edu<mailto:Freesurfer(a)nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

_______________________________________________
Freesurfer mailing list
Freesurfer(a)nmr.mgh.harvard.edu<mailto:Freesurfer(a)nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer



_______________________________________________
Freesurfer mailing list
Freesurfer(a)nmr.mgh.harvard.edu<mailto:Freesurfer(a)nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer




--===============4942444383578608941==
Content-Type: text/html
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="attachment.html"
MIME-Version: 1.0

PGh0bWw+DQo8aGVhZD4NCjxtZXRhIGh0dHAtZXF1aXY9IkNvbnRlbnQtVHlwZSIgY29udGVudD0i
dGV4dC9odG1sOyBjaGFyc2V0PXV0Zi04Ij4NCjwvaGVhZD4NCjxib2R5IHRleHQ9IiMwMDAwMDAi
IGJnY29sb3I9IiNGRkZGRkYiPg0KY29ycmVjdDxicj4NCjxicj4NCjxkaXYgY2xhc3M9Im1vei1j
aXRlLXByZWZpeCI+T24gOC8yNy8yMDE5IDExOjI4IEFNLCBaaGkgTGkgd3JvdGU6PGJyPg0KPC9k
aXY+DQo8YmxvY2txdW90ZSB0eXBlPSJjaXRlIiBjaXRlPSJtaWQ6Q0FHbkJiMk9UPTBlUnZDWUVV
d2hqYjEmIzQzOyYjNDM7N0tmaWZDZ3pqdWgxSHVCcUhhNyYjNDM7LVJKRVJBQG1haWwuZ21haWwu
Y29tIj4NCjxwPjxzcGFuIHN0eWxlPSJwYWRkaW5nOiAzcHggMTBweDsgYm9yZGVyLXJhZGl1czog
NXB4OyB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