regressFluxLinear: regressFluxLinear

View source: R/fluxEstimates.R

regressFluxLinearR Documentation

regressFluxLinear

Description

Estimate the initial flux by linear regression

Usage

regressFluxLinear(conc, times, start = c(), 
    tryAutoCorr = TRUE)

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

Value

list with entries

stat

numeric vector (2) with 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 gls)

Author(s)

Thomas Wutzler, Oscar Perez Priego

See Also

regressFluxExp

RespChamberProc

Examples

#data(chamberLoggerEx1s)
ds <- chamberLoggerEx1s
conc <- ds$CO2_Avg
times <- ds$TIMESTAMP
plot( conc ~ times )
regressFluxLinear( conc, times  )

bgctw/RespChamberProc documentation built on Jan. 4, 2024, 6:12 a.m.