df.residual.gsl_nls {gslnls} | R Documentation |
Residual degrees-of-freedom
Description
Returns the residual degrees-of-freedom from a fitted "gsl_nls"
object.
Usage
## S3 method for class 'gsl_nls'
df.residual(object, ...)
Arguments
object |
An object inheriting from class |
... |
At present no optional arguments are used. |
Value
Integer residual degrees-of-freedom similar to df.residual
.
See Also
Examples
## data
set.seed(1)
n <- 25
xy <- data.frame(
x = (1:n) / n,
y = 2.5 * exp(-1.5 * (1:n) / n) + rnorm(n, sd = 0.1)
)
## model
obj <- gsl_nls(fn = y ~ A * exp(-lam * x), data = xy, start = c(A = 1, lam = 1))
df.residual(obj)
[Package gslnls version 1.3.2 Index]