Dear Hana,
you will see that spm_reml.m is called in spm_spm.m in a way that D is 0
so the loop where those variables seem to be used before being defined
isn't actually used.
D would be different than 0 with the call at l.176 in spm_reml.m but in
this case the other test "if min(real(eig(full(C)))) < 0" could only be
true after the first iteration of the loop over K so the variables dh,
dFdhh, and dFdh will have then be defined (later in the loop over K).
I hope this helps,
Guillaume.
On 14/03/11 19:57, Hana Lee wrote:
> Dear SPMers,
>
> When I was playing around with the function spm_reml.m, which is
> relavant to ReML estimation of a GLM, I found some parts that do
> not seem right to me.
> In the function spm_reml.m, variables dh, dFdhh, and dFdh are not
> defined before they are being used. I also looked through spm_spm.m
> since the spm_spm.m calls the spm_reml.m, but did not find those
> variables neither.
>
> Can someone please advise me how come this is possible? Any comments are
> truly appreciated!
>
> Thanks,
> Hana
>
> --
> Lee, Hana
> Biostatistics Ph.D student
> School of Public Health
> The University of North Carolina at Chapel Hill
> [log in to unmask] <mailto:[log in to unmask]>
>
> Brass bands are all very well in their place- outdoors and several miles
> away.
>
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG