permuting cutpoint range doesn't span trial time window

19 views
Skip to first unread message

Demetris Roumis

unread,
Jul 5, 2019, 2:38:48 PM7/5/19
to AnalyzingNeuralTimeSeriesData

Hi Mike,

My question concerns your code for chapter 34, which I attached just in case there are multiple versions floating around, line 94:

cutpoint = randsample(2:nTimepoints-diff(baseidx)-2,1);


My understanding is that you are doing a circular time shift and randomly sampling a point within the trial time window to use as a new 'cutpoint', per permutation.

Why do you subtract the duration of the baseline from the upper end of the range from which you sample?
Doesn't this unnecessarily limit the cutpoint range to a subset of possible times in the time window?

Thanks,
Demetris
chapter34.m

Mike X Cohen

unread,
Jul 6, 2019, 10:38:53 AM7/6/19
to analyzingneura...@googlegroups.com
Hi Demetris. That's correct. I believe what I was trying to do is avoid a situation where the cut point was too close to the end. Honestly, I'm not sure it really matters that much, given a sufficient number of iterations.

Mike



--
You received this message because you are subscribed to the Google Groups "AnalyzingNeuralTimeSeriesData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to analyzingneuraltimes...@googlegroups.com.
Visit this group at https://groups.google.com/group/analyzingneuraltimeseriesdata.
To view this discussion on the web visit https://groups.google.com/d/msgid/analyzingneuraltimeseriesdata/e024ffbd-d87f-4667-8392-4c7d7830f2a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Mike X Cohen, PhD
Fresh look: mikexcohen.com

Demetris Roumis

unread,
Jul 6, 2019, 6:25:30 PM7/6/19
to AnalyzingNeuralTimeSeriesData
Ok great thanks. Since I'm doing 1k iterations, I think I'll just sample the whole period.
I guess a reason to not use a cutpoint too close to the end would be to avoid have the discontinuity in the baseline period after the shift, and maybe that prevents data discontinuities from increasing the baseline std? I think you're right though, with enough iterations this wouldn't matter much.

Thanks again,
Demetris

On Saturday, July 6, 2019 at 7:38:53 AM UTC-7, Mike X Cohen wrote:
Hi Demetris. That's correct. I believe what I was trying to do is avoid a situation where the cut point was too close to the end. Honestly, I'm not sure it really matters that much, given a sufficient number of iterations.

Mike



On Fri, Jul 5, 2019 at 8:38 PM Demetris Roumis <rou...@gmail.com> wrote:

Hi Mike,

My question concerns your code for chapter 34, which I attached just in case there are multiple versions floating around, line 94:

cutpoint = randsample(2:nTimepoints-diff(baseidx)-2,1);


My understanding is that you are doing a circular time shift and randomly sampling a point within the trial time window to use as a new 'cutpoint', per permutation.

Why do you subtract the duration of the baseline from the upper end of the range from which you sample?
Doesn't this unnecessarily limit the cutpoint range to a subset of possible times in the time window?

Thanks,
Demetris

--
You received this message because you are subscribed to the Google Groups "AnalyzingNeuralTimeSeriesData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to analyzingneuraltimeseriesdata+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages