Plot multiple fits on one graph with model selection results displayed
Source:R/output-fxns.R
plot_multiple_fits.Rd
Plot multiple fits of decomposition trajectories on one graph with model selection results displayed
Arguments
- time
vector of time points
- mass.remaining
vector of mass remaining
- model
vector of models to fit and plot (see
fit_litter
)- color
a vector of colors the same length as the number of models
- iters
parameter passed to
fit_litter
- bty
bty
- ...
additional parameters passed to
plot
Details
this function is designed to compare a variety of curve shapes visually and with AIC and BIC simultaneously
Examples
data(pineneedles,package='litterfitter')
plot_multiple_fits(time = pineneedles$Year,
mass.remaining = pineneedles$Mass.remaining,
bty = 'n', model = c('neg.exp', 'weibull'),
xlab = 'Time', ylab = 'Proportion mass remaining',iters=200)
#> Number of successful fits: 199 out of 200
#> Number of successful fits: 200 out of 200
#> Warning: May not have found global best fit; increase iterations