2
$\begingroup$

I'm trying to determine what type of analysis I should use in R for my data/question. I'm thinking some type of time lag or time series analysis?

My question is how the duration of a behavior changes, on average, for a number of different individuals, in the 5 minutes before versus 5 minutes after an event occurs. Basically, I want to know if there is a change in the duration of a behavior that is contingent on the event occurring.

It needs to be automated because I have a LOT of data (multiple days of data for many different individuals). I have the time that an event occurs and the time (and duration) of a behavior I'm interested in (HH:MM:SS). I want to see the average change in the duration of a behavior per individual for 5 minutes before the event occurs and 5 minutes after the event occurs.

Does anyone have a recommendation for what type of analysis would be best for this question?

$\endgroup$
0

2 Answers 2

0
$\begingroup$

I am really not an expert on this, but it seems to me that panel regression might help, since there are both time series as well as individual level variation.

For the 5 minute before/after analysis, I am thinking maybe introducing dummy varaibles (DV) could be helpful? Ie. DV1 could be 0 or 1 if the minutes part of your time stamp is <=5 minutes from the event timestamp and similarly DV2 for >=

$\endgroup$
0
0
$\begingroup$

You might want to look into behavioral change point analysis. The bcpa package in R can help you.

see
http://cran.r-project.org/web/packages/bcpa/vignettes/bcpa.pdf

and http://wiki.cbr.washington.edu/qerm/index.php/Behavioral_Change_Point_Analysis

$\endgroup$
1
  • $\begingroup$ Great - thank you so much! I'll look into this. $\endgroup$
    – Rnewbie
    Commented Jan 12, 2015 at 23:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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