LM_model {seedreg} | R Documentation |
Analysis: Linear regression graph
Description
Linear regression analysis of an experiment with a quantitative factor or isolated effect of a quantitative factor
Usage
LM_model(
trat,
resp,
ylab = "Germination (%)",
error = "SE",
xlab = expression("Temperature ("^"o" * "C)"),
grau = NA,
theme = theme_classic(),
cardinal = 0,
legend.position = "top",
width.bar = NA,
scale = "none",
textsize = 12,
pointsize = 4.5,
linesize = 0.8,
pointshape = 21,
font.family = "sans"
)
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") |
width.bar |
Bar width |
scale |
Sets x scale (default is none, can be "log") |
textsize |
Font size |
pointsize |
shape size |
linesize |
line size |
pointshape |
format point (default is 21) |
font.family |
Font family (default is sans) |
Value
Coefficients
Coefficients and their p values
Optimum temperature
Optimum temperature (equivalent to the maximum point)
Optimum temperature response
Response at the optimal temperature (equivalent to the maximum point)
Minimal temperature
Temperature that has the lowest response
Minimal temperature response
Lowest predicted response
Predicted maximum basal value
Lower basal limit temperature based on the value set by the user (default is 0)
Predicted minimum basal value
Upper basal limit temperature based on the value set by the user (default is 0)
AIC
Akaike information criterion
BIC
Bayesian Inference Criterion
VIF
Variance inflation factor (multicollinearity)
r-squared
Determination coefficient
RMSE
Root mean square error
grafico
Graph in ggplot2 with 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
library(seedreg)
data("aristolochia")
attach(aristolochia)
#================================
# Germination
#================================
LM_model(trat,germ, grau=3)
#================================
# Germination speed
#================================
LM_model(trat, vel, grau=3,
ylab=expression("v"~(dias^-1)))