.data: A data frame containing plant ecophysiological data. See required_variables() for the variables required for each model.
.photo_fun: A character string of photosynthesis function to call. One of: aq_response, r_light.
.model: A character string of model name to use. See get_all_models().
.vars: A list to rename variables in .data. See required_variables() for the accepted variable names.
.method: 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()
quiet: Flag. Should messages be suppressed? Default is FALSE.
brm_options: A list of options passed to brms::brm() if .method = "brms". Default is NULL.
Returns
A fitted model object
class 'lm' or 'nls' if method = 'ls'
class 'brmsfit' if method = 'brms'
Note
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.