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  April 2013

SPM April 2013

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: Using spm_nlsi_GN in the forward direction

From:

"Friston, Karl" <[log in to unmask]>

Reply-To:

Friston, Karl

Date:

Tue, 23 Apr 2013 09:14:04 +0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (307 lines)

Dear Ricardo,

The mean can certainly be removed during bandpass filtering at any stage in the preprocessing. In terms of the inversion of the DCM, this can be enforced by having a constant (mean) term specified as a confound (in turn, this is specified by the order of the trending in the GUI). for example, in spm_dcm_erp:

% confounds - DCT: (force a parameter per channel = activity under x = 0)
%--------------------------------------------------------------------------
if h == 0
    X0 = zeros(Ns,h);
else
    X0 = spm_dctmtx(Ns,h);
end
T0     = speye(Ns) - X0*((X0'*X0)\X0');
xY.X0  = X0;

where spm_dctmtx(Ns,1) returns a column of a constant (mean).

I hope that this helps.

Very best wishes –  Karl

________________________________________
From: [log in to unmask] [[log in to unmask]] on behalf of Ricardo Pizarro [[log in to unmask]]
Sent: 22 April 2013 20:29
To: Friston, Karl
Subject: Re: Using spm_nlsi_GN in the forward direction

Hey Karl,

I have another question regarding DCM modeling.  It seems that
somewhere in the cascading call of functions, the mean of the modeled
waveform is subtracted.  I can say this because I have tried to
introduce an offset to set the prestim mean to zero.  Is there a place
in the code that the mean is removed from the waveform or a hpf is
used?  Thanks again for your help.  All the best,

-Ricardo

On Tue, Apr 9, 2013 at 10:59 AM, Friston, Karl <[log in to unmask]> wrote:
> Dear Ricardo,
>
>
>
> Thanks again for your tireless help!  Just a couple followup questions:
>
>
>
> 1. Are there meaningful units on the input?  I have been using DCM.xY.scale
> to appropriately scale the predicted waveforms to plot against recorded
> waveforms.  Does this translate to the input as well?
>
>
>
> No - the data scaling is used to ensure there is a rough match between the
> units of the data, the units of the lead field and the amplitude of the
> predicted responses.  The input is scaled (arbitrarily) to a maximum 32.
> The input is rescaled in the equations of motion of the neural mass models
> to produce an ERP of about 1 arbitrary unit (assuming the lead field is 1).
>
>
>
> 2. Related to the input.  Is it possible to change the input waveform
> (amplitude, offset, different shape?).  Also is it possible to change the
> location of which layer the input stimulates
>
>
>
> Yes - but you would have to change the spm_erp_u.m routine (e.g, to make
> them sustained inputs) and the appropriate equations of motion (e.g.,
> spm_fx_erp)
>
>
>
> With very best wishes,
>
>
>
> Karl
>
>
>
>
>
> On Tue, Apr 9, 2013 at 7:50 AM, Friston, Karl <[log in to unmask]> wrote:
>
>> Dear Ricardo,
>
>>
>
>>
>
>>
>
>> It's been a while since I've emailed you but I have been busy as I'm
>
>> sure you have as well.  I am still not able to find the answers to a
>
>> few questions regarding how DCM works:
>
>>
>
>>
>
>>
>
>> 1. Is there a way to save the input that is computed "on the fly" as
>
>> you said above?  I would like to plot this input versus time to
>
>> compare to the other waveforms.  Is that possible?
>
>>
>
>>
>
>>
>
>> Yes – in fact this is done for you by the routine that reviews the
>> results:
>
>> - just type >> spm_dcm_erp_results(DCM,'Input');
>
>>
>
>> One can also compute it oneself using:
>
>>
>
>>
>
>>
>
>>         t    = DCM.xY.pst;
>
>>
>
>>         t    = t - t(1);
>
>>
>
>>         U    = spm_erp_u(tU/1000,DCM.Ep,DCM.M);
>
>>
>
>>
>
>>
>
>>
>
>>
>
>> 2. Vladimir told me DCM averages the epochs into a single waveform
>
>> before running its optimization algorithm.  Is this correct?  Does DCM
>
>> optimize its solution on all epochs or a single average?
>
>>
>
>>
>
>>
>
>> It fits a single waveform that can be a single trial but is more
>
>> usually a trial average (ERP).
>
>>
>
>>
>
>>
>
>> 3. Does the DCM struct file keep convergence information anywhere?  I
>
>> see when DCM is running it iterates through many steps until either
>
>> convergence happens or the number of steps ends.  Does the struct file
>
>> keep any of this information stating on which step convergence occurred if
>> at all?
>
>>
>
>>
>
>>
>
>> No – but it would be relatively easy to place this information in the
>
>> structure - you would have to pass it from spm_nlsi_GH to DCM.mat
>
>>
>
>>
>
>>
>
>> 4. Related to (3) can we use a model that worked in a particular case
>
>> to start the estimation for another set of data?  That is, we used DCM
>
>> to predict waveforms recorded from different channels and it works
>
>> reasonably well in many channels but fails to converge in a couple of
>
>> cases.  Can we use the model estimated for one set of channels to
>
>> start the modeling for the case that failed?  We think this could help
>
>> DCM to start from a better location and it may not "get stuck" on what is
>> known as "local minimum."
>
>>
>
>> In other words, how can we use our own set of initial conditions,
>
>> parameters.
>
>>
>
>>
>
>>
>
>> Yes – this is common practice in group subjects, in which a few
>
>> subjects do not converge.  This entails placing the initial parameters
>
>> in DCM.M.P.  At the bottom of the GUI (spm_api_erp) there is a button
>> called ‘initialise’
>
>> that allows you to do this automatically.
>
>>
>
>>
>
>>
>
>>
>
>>
>
>> 5. How is latency in the waveforms modeled with T(:)?  Are these
>
>> values able to be changes as well?
>
>>
>
>>
>
>>
>
>> Yes, they are.  The prior expectation is set by DCM.M.ons and this is
>
>> adjusted using a free parameter (not pE.T but pE.R: pE.T sets the time
>
>> constants for variance synaptic responses)
>
>>
>
>>
>
>>
>
>> I hope this helps.
>
>>
>
>>
>
>>
>
>> With very best wishes - Karl
>
>>
>
>>
>
>
>
>
>
>
>
> --
>
> Ricardo Pizarro
>
> ---------------------------------
>
> Graduate Research Assistant, Meyerand Lab Department of Biomedical
> Engineering Wisconsin Institutes for Medical Research University of
> Wisconsin-Madison
>
> 1111 Highland Avenue
>
> Madison, WI 53705-2275
>
> ---------------------------------
>
> Cel: (301)602-0692
>
> Email: [log in to unmask]
>
>

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