fit_photosynthesis function

Fit photosynthetic models with gas-exchange data

Fit photosynthetic models with gas-exchange data

fit_photosynthesis( .data, .photo_fun, .model = "default", .vars = NULL, .method = "ls", ..., quiet = FALSE, brm_options = NULL )

Arguments

  • .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.

  • Light-response curves: vignette("light-response", package = "photosynthesis")
  • Light respiration: vignette("light-respiration", package = "photosynthesis")
  • Maintainer: Chris Muir
  • License: MIT + file LICENSE
  • Last published: 2024-11-24