JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for SPM Archives


SPM Archives

SPM Archives


SPM@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

SPM Home

SPM Home

SPM  2004

SPM 2004

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: Question about your get_psth script

From:

Darren Gitelman <[log in to unmask]>

Reply-To:

Darren Gitelman <[log in to unmask]>

Date:

Tue, 19 Oct 2004 00:50:31 -0500

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (211 lines)

Dear Michael:

I fixed the problem noted below.
A variable wasn't getting assigned when that section of code was being 
called non-interactively.

I have posted version 1.11 to the website 
http://www.brain.northwestern.edu/cbmg/cbmg-tools/index.html

Two other things I've noticed- the code does not deal with parametric 
events, and it absolutely requires that in a multi-session analysis all 
sessions must contain the same number and type of events. I'm not sure if 
or when these limitations might be fixed, since more sophisticated queries 
can be performed in tools such as marsbar.


>PS -- The detail you added to the documentation about pci conversion to 
>SEM helps a lot.  I was wondering about that myself.  I imagine you could 
>average the .pci across subjects the same way I'm trying to average 
>.psth?  Or, is it more appropriate statistically to make a gargantuan 
>fixed-effects model and simply extract a single psth and pci for each 
>regressor of interest?

I don't know the correct statistical answer to this. I think there are 
tradeoffs doing it either way. We have tried both methods including 
multi-session runs and then averaging the session psth results, vs single 
session runs. A problem with multi-session runs occurs if some sessions 
have very few events of a particular type, then the estimation of the psth 
can go horribly wrong, for example if there is only a single event. Single 
session runs can cause a problem if some of your events bridge across the 
run barrier, so you have to be careful to try not to estimate events too 
close to the end of one run and the start of the next.

Darren


