polynomial: Analysis: Linear regression graph

View source: R/polynomial_function.R

polynomialR Documentation

Analysis: Linear regression graph

Description

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

Usage

polynomial(
  trat,
  resp,
  ylab = "Response",
  xlab = "Independent",
  yname.poly = "y",
  xname.poly = "x",
  grau = NA,
  theme = theme_classic(),
  point = "mean_sd",
  color = "gray80",
  posi = "top",
  textsize = 12,
  se = FALSE,
  ylim = NA,
  family = "sans",
  pointsize = 4.5,
  linesize = 0.8,
  width.bar = NA,
  n = NA,
  SSq = NA,
  DFres = NA
)

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)

xlab

Independent variable name (Accepts the expression() function)

yname.poly

Y name in equation

xname.poly

X name in equation

grau

Degree of the polynomial (1, 2 or 3)

theme

ggplot2 theme (default is theme_classic())

point

Defines whether to plot mean ("mean"), all repetitions ("all"),mean with standard deviation ("mean_sd") or mean with standard error (default - "mean_se").

color

Graph color (default is gray80)

posi

Legend position

textsize

Font size

se

Adds confidence interval (default is FALSE)

ylim

y-axis scale

family

Font family

pointsize

Point size

linesize

line size (Trendline and Error Bar)

width.bar

width of the error bars of a regression graph.

n

Number of decimal places for regression equations

SSq

Sum of squares of the residue

DFres

Residue freedom degrees

Value

Returns linear, quadratic or cubic regression analysis.

Author(s)

Gabriel Danilo Shimizu, shimizu@uel.br

Leandro Simoes Azeredo Goncalves

Rodrigo Yudi Palhaci Marubayashi

See Also

polynomial2, polynomial2_color

Examples

data("phao")
with(phao, polynomial(dose,comp, grau = 2))

AgroR documentation built on May 29, 2024, 4:18 a.m.