Skip to contents

Plots the data and fitted curve from a litfit object, with the fitted equation. If a bootstrap is supplied, a pointwise percentile band for the curve is added.

Usage

# S3 method for class 'litfit'
plot(x, formulae.cex = 1, boot = NULL, conf.level = 0.95, ...)

Arguments

x

a litfit object from fit_litter

formulae.cex

size of the equation text; use NA to omit the equation

boot

optional litfit_bootstrap object from bootstrap_parameters for the same fit, to draw an uncertainty band

conf.level

confidence level for the band (default 0.95)

...

additional arguments passed to plot.default, which override the defaults (e.g. xlab, ylab, main, pch)

Value

x, invisibly

See also

Author

Will Cornwell

Examples

fit <- fit_litter(
  time = pineneedles$Year, mass.remaining = pineneedles$Mass.remaining,
  model = "weibull", iters = 100, quiet = TRUE
)
plot(fit)


boot <- bootstrap_parameters(fit, nboot = 100)
#> Warning: 1 of 100 bootstrap replicates failed and are recorded as NA
plot(fit, boot = boot, main = "Weibull fit with 95% band")