R/fit_photosynthesis.R
fit_photosynthesis.Rd
Fit photosynthetic models with gas-exchange data
fit_photosynthesis(
.data,
.photo_fun,
.model = "default",
.vars = NULL,
.method = "ls",
...,
quiet = FALSE,
brm_options = NULL
)
A data frame containing plant ecophysiological data. See required_variables()
for the variables required for each model.
A character string of photosynthesis function to call. One of: aq_response, r_light
.
A character string of model name to use. See get_all_models()
.
A list to rename variables in .data. See required_variables()
for the accepted variable names.
A character string of the statistical method to use: 'ls' for least-squares and 'brms' for Bayesian model using brms::brm()
. Default is 'ls'.
Additional arguments passed to specific models. See specific help pages for each type of photosynthetic model:
Light-response curves fit_aq_response2()
Light respiration fit_r_light2()
Flag. Should messages be suppressed? Default is FALSE.
A list of options passed to brms::brm()
if .method = "brms"
. Default is NULL.
A fitted model object
class 'lm' or 'nls' if method = 'ls'
class 'brmsfit' if method = 'brms'
This function will fit models to data but several methods require post-processing to extract meaningful parameter estimates and confidence intervals. See vignettes for further explanation and examples.
Light-response curves: vignette("light-response", package = "photosynthesis")
Light respiration: vignette("light-respiration", package = "photosynthesis")