test_kernel_fits
takes output from wrangle_beetle_data
and runs tests to determine the best-fitting dispersal kernel for all
beetles as a whole, for females independently, and for males
independently. The following kernels are tested: the Poisson distribution
(Poisson
), the negative binomial distribution
(NegBinomial
), the Sichel distribution
(SICHEL
), and the Poisson Inverse Gaussian
distribution (a special case of the Sichel distribution where
ν = -0.5).
1 | test_kernel_fits(clean_data)
|
A list of lists. Each top-level list ($all
, $females
,
or $males
) contains the following objects:
$dist
- A vector of the distances that were measured
for each individual in the data subset.
$x
- A vector of patch distances relevant to the study
(x = 0:40
).
$AIC
- An AIC table ranking each distribution by its
AIC score when fit to the data in $dist
.
$frequency
- The frequency of each distance measured in
$dist, measured over the patches in $x
.
$plot
- A ggplot
object showing
the data in $frequency
along with the best-fit plot of
each candidate distribution.
$<distribution>
- The results of maximum-likelihood
fits of each distribution to the data in $dist, where
<distribution>
is either poisson
, nbinom
,
pig
, or sichel
. The structure of these results
exaclty follows the output from optim
.
For example, to get parameter estimates for fits to the Poisson
distribution, using data from female beetles, use
output$females$poisson$par
.
$<distribution>$fit
- The mass density function for a
given distribution over $x
(i.e., the line drawn in
$plot
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.