anova.gsl_nls | R Documentation |
Returns the analysis of variance (or deviance) tables for two or
more fitted "gsl_nls"
objects.
## S3 method for class 'gsl_nls' anova(object, ...)
object |
An object inheriting from class |
... |
Additional objects inheriting from class |
A data.frame object of class "anova"
similar to anova
representing the
analysis-of-variance table of the fitted model objects when printed.
anova
## data set.seed(1) n <- 50 xy <- data.frame( x = (1:n) / n, y = 2.5 * exp(-1.5 * (1:n) / n) + 1 + rnorm(n, sd = 0.1) ) ## model obj1 <- gsl_nls(fn = y ~ A * exp(-lam * x), data = xy, start = c(A = 1, lam = 1)) obj2 <- gsl_nls(fn = y ~ A * exp(-lam * x) + b, data = xy, start = c(A = 1, lam = 1, b = 0)) anova(obj1, obj2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.