calculate_regr_coeffs | R Documentation |
Calculate slopes of the linear regression of proportion of ants on time. The
proportion for each time point and colony is sampled from the distribution
returned by the get_prob_mass
function.
calculate_regr_coeffs(
time_series_results,
colony_stats,
randomize = FALSE,
sample_size = 10000
)
colony_stats |
A dataset containing numeric parameters describing colony state and
experiment preparation;retrieved by |
randomize |
A logical indicating whether slopes should be calculated using permuted data, see below. |
sample_size |
A numeric indicating the number of samples taken from the distribution of the possible proportion of ants from the upper part of the nest among all ants being active outside the nest, see below. |
time_series_result |
A dataset with the results of the ant removal experiment;
retrieved by |
This function uses get_prob_mass
function on experiment data provided in the
time_series_results
and colony_stats
datasets to calculate the probability distribution
of the proportion of ants captured outside the nest which come from the upper
part of the nest. The inference is based on the numbers of marked ants among all
captured individuals with marking label indicating the nest segment (upper or lower).
The probability distributions, obtained separately for each colony and time point,
is sampled many times, producing multiple data vectors for linear regression. These
vectors can additionally be permuted to have the null distribution of regression
slopes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.