Fits a Collection of Curves to Single-Cohort Decomposition Data

Fit different model forms to single-cohort litter decomposition data (mass remaining through time) using likelihood-based estimation. Models span simple empirical to process-motivated forms with differing numbers of free parameters. Provides parameter estimates, uncertainty, and tools for model comparison/selection. Based on Cornwell & Weedon (2013) .


litterfitter

R package for fitting and testing alternative models for single cohort litter decomposition data

R-CMD-check Codecov testcoverage

Installation

  #install.packages("remotes")
  remotes::install_github("cornwell-lab-unsw/litterfitter")
  
library(litterfitter)

Getting started

At the moment there is one key function which is fit_litter which can fit 6 different types of decomposition trajectories. Note that the fitted object is a litfit object

fit <- fit_litter(time=c(0,1,2,3,4,5,6),
                  mass.remaining =c(1,0.9,1.01,0.4,0.6,0.2,0.01),
                  model="weibull",
                  iters=500)

class(fit)

You can visually compare the fits of different non-linear equations with the plot_multiple_fits function:

plot_multiple_fits(time=c(0,1,2,3,4,5,6),
                   mass.remaining=c(1,0.9,1.01,0.4,0.6,0.2,0.01),
                   model=c("neg.exp","weibull"),
                   iters=500)

Calling plot on a litfit object will show you the data, the curve fit, and even the equation, with the estimated coefficients:

   plot(fit)

The summary of a litfit object will show you some of the summary statistics for the fit.

#> Summary of litFit object
#> Model type: weibull 
#> Number of observations:  7 
#> Parameter fits: 4.19 
#> Parameter fits: 2.47 
#> Time to 50% mass loss: 3.61 
#> Implied steady state litter mass: 3.71 in units of yearly input 
#> AIC:  -3.8883 
#> AICc:  -0.8883 
#> BIC:  -3.9965

From the litfit object you can then see the uncertainty in the parameter estimate by bootstrapping

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("litterfitter")

0.1.4 by Will Cornwell, a year ago


http://traitecoevo.github.io/litterfitter/, https://github.com/traitecoevo/litterfitter


Report a bug at https://github.com/traitecoevo/litterfitter/issues


Browse source code at https://github.com/cran/litterfitter


Authors: Will Cornwell [aut, cre] (ORCID: , James Weedon [aut] , Guofang Liu [ctb]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports stats, graphics, grDevices, methods

Suggests testthat, knitr, roxygen2, devtools, rmarkdown


See at CRAN