Plots the maximum biomass estimates along an age gradient as a function of another target covariate, with all others held at average values.

partialggplotMLL_maxB(
  mll,
  data,
  targetCovar = "cover",
  maxCover = 1,
  fixMaxCover = TRUE,
  xCovar = "age",
  showQuantiles = "allQuantiles",
  plotTitle = NULL,
  nonLinModelQuoted,
  linModelQuoted,
  fun = "mean",
  plotCIs = TRUE
)

Arguments

mll

a named list with outputs of an bbmle::mle2 call (the fitted non-linear model), from which coefficient values will be extracted. If several model outputs are provided all fitted models will be plotted, with plot labels corresponding to list names.

data

data for estimation of maximum biomass. Should contain at least an 'age' column. Note that other covariates will be averaged and 'cover' values will be replaced with the maximum cover value (maxCover). If mll is a list, data is assumed to be the same for the two models.

targetCovar

the covariate for which variation in maxB values will be shown per age value. Defaults to showing how maxB values change with "cover" at any given age. Age values are generated as round(seq(min(age), max(age)*1.5, length.out = 100), 0). When targetCovar != "cover", "cover" may be fixed at maxCover. See fixMaxCover.

maxCover

numeric. Value indicating maximum cover/dominance.

fixMaxCover

logical. If TRUE and targetCovar != "cover", cover is not averaged and is fixed to maxCover.

xCovar

the variable shown in the x axis. Defaults to "age". When xCovar == "age" the output plots are not true "Partial Effects" plots. Instead, they show the variation is B values across values of targetCovar for each value of age.

showQuantiles

controls whether quantile predictions will be shown. If "allQuantiles", quantile values (5%, 25%, 50%, 75%, 95%) of B will be plotted as blue lines, with their respective asymptote values (quantile values at maximum age) as dashed lines. If "maximum" the 100% quantile will be plotted. If "none", only the 50% quantile line (average prediction) is plotted. Quantiles are always calculated at max(age).

plotTitle

character. Passed to title in ggplot2::labs()

nonLinModelQuoted

a named list of non-linear equations as a call (quoted expression) passed to mle2(minuslog1). See ?mle. Accepts equations with three parameters 'A', 'p' and 'k'. List names and length must the same as in mll.

linModelQuoted

A named list of lists of linear equations/modes relating each parameter ('A', 'p' and 'k') with a set of covariates. A call (quoted expression) passed to mle2(..., parameters). Note that for the purpose of tree growth, the linear equation determining 'A' should include a 'cover' predictor indicating the tree cover or dominance in the stand. Should be scaled between 0 and maxCover. List names and length must the same as in mll.

fun

passed to .MLLMaxBPartialPlotData.

plotCIs

should confidence intervals be calculated and plotted?

Details

Note that the original data, not the predicted values is shown.

See also