plot.sapwood_fit: Plot method for sapwood models

View source: R/sapwood_utils.R

plot.sapwood_fitR Documentation

Plot method for sapwood models

Description

Visualize sapwood model.

Usage

## S3 method for class 'sapwood_fit'
plot(
  object,
  type = "fit",
  xlim = NULL,
  ylim = NULL,
  prediction = T,
  confidence = F
)

Arguments

object

an object of class "sapwood_fit", a result from a call to sapwood_fit_l, sapwood_fit_pl or sapwood_fit_plw.

type

Type of plot. Possible types are:

  • "fit"Plots sapwood rings versus heartwood rings and the best fit, including prediction and/or confidence intervals for the median (if wanted). Not available for an object of type "parabolic_linear_W' (result from sapwood_fit_plw)

  • "residual"Plots standardized residuals on log scale of the model as well as dotted lines for z_0.025 and z_0.975

  • "qq"Plots a QQ plot of the standardized residuals

xlim, ylim

Limits of the axes of the plot. Given as a vector similar to c(0,100). xlim defaults to the range from 0 to the maximum value of heartwood in the data (with some padding). ylim defaults to 0 to the maximum value of predicted data with some padding.

prediction

If TRUE, prediction bands are plotted on the plot. Only used for type = "fit".

confidence

If TRUE, confidence bands to the median are plotted to the plot. Only used for type = "fit".

Examples

data(smaland)
fit <- sapwood_fit_pl(S~H, smaland)
plot(fit, xlim=c(0,220), ylim=c(0,150))
plot(fit)
plot(fit, type="residual")
plot(fit, type="qq")

karirogg/ScotsPine documentation built on Nov. 22, 2022, 5:55 a.m.