regression {AgroReg}R Documentation

Analysis: Regression linear or nonlinear

Description

This function is a simplification of all the analysis functions present in the package.

Usage

regression(
  trat,
  resp,
  model = "LM1",
  ylab = "Dependent",
  xlab = "Independent",
  theme = theme_classic(),
  legend.position = "top",
  point = "all",
  textsize = 12,
  pointsize = 4.5,
  linesize = 0.8,
  pointshape = 21,
  round = NA,
  fontfamily = "sans",
  error = "SE",
  width.bar = NA,
  xname.formula = "x",
  yname.formula = "y"
)

Arguments

trat

Numeric vector with dependent variable.

resp

Numeric vector with independent variable.

model

model regression (default is LM1)

ylab

Variable response name (Accepts the expression() function)

xlab

treatments name (Accepts the expression() function)

theme

ggplot2 theme (default is theme_classic())

legend.position

legend position (default is c(0.3,0.8))

point

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

textsize

Font size

pointsize

shape size

linesize

line size

pointshape

format point (default is 21)

round

round equation

fontfamily

Font family

error

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

width.bar

Bar width

xname.formula

Name of x in the equation

yname.formula

Name of y in the equation

Details

To change the regression model, change the "model" argument to:

  1. N: Graph for not significant trend.

  2. loess0: Loess non-parametric degree 0

  3. loess1: Loess non-parametric degree 1

  4. loess2: Loess non-parametric degree 2

  5. LM0.5: Quadratic inverse

  6. LM1: Linear regression.

  7. LM2: Quadratic

  8. LM3: Cubic

  9. LM4: Quartic

  10. LM0.5_i: Quadratic inverse without intercept.

  11. LM1_i: Linear without intercept.

  12. LM2_i: Quadratic regression without intercept.

  13. LM3_i: Cubic without intercept.

  14. LM4_i: Quartic without intercept.

  15. LM13: Cubic without beta2

  16. LM13i: Cubic inverse without beta2

  17. LM23: Cubic without beta1

  18. LM23i: Cubic inverse without beta2

  19. LM2i3: Cubic without beta1, with inverse beta3

  20. valcam: Valcam

  21. L3: Three-parameter logistics.

  22. L4: Four-parameter logistics.

  23. L5: Five-parameter logistics.

  24. LL3: Three-parameter log-logistics.

  25. LL4: Four-parameter log-logistics.

  26. LL5: Five-parameter log-logistics.

  27. BC4: Brain-Cousens with four parameter.

  28. BC5: Brain-Cousens with five parameter.

  29. CD4: Cedergreen-Ritz-Streibig with four parameter.

  30. CD5: Cedergreen-Ritz-Streibig with five parameter.

  31. weibull3: Weibull with three parameter.

  32. weibull4: Weibull with four parameter.

  33. GP2: Gompertz with two parameter.

  34. GP3: Gompertz with three parameter.

  35. GP4: Gompertz with four parameter.

  36. VB: Von Bertalanffy

  37. lo3: Lorentz with three parameter

  38. lo4: Lorentz with four parameter

  39. beta: Beta

  40. gaussian3: Analogous to the Gaussian model/Bragg with three parameters.

  41. gaussian4: Analogous to the Gaussian model/Bragg with four parameters.

  42. linear.linear: Linear-linear

  43. linear.plateau: Linear-plateau

  44. quadratic.plateau: Quadratic-plateau

  45. plateau.linear: Plateau-linear

  46. plateau.quadratic: Plateau-Quadratic

  47. log: Logarithmic

  48. log2: Logarithmic quadratic

  49. thompson: Thompson

  50. asymptotic: Exponential

  51. asymptotic_neg: Exponential negative

  52. asymptotic_i: Exponential without intercept.

  53. asymptotic_ineg: Exponential negative without intercept.

  54. biexponential: Biexponential

  55. mitscherlich: Mitscherlich

  56. yieldloss: Yield-loss

  57. hill: Hill

  58. MM2: Michaelis-Menten with two parameter.

  59. MM3: Michaelis-Menten with three parameter.

  60. SH: Steinhart-Hart

  61. page: Page

  62. newton: Newton

  63. potential: Potential

  64. midilli: Midilli

  65. midillim: Modified Midilli

  66. AM: Avhad and Marchetti

  67. peleg: Peleg

  68. VG: Vega-Galvez

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.

Examples

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

[Package AgroReg version 1.2.10 Index]