Non-linear fits of different models to the decomposition trajectory of one cohort (as in typical litterbag studies) data. Models range from very simple (and easy to fit with limited data) to more complex.
Usage
fit_litter(
time,
mass.remaining,
model = c("neg.exp", "weibull", "discrete.parallel", "discrete.series", "cont.quality",
"neg.exp.limit"),
iters = 500,
upper = NULL,
lower = NULL,
quiet = FALSE,
...
)Arguments
- time
time since decomposition began, that is, ti-t0
- mass.remaining
proportional mass remaining, that is, mi/m0. Values above 1 (apparent mass gain, up to 2) or slightly below 0 (down to -0.1) are kept and treated as measurement error, with an informative warning (see Details).
- model
there are six models currently implemented (see below); defaults to
"neg.exp"- iters
Number of random starts for the fitting. Use higher numbers for models with larger numbers of parameters and for models that inherently tend to be less identifiable.
- upper, lower
Optional user specified values for the upper and lower bounds used by
optimin the fitting procedure. Use with care, only minimal sanity checking is currently implemented.- quiet
if
TRUE, suppress the message reporting the number of successful fits- ...
Additional arguments passed to
optim
Value
returns a litfit object with the following elements:
optimFit: a list generated by the
optimfunctionlogLik: the log-likelihood of the model
time: vector of time (same as input)
mass: vector of mass remaining (same as input)
predicted: predicted values from the model for each of the points within time
model: name of the model
nparams: number of fit parameters in the model
AIC: AIC of the model fit
AICc: AICc of the model fit
BIC: BIC of the model fit
and some other potentially useful things
Details
the model likelihood is maximized using methods available in optim. Optimization methods to be used within optim can be specified through the control object (i.e., control$method). The default method is L-BFGS-B with bounds specific to each model. Each model
neg.exp The classic negative exponential model–one parameter (Olson 1963)
weibull The Weibull residence time model–two parameters (Frechet 1927)
discrete.parallel Two pools in parallel with a term for the fraction of initial mass in each pool–three parameter (Manzoni et al. 2012)
discrete.series A three parameter model in which there is the possibility of two sequential pools (Manzoni et al. 2012)
cont.quality (Ågren and Bosatta 1996, see also Manzoni et al. 2012)
neg.exp.limit A negative exponential decaying towards a non-zero asymptote (\(A e^{-kt} + B\))–three parameters
Warning: difficulty in finding the optimal solution is determined by an interaction between the nature and complexity of the likelihood space (which is both data- and model-dependent) as well as the optimization methods. There can never be a guarantee that the optimal solution is found, but using many random starting points will increase these odds. It should be noted that there is significant variation among models in identifiability, with some models inherently less identifiable likely due to a tendency to form for flat ridges in likelihood space. The confidence in the fit should be very low in these cases (see Cornwell and Weedon 2013). A number of random starting points are used in optimization and are given through the iters. The function checks whether the best 5 optimizations have converged on the same likelihood, and if they have not this function will return a warning.
Values outside 0–1: measurement error, especially early in decomposition or when
decomposition is slow, can produce proportional mass remaining values slightly above 1
(i.e. negative mass loss). These values are kept in the fit, since removing or truncating
them would bias the estimates, but fit_litter warns (class
litterfitter_mass_above_one). If the data also show little overall mass loss, the
warning notes that parameters may be poorly constrained and that derived quantities such as
time_to_prop_mass_remaining and steady_state are extrapolations.
Slightly negative values (down to -0.1) are similarly kept with a warning (class
litterfitter_mass_below_zero). Use suppressWarnings(..., classes = ...) to
silence these once checked.
References
Ågren, G. and Bosatta, E. (1996) Quality: a bridge between theory and experiment in soil organic matter studies. Oikos, 76, 522–528.
Cornwell, W. K., and J. T. Weedon. (2013). Decomposition trajectories of diverse litter types: a model selection analysis. Methods in Ecology and Evolution.
Frechet, M. (1927) Sur la loi de probabilite de lecart maximum. Ann de la Soc polonaise de Math, 6, 93–116.
Manzoni, S., Pineiro, G., Jackson, R. B., Jobbagy, E. G., Kim, J. H., & Porporato, A. (2012). Analytical models of soil and litter decomposition: Solutions for mass loss and time-dependent decay rates. Soil Biology and Biochemistry, 50, 66-76.
Olson, J.S. (1963) Energy storage and the balance of producers and decomposers in ecological systems. Ecology, 44, 322–331.
Examples
data(pineneedles)
fit <- fit_litter(
time = pineneedles$Year, mass.remaining = pineneedles$Mass.remaining,
model = "neg.exp", iters = 1000
)
#> Number of successful fits: 1000 out of 1000