# Dyadic Lagged Association Rate

### Description

Calculate lagged association rate `g(tau)`

from Whitehead (2008) for each dyad individually

### Usage

1 2 3 4 |

### Arguments

`group_by_individual` |
a |

`times` |
K vector of times defining the middle of each group/event |

`timejump` |
step length for |

`output_style` |
either 1 or 2, see details |

`min_time` |
minimum/starting value of |

`max_time` |
maximum/ending value of |

`identities` |
N vector of identifiers for each individual (column) in the group by individual matrix |

`which_identities` |
vector of identities to include in the network (subset of identities) |

`locations` |
K vector of locations defining the location of each group/event |

`which_locations` |
vector of locations to include in the network (subset of locations) |

`start_time` |
element describing the starting time for inclusion in the network (useful for temporal analysis) |

`end_time` |
element describing the ending time for inclusion in the network (useful for temporal analysis) |

`classes` |
N vector of types or class of each individual (column) in the group by individual matrix (for subsetting) |

`which_classes` |
vector of class(es)/type(s) to include in the network (subset of classes) |

`association_rate` |
calculate lagged rate of association (see details) |

### Details

Calculates the dyadic lagged association rate. The lagged rate of association incorporates the number of observations of each individuals as a simple ratio index within each time period, leading to a better estimation of the assocation rate for data where many observations of individuals can be made within a single time period.

### Value

If `output_style == 1`

then a stack of matrices is returned that is `N x N x tau`

.
If `output_style == 2`

then a dataframe is returned containing the focal ID, associate, `tau`

, and lagged association rate.

### Author(s)

Damien R. Farine

### References

Expanded from Whitehead (2008)

### Examples

1 2 3 4 5 6 7 8 |