Print

Print


Dear Jesper,

Thank you for your answer.

I think the example design.con and design.mat file may have give you the
wrong idea about my design. My core question is if dummy coding is the
correct way to enter categorical variables in the model and how I should
define my contrasts to look at the effect of the categorical EV.

Although the design example in my previous male only contained 4 subjects,
I actually have a dataset with 552 subjects. My design.mat and design.con
now look like this:

/NumWaves 14
/NumContrasts 2
/PPheights 1 1
/Matrix
0 0 0 0 0 0 0 0 0 0 0 0 -1 -1
0 0 0 0 0 0 0 0 0 0 0 0  1  1



/NumWaves 14
/NumPoints 552
/PPheights 1 1
/Matrix
1       0       1567.78185      78.02601        6088.058171     152.6  
153     78      0       5       0       0       1       0
1       0       1269.799107     51.378508       2639.751071     161.5  
116     70      0       11      1       0       1       0
1       0       1351.099863     65.744011       4322.274976     160.5  
132     81      0       5       0       1       0       0
1       0       1370.395074     52.492813       2755.495432     168.6  
133     83      0       8       0       1       0       1
1       0       1435.572886     60.531143       3664.019279     161    
158     91      0       0       1       0       0       0
1       0       1279.604627     62.475017       3903.127763     169    
138     79      1       0       1       0       0       1
1       0       1382.062808     72.043806       5190.309927     152.5  
157     82      0       1       0       1       0       0
1       0       1513.922251     66.277892       4392.758949     158.3  
138     80      0       1       1       0       0       0
1       0       1278.294107     68.922656       4750.332471     158    
135     87      0       4       0       1       0       1
1       0       1325.556314     68.629706       4710.036502     166.7  
175.5   85      0       0       0       0       0       0
1       0       1395.171145     64.941821       4217.440072     143.8  
144     77      0       1       0       0       0       0
1       0       1415.258285     70.696783       4998.03513      168    
137     82.5    0       2       0       0       0       1
1       0       1267.142306     53.615332       2874.603822     167.8  
124     66      0       31      0       0       1       0
1       0       1465.856593     62.190281       3867.631005     164.9  
162     81.5    0       4       0       0       0       0
1       0       1383.528736     66.869268       4471.498953     167    
147     90      1       33      0       1       1       0
1       0       1625.861876     60.73922        3689.252811     172    
121     73      0       11      1       0       0       1
1       0       1329.266968     56.50924        3193.294233     163    
173     104     0       4       0       1       0       1
1       0       1640.069989     63.126626       3984.97086      166.9  
129     76      0       16      0       0       1       0
1       0       1288.331911     73.182752       5355.715123     143.5  
168     76      0       6       0       0       0       1
1       0       1427.348334     66.882957       4473.329921     158.8  
121     66      0       13      0       0       0       0
1       0       1509.805545     55.446954       3074.364724     177.4  
103     64      0       0       0       1       1       0
1       0       1379.989255     59.258042       3511.515593     163    
172     95      0       7       0       1       0       0
1       0       1423.81356      69.300479       4802.556407     152.5  
145.5   82      0       7       0       0       0       0
1       0       1593.058089     66.275154       4392.396038     161.2  
141     90      0       3       0       1       0       1
1       0       1363.067589     74.913073       5611.968542     160.3  
198     89      0       0       0       1       0       1
1       0       1335.474577     58.036961       3368.28884      169.5  
154     88      0       1       0       0       0       1
1       0       1238.880886     61.451061       3776.232888     150.8  
168     84      0       10      0       0       0       0
1       0       1371.576918     75.663244       5724.926546     171    
173     77      0       2       0       0       0       1
1       0       1569.538869     58.532512       3426.054958     164.4  
137     88      0       19      0       1       0       1
1       0       1209.19613      72.186174       5210.843696     164.5  
144     77      0       8       0       0       1       0
1       0       1433.328705     68.514716       4694.266301     163    
162     93      0       13      0       0       0       0
1       0       1460.153094     60.709103       3685.59523      162.8  
143     83      0       2       0       1       0       1
1       0       1334.447256     69.897331       4885.636824     167.4  
146     73      0       4       0       1       0       0
1       0       1488.283393     56.695414       3214.36998      164.5   99
     57      0       17      1       0       0       0
1       0       1294.535798     57.670089       3325.839163     169.5  
126     81      0       16      0       1       1       0
1       0       1353.537334     69.215606       4790.800079     157.5  
135.5   88      0       1       0       0       0       1
1       0       1443.53326      78.863792       6219.497677     149.5  
132.5   66      0       3       0       0       0       0

