BC: Analysis: Brain-Cousens

View source: R/BC_analysis.R

BCR Documentation

Analysis: Brain-Cousens

Description

The 'BC.4' and 'BC.5' logistical models provide Brain-Cousens' modified logistical models to describe u-shaped hormesis. This model was extracted from the 'drc' package.

Usage

BC(
  trat,
  resp,
  npar = "BC.4",
  sample.curve = 1000,
  ylab = "Dependent",
  xlab = "Independent",
  theme = theme_classic(),
  legend.position = "top",
  r2 = "all",
  ic = FALSE,
  fill.ic = "gray70",
  alpha.ic = 0.5,
  error = "SE",
  point = "all",
  width.bar = NA,
  scale = "none",
  textsize = 12,
  pointsize = 4.5,
  linesize = 0.8,
  linetype = 1,
  pointshape = 21,
  fillshape = "gray",
  colorline = "black",
  round = NA,
  xname.formula = "x",
  yname.formula = "y",
  comment = NA,
  fontfamily = "sans"
)

Arguments

trat

Numeric vector with dependent variable.

resp

Numeric vector with independent variable.

npar

Number of model parameters (default is BC.4)

sample.curve

Provide the number of observations to simulate curvature (default is 1000)

ylab

Variable response name (Accepts the expression() function)

xlab

Treatments name (Accepts the expression() function)

theme

ggplot2 theme (default is theme_bw())

legend.position

Legend position (default is "top")

r2

Coefficient of determination of the mean or all values (default is all)

ic

Add interval of confidence

fill.ic

Color interval of confidence

alpha.ic

confidence interval transparency level

error

Error bar (It can be SE - default, SD or FALSE)

point

Defines whether you want to plot all points ("all") or only the mean ("mean")

width.bar

Bar width

scale

Sets x scale (default is none, can be "log")

textsize

Font size

pointsize

Shape size

linesize

Line size

linetype

line type

pointshape

Format point (default is 21)

fillshape

Fill shape

colorline

Color lines

round

round equation

xname.formula

Name of x in the equation

yname.formula

Name of y in the equation

comment

Add text after equation

fontfamily

Font family

Details

The model function for the Brain-Cousens model (Brain and Cousens, 1989) is

y = c + \frac{d-c+fx}{1+\exp(b(\log(x)-\log(e)))}

and it is a five-parameter model, obtained by extending the four-parameter log-logistic model (LL.4 to take into account inverse u-shaped hormesis effects. Fixing the lower limit at 0 yields the four-parameter model

y = 0 + \frac{d-0+fx}{1+\exp(b(\log(x)-\log(e)))}

used by van Ewijk and Hoekstra (1993).

Value

The function returns a list containing the coefficients and their respective values of p; statistical parameters such as AIC, BIC, pseudo-R2, RMSE (root mean square error); largest and smallest estimated value and the graph using ggplot2 with the equation automatically.

Author(s)

Model imported from the drc package (Ritz et al., 2016)

Gabriel Danilo Shimizu

Leandro Simoes Azeredo Goncalves

References

Seber, G. A. F. and Wild, C. J (1989) Nonlinear Regression, New York: Wiley & Sons (p. 330).

Ritz, C.; Strebig, J.C. and Ritz, M.C. Package ‘drc’. Creative Commons: Mountain View, CA, USA, 2016.

See Also

LL, CD,GP

Examples

library(AgroReg)
data("aristolochia")
attach(aristolochia)
BC(trat,resp)

AgroReg documentation built on May 29, 2024, 9:13 a.m.