help > weird design matrix for t-test with covariates
Showing 1-3 of 3 posts
Display:
Results per page:
Apr 17, 2024  09:04 AM | Alberto Inuggi - IRCCS San Martino, Genova
weird design matrix for t-test with covariates

Dear all


I'm trying to make a two sample t-test with two further regressors.


my model is


 


1 0 a b


1 0 c d


.  .. . . . . . 


 . .  . . . . 


0 1 r t


0 1 y z


 


my contrasts are 


1 -1 0 0


-1 1 0 0 


when I plot the design matrix I see the weird pattern displayed in the attached image. on the left the t-test with two further regressors, on the right the correct t-test without any other regressors.


Is my design wrong or is the nbs's representation?


thanks in advance


Alberto


 

Attachment: nbs_designs.jpg
Apr 17, 2024  11:04 AM | Andrew Zalesky
RE: weird design matrix for t-test with covariates

Hi Alberto,


I suspect that this is simply a consequence of the color scale. The magnitude of the values comprising one of the regressors may be quite a bit larger than 0 and 1, and so the majority of the color scale is taken up by the regressor. 


I don't see anything wrong with your design matrix and contrast. Everything looks good to me. 


If this still worries you, you could visualize the matrix with your own code and adjust the color scale as necessary. 


Best wishes. 


Andrew 


 


Originally posted by Alberto Inuggi:



Dear all


I'm trying to make a two sample t-test with two further regressors.


my model is


 


1 0 a b


1 0 c d


.  .. . . . . . 


 . .  . . . . 


0 1 r t


0 1 y z


 


my contrasts are 


1 -1 0 0


-1 1 0 0 


when I plot the design matrix I see the weird pattern displayed in the attached image. on the left the t-test with two further regressors, on the right the correct t-test without any other regressors.


Is my design wrong or is the nbs's representation?


thanks in advance


Alberto


 



 

Apr 17, 2024  11:04 AM | Alberto Inuggi - IRCCS San Martino, Genova
RE: weird design matrix for t-test with covariates

Dear Andrew


thanks for your answer. One of the regressor is subject's age so your explanation is indeed correct


cheers


Alberto