LM_model: Analysis: Linear regression graph

Description Usage Arguments Value Note Author(s) Examples

View source: R/LM_function.R

Description

Linear regression analysis of an experiment with a quantitative factor or isolated effect of a quantitative factor

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
LM_model(
  trat,
  resp,
  ylab = "Germination (%)",
  error = "SE",
  xlab = expression("Temperature ("^"o" * "C)"),
  grau = NA,
  theme = theme_classic(),
  cardinal = 0,
  legend.position = "top",
  scale = "none"
)

Arguments

trat

Numerical vector with treatments (Declare as numeric)

resp

Numerical vector containing the response of the experiment.

ylab

Dependent variable name (Accepts the expression() function)

error

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

xlab

Independent variable name (Accepts the expression() function)

grau

degree of the polynomial (1,2 or 3)

theme

ggplot2 theme (default is theme_classic())

cardinal

defines the value of y considered extreme (default considers 0 germination)

legend.position

legend position (default is "top")

scale

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

Value

The function returns the coefficients and respective p-values; statistical parameters such as AIC, BIC, R2, VIF; cardinal and optimal temperature and the graph using ggplot2 with the equation.

Note

if the maximum predicted value is equal to the maximum x, the curve does not have a maximum point within the studied range. If the minimum value is less than the lowest point studied, disregard the value.

Author(s)

Gabriel Danilo Shimizu

Leandro Simoes Azeredo Goncalves

Examples

1
2
3
4
library(seedreg)
data("aristolochia")
attach(aristolochia)
LM_model(trat,resp, grau = 3)

AgronomiaR/seedreg documentation built on May 19, 2021, 12:12 p.m.