Appropriate method for time series data I am interested in comparing the presence/absence of different species (MUVI80, MUXX80, MICRO80, etc.) both within and between datetime rows.
Here is an example of my data:
datetime            MUVI80 MUXX80 MICRO80 TAHU80 TAST80 ERDO80 LEAM80 ONZI80 MEME80 MAMO80
2012-10-30 17:42:00  FALSE  FALSE    TRUE  FALSE  FALSE  FALSE  FALSE  FALSE  FALSE  FALSE
2012-10-31 17:42:00   TRUE  FALSE    TRUE  FALSE  FALSE  FALSE  FALSE  FALSE  FALSE  FALSE
2012-11-01 17:42:00  FALSE   TRUE   FALSE  FALSE  FALSE   TRUE  FALSE  FALSE  FALSE  FALSE
2012-11-02 17:42:00  FALSE  FALSE   FALSE  FALSE  FALSE  FALSE  FALSE  FALSE   TRUE  FALSE
2012-11-03 17:42:00  FALSE  FALSE   FALSE  FALSE  FALSE  FALSE   TRUE  FALSE  FALSE  FALSE
2012-11-04 16:42:00   TRUE   TRUE   FALSE  FALSE  FALSE  FALSE  FALSE  FALSE  FALSE  FALSE

Specifically, I would like to determine if a MICRO80 was seen in the second time step (2012-10-31 17:42:00) how likely am I to see, for example, MUVI80 or MUXX80 within that same time step (2012-10-31 17:42:00) or in the immediately prior (2012-10-30 17:42:00) or following (2012-11-01 17:42:00) time steps?
Despite that I know what I would like to figure out, I do not know what sort of statistical analysis would be most appropriate to answer this preliminary question.
If this question is not appropriate for CrossValidated and would be better suited for a different forum, my apologies and please let me know where it should be posted!
 A: As long as the data in a column is defined as a date/time type in R, it is possible to subtract dates/times and then to extract the time between rows, or the length of time from some fixed time point. 
One approach that could be tried is called a Markov Chain Monte Carlo (MCMC) (R package is markovchain).
Assume:


*

*There is a unique row in the data with time and an identification of whether a predator or prey is recorded

*There are many photos of predators or prey.

*Observations of predators and prey are made in temporal sequence.


Method:


*

*Exhaustively count the number of temporal pairs of observations: prey-prey, prey-predator, predator-prey and predator-predator.

*Then shuffle (randomize) the observations of pred/prey (i.e. maintain the same total number of pred/prey as observed) and count the number of pairs of observations generated by the shuffle: prey-prey, prey-predator, predator-prey and predator-predator. Record.

*Calculate the difference between number of observations in step (2) and that found by each shuffle. Repeat 1000 times. This should give a sense of how likely the original observation of prey-prey, prey-predator, predator-prey and predator-predator paired sequences are given the observed proportion of pred/prey. This can be tested assuming a chi-square distribution.

*Using this approach, any particular kind of structure in the data can be tested if there is enough data. For example, does the likelihood of a predator being observed increase with the number of times prey are observed in a row (i.e. is prey-prey-predator more likely than prey-prey-prey)?