(.. here I removed some lines for convenience ..)

0       1       1491.350809     68.555784       4699.89548      171    
189     105     0       0       1       0       0       0
0       1       1594.564159     64.366872       4143.094212     157.5  
155     107     0       3       0       1       0       0
0       1       1281.649346     61.609856       3795.774389     157.7  
191     88      1       1       0       0       0       1
0       1       1392.377645     71.362081       5092.546571     173.1  
127     83      0       3       0       0       0       0
0       1       1345.509278     73.908282       5462.434148     157    
165     86      0       4       1       0       0       0
0       1       1587.331332     62.524298       3909.287894     164    
114     65      0       14      1       0       0       1
0       1       1425.609899     70.135524       4918.991673     166.7  
124     69      0       1       1       0       0       1
0       1       1299.864174     60.325804       3639.202658     164    
119     73      0       4       1       0       0       0
0       1       1508.163514     64.703628       4186.559431     157    
166     96      0       4       1       0       0       1
0       1       1500.442477     60.533881       3664.350737     158    
131     72      0       0       0       1       0       1
0       1       1288.127605     71.74538        5147.399534     156.7  
172     85      0       12      0       1       0       0
0       1       1418.171362     61.615332       3796.449133     164    
136     89      0       1       0       1       0       1
0       1       1218.681281     66.069815       4365.22048      158.3  
121     69      0       0       0       1       1       0
0       1       1614.511043     55.953457       3130.789298     174    
133     98      0       2       0       1       0       1
0       1       1347.116951     72.553046       5263.944463     167    
147     87      0       11      1       0       1       0
0       1       1493.904204     57.034908       3252.980685     163.2  
129     77      0       0       0       1       0       1
0       1       1250.079061     61.149897       3739.309944     162.6  
138     83      0       26      0       1       0       1
0       1       1476.922489     49.79603        2479.644615     178.9  
163     97      0       3       1       0       0       1
0       1       1483.811728     62.704997       3931.916596     167.5  
176     80      0       6       0       1       1       0
0       1       1496.316813     58.146475       3381.012557     165    
127     78      0       7       0       1       1       0
0       1       1308.397034     61.861739       3826.874695     172    
124     77      1       3       0       0       0       1
0       1       1400.874449     55.811088       3114.877577     163.5  
145     87      0       1       0       1       0       1
0       1       1419.176403     59.4141         3530.035271     170.8  
119     82      0       18      1       0       0       1
0       1       1360.528192     73.163587       5352.910402     157    
192     95      0       5       0       0       0       1
0       1       1394.640768     69.878166       4882.958033     158.4  
122     73      0       1       0       0       1       0
0       1       1385.59499      68.947296       4753.729677     165    
182     102     0       4       0       1       0       0
0       1       1500.488732     56.131417       3150.735956     167    
100     63      0       2       1       0       0       1
0       1       1415.378743     64.032854       4100.206418     169.8  
147     91      1       0       0       1       0       0

(.. and again, here I removed some lines for convenience ..)

The last 2 columns in the above printed design.mat file represent the
dummy-coded EV of interest.


In the analysis for which I am using the above printed design.mat and
design.con files I am interested in the effect of one particular
covariate: the categorical covariate that I encoded into two dummies.

Is the dummy coding and my design suited to answer this question?

Thanks in advance,

Vincent






> Dear Vincent,
>
>> Thank you for your answer. Could you point me in the right direction
>> regarding how I should enter categorical variables in my model and how
>> my design files should look like including these variables?
>>
>> Thanking you in anticipation,
>
> it is quite hard from your previous mail to understand precisely what you
> want to encode. However the design you propose is not sensible.
>
>>
>> /NumWaves 4
>> /NumPoints 4
>> /PPheights 1 1
>> /Matrix
>> 0  1  0  0
>> 0  1  0  1
>> 1  0  1  0
>> 1  0  1  0
>
>
> would imply that scans 3 and 4 belongs to one group, scans 1 and 2 to
> another and then scans 3 and 4 also belongs to a third group. In general
> there is nothing to prevent a scan from belonging two more than one group,
> but the groups cannot be identical. Imaging you have an experiment
> consisting of males with disease X and healthy control females. In such a
> setting you can never know if any observed differences are due to
> male-female differences or disease_X-healthy differences. In the same way
> you can not distinguish between your first and your third group in your
> design.
>
> Good Luck Jesper
>
> P.S. For future reference it is always useful to retain the history in the
> mail when asking follow up questions.
>