ta.correl {heR.Activities}R Documentation

Calculate Correlation Between Two Time-Activities

Description

Function to calculate the degree of correlation between two time-activity event time series objects

Usage

ta.correl(x, y, set.x = 1, set.y = 1)

Arguments

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

Details

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.

Value

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.

Idea for a different function

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.

Author(s)

Neil Klepeis

See Also

tact, ta.autocorr


[Package heR.Activities version 0.0.4 Index]