Print

Print


I'm currently running a group comparison with SPM's two-sample t design and I want to know how I should dummy code a categorical variable. It doesn't seem like SPM includes a constant term in the design matrix so I'm wondering if I should be using K or K-1 vectors to control for my categorical variable. For instance, if I want to control for Right, Left, and Ambidextrous would I do: 

G1	G2	right	left	ambi
1	0	1	0	0
1	0	1	0	0
1	0	1	0	0
1	0	0	1	0
1	0	0	1	0
1	0	0	1	0
1	0	0	0	1
1	0	0	0	1
0	1	0	1	0
0	1	1	0	0
0	1	1	0	0
0	1	0	0	1
0	1	0	0	1
0	1	0	1	0
0	1	0	1	0

OR 

G1	G2	right	left
1	0	1	0
1	0	1	0
1	0	1	0
1	0	0	1
1	0	0	1
1	0	0	1
1	0	0	0
1	0	0	0
0	1	0	1
0	1	1	0
0	1	1	0
0	1	0	0
0	1	0	0
0	1	0	1
0	1	0	1


In the second example the ambidextrous group would be my reference category. 

Thanks!
AS