Skip to content

help with time series

1 message · Ronaldo Reis Jr.

#
Hi all,
I have an experiment that this:
Moths's behavior, where 0 is not behavior and 1 is behavior
I look the moths every 10 minutes for 960 minutes/day for 7 days.
Exist an interval of the 480 minutes between the days with no observations 

My dataset is something like this:
------------------------------------
| day | minutes | moth | behavior |
------------------------------------
|  1  |    0    |  m1  |     0     |
|  1  |   10    |  m1  |     1     |
|  1  |   20    |  m1  |     1     |
|  1  |   30    |  m1  |     0     |
|  1  |   ...   |  m1  |     1     |
|  1  |   960   |  m1  |     0     |
|  2  |    0    |  m1  |     0     |
|  2  |   10    |  m1  |     1     |
|  2  |   20    |  m1  |     1     |
|  2  |   30    |  m1  |     0     |
| ... |   ...   |  m1  |     1     |
|  7  |   960   |  m1  |     0     |
|  1  |    0    |  m2  |     0     |
|  1  |   10    |  m2  |     1     |
|  1  |   20    |  m2  |     1     |
|  1  |   30    |  m2  |     0     |
|  1  |   ...   |  m2  |     1     |
|  1  |   960   |  m2  |     0     |
|  2  |    0    |  m2  |     0     |
|  2  |   10    |  m2  |     1     |
|  2  |   20    |  m2  |     1     |
|  2  |   30    |  m2  |     0     |
| ... |   ...   |  ... |     1     |
|  7  |   960   |  mx  |     0     |
------------------------------------

Each moth is a repetition.

I need know:
the time for the initial behavior per day
the frequency of behavior per day
the time for the end behavior per day
if the behavior change in each day, comparing the curves.

Time series functions is appropriate for this? If yes, what functions and what 
package (ts or tseries)? if not, exist any function for this?

Thank you
Response maybe private for this off-topic questions.