fit_growth: Fit raw beetle data to a specified growth function..

Description Usage Arguments Details Value References

Description

This code takes data returned from wrangle_beetle_data, fits a user-specified growth function, plots the resulting curve, and returns relevant parameter values as well as a transformed dataset. fit_growth transforms the data – which has constant female density but variable bean density – to have constant bean density and variable female density.

Usage

1
fit_growth(data, show_plot = TRUE, xmax = 30, model)

Arguments

data

The cleaned and compiled data returned from wrangle_beetle_data.

show_plot

Should the plot be drawn? Default is TRUE.

xmax

The maximum x-axis value for the plot.

model

Which model should be used to fit the growth data? Currenly, either Beverton-Holt or logistic.

Details

The form of the Beverton-Holt equation is taken from Otto and Day (2007):

N(t+1) = R_0 * N(t)/ (1 + α N(t))

The logistic equation uses the discrete-time logistic formula:

N(t+1) = N(t) + N(t)r * (1 - N(t)/K)

Data were originally collected by varying resource density (i.e., number of beans) and keeping female density constant (one female per trial). Thus, fecundity was measured at the following female-to-bean ratios:

1/1, 1/3, 1/5, 1/10

Assuming the relationship that drives density dependence is this ratio of females-to-beans (and not the absolute number of females or beans), we can re-scale these fractions to yield a common denominator (bean density) among all fecundity trials. For female density F and bean density B, the fraction F/B can be re-scaled to have any denominator by multiplying by some proportion equal to 1:

(ρ F)/(ρ B) = F/B

We can choose a proportion ρ such that the observed bean density B is scaled to some desired bean density, B_new:

ρ = (B_new/B) / (B_new/B) = 1

For example, when B_new = 10 and B = 5, ρ = 2/2.

In this analysis B_new = 10, which gives the following female-to-bean ratios at constant resource densities:

10/10, 3.33/10, 2/10, 1/10

Value

A plot of the cleaned data and the fitted growth function, the result of the model fit, parameter estimates for the growth rate, carrying capacity, and any other model parameters, and the transformed data set.

References

Otto and Day (2007). A Biologist's Guide to Mathematical Modeling in Ecology and Evolution. Princeton University Press. Page 185.

Gotelli (2001). A Primer of Ecology, Third Edition. Sinauer Associates, Inc. Page 35.


bochocki/correlatedtraits documentation built on May 20, 2019, 6:46 p.m.