Prepare data for model plotting

.MLLMaxBPartialPlotData(
  mll,
  nonLinModelQuoted,
  linModelQuoted,
  targetCovar = "cover",
  fixMaxCover = TRUE,
  maxCover = 1,
  data,
  fun = "mean",
  plotCIs = TRUE
)

Arguments

mll

outputs of an bbmle::mle2 call (the fitted non-linear model), from which coefficient values will be extracted.

nonLinModelQuoted

The non-linear equation as a call (quoted expression) passed to mle2(minuslog1). See ?mle. Accepts equations with three parameters 'A', 'p' and 'k'.

linModelQuoted

A list 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.

targetCovar

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

fixMaxCover

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

maxCover

numeric. Value indicating maximum cover/dominance.

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).

fun

The function to apply when summarizing other variables. By default, the all other variables except age are averaged ("mean"). Other options are: "median", "min", "max".

plotCIs

should confidence intervals be calculated and plotted?

See also