loess_model: Analysis: loess regression

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/loess_function.R

Description

Fit a polynomial surface determined by one or more numerical predictors, using local fitting.

Usage

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

Arguments

trat

Numerical or complex vector with treatments

resp

Numerical vector containing the response of the experiment.

ylab

Variable response name (Accepts the expression() function)

xlab

treatments name (Accepts the expression() function)

theme

ggplot2 theme (default is theme_bw())

error

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

cardinal

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

legend.position

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

scale

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

Value

The function returns the loess regression; optimal and cardinal temperatures and graph using ggplot2.

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

See Also

loess

Examples

1
2
3
4
library(seedreg)
data("aristolochia")
attach(aristolochia)
loess_model(trat,resp)

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