| ta.correl {heR.Activities} | R Documentation |
Function to calculate the degree of correlation between two time-activity event time series objects
ta.correl(x, y, set.x = 1, set.y = 1)
x |
A tact time-activity object |
y |
A tact time-activity object |
set.x |
the event set to use for x |
set.y |
the event set to use for y |
Here correlation is defined by the fraction of total time that each individual spends "in the same place at the same time" or "involved in the same event at the same time" as the other individual. Total time is the smaller of the two individual time domains.
NA values are removed when tallying the time spent
in the same location, activity, or event. Therefore, NA values
cannot be considered as valid events to have in common.
A number between 0 and 1 giving the fraction of time that one individual spends in "the same place at the same time" as the other individual.
Find the time spent in each event over fixed intervals using the ta.integ() function. Then do the typical correlation calculation of the time series for each type of event. We could do the same thing for autocorrelation.
Neil Klepeis