regressFluxExp: regressFluxExp

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/fluxEstimates.R

Description

Estimate the initial flux by fitting an exponentially saturating function

Usage

1
2
regressFluxExp(conc, times, start = c(), tryAutoCorr = TRUE, 
    cSatFac = 1.5)

Arguments

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

tryAutoCorr

set to FALSE to not try to fit model with autocorrelation

cSatFac

Position of the initial saturation (0 start, 1 end, >1 outside measured range)

Details

The flux is calculated as the slope of the concentration change. By changing the concentration gradient, however, the flux is disturbed. In effect the flux will decline over time and concentrations go towards a saturation.

This method fits a polynomial regression to the concentrations and infers the slope at reports the slope at the initial time. Make sure to remove lag time period before.

Other functional forms can be fitted to estimate the initial slope:

The hyperbolic tangent form (regressFluxTanh) has the advantage that initially the flux is changing only very slowly. In contrast, whith the exponential form the slope changes much at the beginning.

The exponential form, is more consistent with a theoretical model of saturating flux (Kutzbach 2006).

Value

stat

numeric vector with 4 entries: flux, sdFlux, AIC, and autoCorr:

flux

flux estimate at starting time

sdFlux

standard deviation of flux

AIC

model fit diagnostics

autoCorr

coefficient of autocorrelation or NA if model with autocorrelation could not be fitted or had higher AIC than model without autocorrelation

times

used predictor vector, can be used for return for plotting

model

the model-fit object (here of class gnls)

Author(s)

Thomas Wutzler, Oscar Perez Priego

See Also

RespChamberProc

Examples

1
2
3
4
5
6
7
8
#data(chamberLoggerEx1s)
ds <- chamberLoggerEx1s
conc <- ds$CO2_dry <- corrConcDilution(ds)  
times <- ds$TIMESTAMP
#trace(regressFluxExp, recover)	#untrace(regressFluxExp)
(res <- regressFluxExp( conc, times  ))
plot( conc ~ times)
lines( fitted(res$model) ~ times )

RespChamberProc documentation built on May 2, 2019, 5:53 p.m.