View source: R/fluxEstimates.R
regressFluxTanh | R Documentation |
Estimate the initial flux by fitting a hyperbolic tangent saturating function
regressFluxTanh(conc, times, start = c(),
cSatFac = 2, tryAutoCorr = TRUE)
conc |
numeric vector of CO2 concentrations [] |
times |
times of conc measurements [seconds] |
start |
numeric vector of starting parameters. May provide from last bootstrap to speed up fitting |
cSatFac |
Position of the initial estimate of saturation (0 start, 1 end, >1 outside measured range) |
tryAutoCorr |
set to FALSE to not try to fit model with autocorrelation |
For efficiency reasons, does not check for missing values (NA). The caller must provide conc and times all finite.
Thomas Wutzler, Oscar Perez Priego
regressFluxExp
RespChamberProc
#data(chamberLoggerEx1s)
ds <- chamberLoggerEx1s[-(1:16),]
conc <- ds$CO2_dry <- corrConcDilution(ds)
times <- ds$TIMESTAMP
times0 <- as.numeric(times) - as.numeric(times[1])
#trace(regressFluxTanh, recover) #untrace(regressFluxTanh)
(res <- regressFluxTanh( conc, times ))
plot( conc ~ times)
lines( fitted(res$model) ~ times )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.