On Mon, 6 Apr 2009 10:10:48 +0100, Thomas Stephan <[log in to unmask]> wrote: >Dear Laura, Lennart, Stephen, Darren, > >let me try to come back to my original question posted last week: >https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind0904&L=SPM&P=R12110 > <snip> > >But even if so, how can we explain the complex values of the >standarddeviation originiating from the square root of a negative number >that appears in a situation in SPM where numbers are not planned to be >negative? Is this a result from using the wrong model, or is it a bug in SPM? <snip> Just commenting about this part for now. I'm not sure what to do. It sounds like you're somewhat comfortable with examining the SPM code. When I get into these situations, I use the matlab debugger to track down the source of the error or problem. In your original post, you wrote: "It looks like somewhere around line 298 in spm_graph.m there is a negative value appearing in the diagonal..." I would think that the Bcov matrix should be nonnegative definite, so that if it's in diagonal form, all elements should be nonnegative. So that's weird. Only suggestions I have at the moment: (1) Use the debugger to go through the various SPM *.m files to find where this might be coming from. (2) Maybe there's something wrong or awkward about the covariance and/or ReML calculations. In your original post, you told SPM that side and condition should both have "no" independence and "equal" variance. Glascher/Gitelman instruct in at least one place to use "no/equal," but in my opinion if "no" is specified for independence, then in most situations "unequal" should be specified for variance. (While this is arguable, I think some other people on the list agree with this.) So, you could try that and see what happens. Best, S