Not quite.
For the model with the pm the beta of the task is mean(10+[1:8]) and the
beta of the pm is 1.
The difference between the two is that the model without the pm has a much
larger error term because you are mot modeling the linear trend in the data.
For your example, try this:
y = 10+[1:8]';
x1 = ones(8,1); % model without pm = only average effect
x2 = [ones(8,1) [1:8]'-repmat(mean(1:8),8,1)]; % model with pm
b1 = x1\y = 14.5
b2 = x2\y = [14.5 1]
ssq1 = (y-x1*b1)' * (y-x1*b1) = 42
ssq2 = (y-x2*b2)' * (y-x2*b2) = 2.2404e-28 ~ 0 (perfect fit)
Cheers,
Jan
Wu Xiang wrote:
> Thanks Jan. Please further help check the below, I am not sure whether I
> exactly understand how adding parametric modulator (pm) change the beta of
> the task:
>
> given values of the 8 blocks of a task are 10+[1:8]
> for the model without pm, the beta of the task would be mean(10+[1:8])
> for the model with pm, the beta of the task would be 10, and the beta of the
> pm would be like 1(the slope is 1)
> Is the above correct?
>
> Xiang
>
>
--
Jan Gläscher, Ph.D. Div. Humanities & Social Sciences
+1 (626) 395-3898 (office) Caltech, Broad Center, M/C 114-96
+1 (626) 395-2000 (fax) 1200 California Blvd
[log in to unmask] Pasadena, CA 91125
|