Say I have a sequence that looks like this:

0 0 0 0 0 1 0 0 0 0 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0

In general terms, I am interested in determining when there is an over-abundance of 1's in close proximity. Not necessarily in a row, but within a sliding window. In this example, the 0's and 1's represent whether a system is stable or unstable at regular time intervals.

Currently, I don't have any fixed notion of what exactly should constitute a significant or meaningful change in the sequence from 0's to more 1's, I am trying to work that out from some exploratory analyses.

I appreciate that this is somewhat general - however, if anyone has any ideas as to what literature to look at I would be grateful.

  • $\begingroup$ You could make set windows, then sum the values in each window and test the differences. $\endgroup$ – VCG Aug 19 '16 at 16:08
  • $\begingroup$ You will get more insight when you follow @frage_man's advice if you replace "test" by "plot." (Formal tests of the differences can be formulated but are tricky to carry out due to the serial correlation among overlapping windows and the suspicion of correlation among nearby windows.) $\endgroup$ – whuber Aug 19 '16 at 17:48
  • 2
    $\begingroup$ See stats.stackexchange.com/questions/32425/… $\endgroup$ – Tim Oct 17 '16 at 20:22

You could frame this as a classification problem with one independent variable, which is position in the sequence. Find a model with good predictive performance and see what it tells you about what sequence positions are most likely to produce 1s.

One idea for a model is logistic regression with a cubic spline of position.

  • 1
    $\begingroup$ Could you elaborate on how that logistic regression model could be used to test for "over-abundances" of ones? For instance, suppose you had a sequence of a thousand values and you used almost 100 knots for 100 degrees of freedom. Suppose further than 30 of those variables were "significant" at some level. What would that tell us about "significant" or "meaningful" changes or "stability"? $\endgroup$ – whuber Aug 19 '16 at 18:27
  • $\begingroup$ I wouldn't recommend doing significance tests, or doing any other kind of dichotomous reasoning, but simply plotting the spline. Where the curve is higher is where there should be more 1s. $\endgroup$ – Kodiologist Aug 19 '16 at 18:30

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