2
$\begingroup$

I have time series of continuous measurements of two different variables $x(t)$ and $y(t)$ measured at times $t_i$. I measured those variables for different subjects (with different characteristics) and I would like to find out if a peak in variable $x$ is significantly followed by a peak in variable $y$ in a certain interval at the group level.

At the individual level, I do a peak detection for both $x$ and $y$, yielding $m_x$ peaks at times $(t_{x,i})_{1\le i\le m_x}$ and $m_y$ peaks $(t_{y,i})_{1\le i\le m_y}$. Then I count all occurrences in which a peak in $x$ is followed by a peak in $y$ (in the specified interval) and divide it by the total number of peaks in $x$ ($m_x$). I think a good way to test the significance of that measure is to bootstrap by picking $N$ realizations of $m_x$ random indices and calculate the same measure. This gives a distribution at the individual level and if the data falls outside the 95% highest-density interval, it is significant.

However, my question is, how I can find out if this pattern is statistically significant across subjects (i.e., at the group-level).

Edit: The problem is (1) that each subject has a different base-rate of peaks in $y$ and therefore a different probability for "peak $y$ after peak $x$" has a different meaning for each subject. And (2) each subject has a different number of peaks in $x$ and therefore some subjects have more reliable estimates than others...

$\endgroup$
  • $\begingroup$ If you're talking about analyzing your time series data at group level, don't you think that clustering might be helpful? If you're interested in time series clustering, please let me know - I might be able to suggest some information. $\endgroup$ – Aleksandr Blekh Jan 21 '15 at 11:25
  • $\begingroup$ I don't quite understand what you are referring to. Do you mean clustering on the subject level? To what purpose? How could it help to solve the problem? $\endgroup$ – thias Jan 21 '15 at 12:16
  • $\begingroup$ I was thinking that, if you could define a measure of the "pattern" you've described, then you could hypothesize that (and then test for) the difference between time series groups (determined by clustering) is statistically significant, which is QED. $\endgroup$ – Aleksandr Blekh Jan 21 '15 at 12:39
1
$\begingroup$

If you want to use similar approach on group level you should use bootstrap sampling on group level because sampling on individual level could give you biased estimates on group level (check here or here and here for an example why you should not confuse group-level and individual-level data). So what you do is (1) you sample with replacement $K$ groups out of $K$ groups (rather then sampling individual observations) and then (2) sample without replacement $n_k$ individuals in each group (so what you do is you simply shuffle the cases). In most cases step 2 actually does not make much difference, so is not required. Sampling in step 2 should be done without replacement because otherwise it gives biased results (see references in the linked answers).

$\endgroup$
  • $\begingroup$ thanks for the answer! It does not, however, answer my main problem of estimating the group-level effect. The problem is (1) that each subject has a different base-rate of peaks in $y$ and therefore a different probability for "peak y after peak x$ has a different meaning for each subject. And (2) each subject has a different number of peaks in x and therefore some subjects have more reliable estimates than others... $\endgroup$ – thias Jan 21 '15 at 9:27
  • $\begingroup$ OK, than I misunderstood your main problem (maybe you should edit your question and add this response to it). It is an interesting problem and I don't know any obvious solution for it. You probably could introduce some group-level variable like "peak frequency" but I don't want to provide an ad hoc random solution. $\endgroup$ – Tim Jan 21 '15 at 9:39
  • $\begingroup$ good idea, included the additional info in the question. I was thinking of maybe using a hierarchical Bayesian model but it is not obvious to me how to estimate the base-frequency based on the data (i.e., how many samples to draw etc.) $\endgroup$ – thias Jan 21 '15 at 9:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.