rlin.fit {gasfluxes}R Documentation

Robust linear concentration - time model

Description

Fit a linear model to concentration - time data using robust methods.

Usage

rlin.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 gasfluxes

...

further parameters, currently none

Details

This is basically a wrapper of rlm using the Huber M estimator. This function never weights the first or last time point with zero with very few data points. However, there might exist "better" robust regression methods for flux estimation.

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)

weights

robustness weights

diagnostics

error or warning messages

Examples

#a single fit
t <- c(0, 1/3, 2/3, 1)
C <- c(320, 330, 315, 351)
print(fit <- rlin.fit(t, C, 1, 0.3, "a"))
plot(C ~ t)
curve({fit$f0/0.3 * x + fit$C0}, from = 0, to = 1, add = TRUE)


[Package gasfluxes version 0.6-4 Index]