Description Usage Arguments Details Value Examples
View source: R/distance.split.R
Split interaction data into subsets that are large enough for the chicane model to be fit (see Details), based on distance. This step allows the distance term in the model to be fit in a piecewise linear fashion.
1 2 3 4 5 6 | distance.split(
interaction.data,
distance.bins = NULL,
min.rows.bin = 50,
verbose = FALSE
)
|
interaction.data |
Data table of interaction data, typically from |
distance.bins |
Number of distance bins desired. If NULL, a number is chosen to ensure that the negative binomial can be fit in all bins. |
min.rows.bin |
The minimum number of expected rows in a distance bin. Ignored if distance.bins is set |
verbose |
Logical indicating whether to print progress reports |
Fitting glm.nb
fails when there is a lack of overdispersion in the data. The chicane method
contains logic to catch these errors and instead fit a Poisson model. However, to avoid this happening
more than necessary, an attempt is made to avoid distance splits that will clearly result in numerical errors.
This includes bins of data where the count is the same for all rows,
or a covariate is a perfect predictor of count.
List where each element corresponds to a specified distance bin, and the final one corresponding to trans-interactions (if present)
1 2 | data(bre80);
distance.split(bre80);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.