Hi Thomas:
  very thanks for your suggestion. I will download the SPMd and use it to slove my problem.
 
 Do  other SPMer expert have different way  to slove the problem.
 
 Any sugesstion will be appreciated.
 
 Thanks!
 
LeiNa
 
On 11/1/05, Thomas E Nichols <[log in to unmask]> wrote:
LeiNa, Chin,

> In SPM2, I have estimated a model that only consists of some
> explanatory variables (head motion, respiration, pulsation¡Ä)
> unrelated to my exp design, and got the parameters (¦Â ),
>
> Now I want to get a new time course that do not include variables
> in above model and save it as series 3D ANALYZE images (or as the
> raw fMRI data)?

The SPMd toolbox creates a 4D dataset of *standardized* residual
(i.e., it does it SPM2 style, as a sequence of 3D analyze files).
(Standardized residuals are the residual divided by their standard
deviation.)

With a trivial modification to the SPMd code you can write out
un-standardized residuals, what you seem to desire.  One key
limitation, though, is that SPMd only works with single-session SPM2
analyses.

To do this, you'll need to

   (a) download SPMd, http://www.sph.umich.edu/ni-stat/SPMd

   (b) Edit the file spmd_MkResid.m

       You'll see that at line 119 it makes the raw (unstandardized)
       residuals, and then from lines 123-138 it proceeds to
       standardize the residuals.  Simply comment out lines 123-138
       and the function will produce the residuals you want.

   (c) Run spmd_MkResid.  The function will ask for the SPM.mat file
       and for a directory where you want to write all of the residual
       images.


Hope this helps!

-Tom


    -- Thomas Nichols --------------------   Department of Biostatistics
       http://www.sph.umich.edu/~nichols     University of Michigan
       [log in to unmask]                     1420 Washington Heights
    --------------------------------------   Ann Arbor, MI 48109-2029