At 05:12 PM 10/15/2004, you wrote:
>Hi... I have one (hopefully last) follow-up email.  The code you posted 
>today works fine for me as a GUI, but the instructions on calling it as a 
>function lead me to an error I cannot seem to get past.  I spent the 
>better part of yesterday afternoon scripting up some matlab code to 
>interactively loop through subjects, assign and average psth's across 
>subjects, then generate and save plot *.tifs for the regressors of 
>interest for each voxel.  Needless to say, I really want your function 
>call to work!  When I try running this updated get_psth.m file, I get the 
>following MATLAB error message:
>
>
>??? One or more output arguments not assigned during call to 'get_psth (my 
>regions)'.
>
>Error in /opt/local/spm2/get_psth.m
>On line 147  ==>   [PSTH.xY, SPM, SPMfile] = my_regions(xY,SPM);
>
>
>I've troubleshooted this a little bit... It seems like it may be a problem 
>loading the SPM.mat file.  Breaking down the function call, I notice that 
>PSTH = get_psth([-21 -69 27]) gets the voxel coordinates inputted just 
>fine, then prompts for the SPM.mat file via GUI (as the programming 
>dictates).  Whereas, PSTH = get_psth([-21 -69 27],fullfile(pwd,'SPM.mat') 
>simply bombs.
>
>Has anyone else had this problem?  Am I just missing something that would 
>be obvious to me if it wasn't Friday and I was worn out from the long 
>week?  I checked that the fileparts.m command was working fine within the 
>function call to parse up the path to the SPM.mat file.  (Just in case, I 
>disabled the 'cd(pth)' command in the get_psth.m file to make sure it 
>wasn't pointing to some weird directory, but alas the code seems to be 
>doing what it's supposed to).  Beyond this, I'm a bit at a loss...
>
>Any further help you can offer would still be greatly appreciated!
>Mike
>
>PS -- The detail you added to the documentation about pci conversion to 
>SEM helps a lot.  I was wondering about that myself.  I imagine you could 
>average the .pci across subjects the same way I'm trying to average 
>.psth?  Or, is it more appropriate statistically to make a gargantuan 
>fixed-effects model and simply extract a single psth and pci for each 
>regressor of interest?
>
>
>Michael C. Stevens, Ph.D.
>
>Senior Research Scientist, Clinical Cognitive Neuroscience Laboratory
>Olin Neuropsychiatry Research Center
>The Institute of Living / Hartford Hospital
>200 Retreat Avenue
>Hartford, CT  06106
>
>Assistant Clinical Professor of Psychiatry
>Yale University School of Medicine
>
>Tel: (860)545-7552
>Fax: (860)545-7797
>
> >>> Darren Gitelman <[log in to unmask]> 10/15/04 01:01PM >>>
>Michael:
>
>Oooh. that is a bit raw. There were multiple updates since then and I just
>posted an update (version 1.9) today after reading your query. It includes
>some instructions for plotting that I discussed with my students.
>
>Here are the changes
>There were probably changes in between version 0.1 and version 1 but I
>didn't keep track.
>version 1.1 Multiple changes to avoid selecting SPM.mat file twice. Changes
>to properly adjust for other columns.
>version 1.2-1.3 changes to help
>version 1.4 better feedback if data cannot be extracted.
>version 1.5 identifies the interactive window for better designation of 
>events.
>version 1.6 added hack to check if beta seems way too large. This might
>occur if there were only 1-2 events used to estimate the beta.
>version 1.7 added field for storing bad results PSTH.events(n).bad
>version 1.8 updated choices for adjustments to be defaults.
>version 1.9 updated some help text.
>
>Go to the website:
>http://www.brain.northwestern.edu/cbmg/cbmg-tools/index.html to get the
>newest version.
>
>Darren
>
>At 11:39 AM 10/15/2004, you wrote:
> >Thank you very much for your reply.  It certainly does help a great
> >deal.  On what date did you post the update onto the webpage?  I'll check
> >to make sure I've got the most current code. My function says v0.1 from
> >06/09/04.  From what you said, I guess there's a more current one.
> >
> >Thanks much again!
> >
> >Sincerely,
> >Mike
> >
> >Michael C. Stevens, Ph.D.
> >
> >Senior Research Scientist, Clinical Cognitive Neuroscience Laboratory
> >Olin Neuropsychiatry Research Center
> >The Institute of Living / Hartford Hospital
> >200 Retreat Avenue
> >Hartford, CT  06106
> >
> >Assistant Clinical Professor of Psychiatry
> >Yale University School of Medicine
> >
> >Tel: (860)545-7552
> >Fax: (860)545-7797
> >
> > >>> Darren Gitelman <[log in to unmask]> 10/15/04 12:04PM >>>
> >At 09:19 AM 10/15/2004, you wrote:
> > >Dear Dr. Giitelman,
> > >
> > >I just downloaded from the SPM email-list your get_psth.m script.  If
> > >you don't mind, I have 2 very quick questions for you:
> > >
> > >1)  Is this script limited to event-related designs?  My most current
> > >project invovles an epoch-modeled dataset, so I tested it out on that
> > >first.  It appeared to give me data that plots similar to what I would
> > >have expected given one of my rapid event-related designs.  So I
> > >wondered if the duration of the 'event' was taken into account when
> > >calculating the PST estimates.
> >
> >No it isn't restricted to event related data per se. The duration of the
> >psth to estimate is given by your specification of the PSTH window. You
> >should get exactly the same answer in SPM if you choose to graph the
> >event-related response and select PSTH (assuming the data are in 1
> >session). The calculation effectively implements a least squares
> >deconvolution so it shows you the HRF that when multiplied (convolved) by
> >the design matrix and with the added error would give you back your signal.
> >There is no explicit representation of the event duration except for the
> >window of the psth and each bin of the psth is usually a TR.
> >
> >
> > >2)  I was a little uncertain interpreting the time scale of the graph.
> > >Given the GUI interface you programmed, the X-axis appears to be
> > >measured in seconds, correct.  I was wondering if it perhaps was
> > >demarked as multiples of the bin (for this dataset, a TR of 1.5
> > >seconds).  The data I get out for the epoch-design would make a LITTLE
> > >more sense as is, if each point was 1.5 seconds.
> >
> >No it should be actual seconds. The calculation is on lines 209 - 210 of
> >get_psth (version 1.8 or lines 242-243 in version 1.9)
> >209      j = round(xBF.length/xBF.bin);
> >210           PSTH.pst = [1:j]*xBF.bin - xBF.bin/2;
> >
> >In line 209, j is in units of TR's or bins (window length (=secs) / TR
> >(=sec/TR). So for a window length of 30 sec and TR of 2,  j = 15.
> >Line 210 sets up a vector of TR's ([1:j]) and multiplies it by the bin size
> >or TR (i.e., sec/TR), thus transforming the vector into seconds.
> >
> >I have posted an update to get_psth (version 1.9) which adds some
> >information about plotting the results.
> >Hope this helps,
> >Darren
> >
> >
> >-------------------------------------------------------------------------
> >Darren R. Gitelman, M.D.
> >Cognitive Neurology and Alzheimer¹s Disease Center
> >Northwestern Univ., 320 E. Superior St., Searle 11-470, Chicago, IL 60611
> >Voice:   (312) 908-9023     Fax:  (312) 908-8789
> >-------------------------------------------------------------------------
>
>
>-------------------------------------------------------------------------
>Darren R. Gitelman, M.D.
>Cognitive Neurology and Alzheimer¹s Disease Center
>Northwestern Univ., 320 E. Superior St., Searle 11-470, Chicago, IL 60611
>Voice:   (312) 908-9023     Fax:  (312) 908-8789
>-------------------------------------------------------------------------

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

May 2024
April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
2006
2005
2004
2003
2002
2001
2000
1999
1998


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager