Dear Philip,
have a look at spm_reml.m lines 194-197 and spm_spm.m line 880.
You can recompute V (=SPM.xVi.V) with:
V = 0;
for i = 1:numel(SPM.xVi.Vi)
V = V + SPM.xVi.Vi{i} * SPM.xVi.h(i);
end
V = V * SPM.nscan/trace(V);
Best wishes,
Guillaume.
On 20/12/13 04:34, Philip Lin wrote:
> Hi all,
>
> I've run the "Auditory" example in SPM8 manual step by step (ch28, p209-222) and met some problems from the output.
>
> Q1. As I know, the covariance structure V was approximated by a linear formula: a1*Q1 + a2*Q2, where Q1 is identity matrix and Q2 is an AR(1) exponential correlation matrix. The hyperparameters (a1, and a2) were estimated by ReML. Thus, the estimated V could be calculated by hand (because a1, and a2 were given in SPM.xVi.h), but why the result in this way is different to SPM.xVi.V ? And there're two cells in SPM.xVi.Vi, what's the difference ? I've checked the spm_spm.m (line 29-43), but I still can't get it.
>
> many thanks
>
> Philip Lin
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|