Hello Donald,
thank you for your thoughts.
I was actually thinking to include my covariates in the first level
model not as parametric modulators but as multiple regressors. The
values of the covariate differ across conditions so adding them as
parametric modulators would not subtract all of the covariate-related
variance from the functionals.
With the multiple regressor approach there is the need to define the
undefined covariate in the baseline trials. You can use the code below
to verify that:
if:
- if the covariate is mean centered;
- if the value of the covariate in the baseline trials corresponds to
mean(covariate(trial~=baseline));
then two desirable conditions are satisfied:
- adding the covariate will not alter the baseline estimate
- the beta for the covariate computed considering all of the trials
(both baseline and non-baseline trials) equals that computed considering
only the non-baseline trials.
What do you think?
Cheers,
Bruno
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%%
disp('--------------------')
Y=rand(99,1);
%%% design matrix for two-condition + baseline experiment
C=[[ones(33,1);zeros(66,1)],... % Condition 1 = C1
[zeros(33,1);ones(33,1);zeros(33,1)],... % Condition 2 = C2
[zeros(66,1);ones(33,1)]]; % Baseline = Bas
%%% condition-specific averages
Cm=[mean(Y(C(:,1)==1)) mean(Y(C(:,2)==1)) mean(Y(C(:,3)==1))];
disp([num2str(Cm),': condition means (C1 C2 Bas)'])
fun=@spm_orth; %uncomment for design orthogonalization
% fun=@(x) x; % uncomment for no design orthogonalization
F=Y+rand(size(Y)); % covariate (Cov), defined only on non-baseline trials
Fz=[(F(1:66)-mean(F(1:66)));NaN*zeros(33,1)]; % mean-center the covariate
des=[C(:,1:2) Fz]; %regressors for models for non-baseline trials only
des=des(1:66,:);
b=(fun(des)\Y(1:66))';
disp([num2str([b(1:2) NaN b(3)]),': No baseline trials (C1 C2 Bas Cov)'])
des=[C(:,1:2) ones(99,1) Fz]; %regressors for all-trials model
des(67:end,end)=mean(des(1:66,end));
b=(fun(des)\Y)';
disp([num2str(b),': With baseline trials (C1 C2 Bas Cov)'])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bruno L. Giordano, PhD
Voice Neurocognition Laboratory (CCNi, Glasgow Univ) &
Affiliate member of Music Research Dept. (McGill Univ, Montréal)
URL: http://www.brunolgiordano.net
On 04/05/2012 5:14 PM, MCLAREN, Donald wrote:
> A few thoughts:
>
>
> I would like to factor out some stimulus measure from my functional
> data. I am in doubt about the pros and cons of doing so within the
> second level model (e.g., include stimulus measures as covariates)
> or within the first level model (e.g., include stimulus measures as
> multiple regressors along with head motion parameters).
>
>
> It depends what you want to do. At the second level, covariates only
> work properly when you have one observation per subject. When you have
> covariates in a repeated measures design, the estimates change depending
> on the program you use as there isn't a consenus on how to estimate the
> effects and variances. At the first level, adding covariates (or rather
> parametric modulators) gives you the mean response of the condition for
> the mean of the covariate. This means that if subjects or conditions
> have different means on the covariate, that you haven't removed all the
> variance due to the covariate. This would suggest that you'd want the
> mean covariate at the second level. However, be aware of the point above.
>
>
> I would for example expect the first-level approach to be more
> advisable because of the potentially larger number of degrees of
> freedom in the design matrix. For example, in a design with a
> three-level factor corresponding to three stimulus categories and
> multiple stimuli within each category (e.g., 10), the degrees of
> freedom in the second level model that tests the effect of stimulus
> category would be much lower than in the first level model. As such,
> factoring out several stimulus measures could perhaps be just
> impossible at the second level.
>
>
> See above.
>
>
> A side question: given a stimulus measure X which is undefined
> during (implicit) baseline trials, what value should be assigned to
> X for the baseline trials in order not to affect the baseline
> estimate? mean(X(trial~=baseline))?
>
>
> You can't have a parametric modulator for trials that aren't modelled.
> Any change to the implicit baseline trials will change the baseline line
> estimate.
>
>
> Thank you for any suggestion,
>
> Bruno
>
>
|