lin.fit {gasfluxes} | R Documentation |
Linear concentration - time model
Description
Fit a linear model to concentration - time data.
Usage
lin.fit(t, C, A = 1, V, serie = "", verbose = TRUE, plot = FALSE, ...)
Arguments
t |
time values (usually in hours) |
C |
concentration values |
A |
area covered by the chamber |
V |
effective volume of the chamber |
serie |
id of the flux measurement |
verbose |
logical, TRUE prints message after each flux calculation |
plot |
logical, mainly intended for use in |
... |
further parameters, currently none |
Details
This is basically a wrapper of R's OLS fitting facilities. For now lm
(and methods for objects of class "lm") is used,
but this may change to more efficient alternatives in later versions.
Value
A list of
f0 |
flux estimate |
f0.se |
standard error of flux estimate |
f0.p |
p-value of flux estimate |
C0 |
estimated concentration at t = 0 (intercept) |
AIC |
Akaike information criterion |
AICc |
Akaike information criterion with small sample correction |
RSE |
residual standard error (sigma from summary.nls) |
r |
Pearson's correlation coefficient |
diagnostics |
error or warning messages |
Examples
#a single fit
t <- c(0, 1/3, 2/3, 1)
C <- c(320, 341, 352, 359)
print(fit <- lin.fit(t, C, 1, 0.3, "a"))
plot(C ~ t)
curve({fit$f0/0.3 * x + fit$C0}, from = 0, to = 1, add = TRUE)