Learn R Programming

AgroReg (version 1.2.11)

comparative_model: Analysis: Comparative models

Description

This function allows the construction of a table and/or graph with the statistical parameters to choose the model from the analysis functions.

Usage

comparative_model(models, names_model = NA, plot = FALSE, round.label = 2)

Value

Returns a table and/or graph with the statistical parameters for choosing the model.

Arguments

models

List with objects of type analysis

names_model

Names of the models

plot

Plot in the parameters

round.label

Round label plot

Author

Gabriel Danilo Shimizu

Examples

Run this code
library(AgroReg)
data(granada)
attach(granada)
a=LM(time,WL)
b=LL(time,WL)
c=BC(time,WL)
d=weibull(time,WL)
comparative_model(models=list(a,b,c,d),names_model=c("LM","LL","BC","Weibull"))

models <- c("LM1", "LM4", "L3", "BC4","weibull3","mitscherlich", "linear.plateau", "VG")
r <- lapply(models, function(x) {
r <- with(granada, regression(time, WL, model = x))
})
comparative_model(r,plot = TRUE)

Run the code above in your browser using DataLab