Calculate confidence intervals for C4 A-Ci fitting parameters
confidence_intervals_c4_aci.Rd
Calculates confidence intervals for parameters estimated by a C4 A-Ci curve
fit. It is rare for users to call this function directly, because it can be
automatically applied to each curve when calling fit_c4_aci
.
Usage
confidence_intervals_c4_aci(
replicate_exdf,
best_fit_parameters,
lower = list(),
upper = list(),
fit_options = list(),
sd_A = 1,
error_threshold_factor = 0.147,
absorptance = 0.85,
f_spectral = 0.15,
rho = 0.5,
theta = 0.7,
x_etr = 0.4,
ao_column_name = 'ao',
a_column_name = 'A',
gamma_star_column_name = 'gamma_star',
jmax_norm_column_name = 'Jmax_norm',
kc_column_name = 'Kc',
ko_column_name = 'Ko',
kp_column_name = 'Kp',
oxygen_column_name = 'oxygen',
pcm_column_name = 'PCm',
qin_column_name = 'Qin',
rl_norm_column_name = 'RL_norm',
total_pressure_column_name = 'total_pressure',
vcmax_norm_column_name = 'Vcmax_norm',
vpmax_norm_column_name = 'Vpmax_norm',
hard_constraints = 0
)
Arguments
- replicate_exdf
An
exdf
object representing one CO2 response curve.- best_fit_parameters
An
exdf
object representing best-fit parameters for the CO2 response curve inreplicate_exdf
, as calculated byfit_c4_aci
.- lower
The same value that was passed to
fit_c4_aci
when generatingbest_fit_parameters
.- upper
The same value that was passed to
fit_c4_aci
when generatingbest_fit_parameters
.- fit_options
The same value that was passed to
fit_c4_aci
when generatingbest_fit_parameters
.- sd_A
The same value that was passed to
fit_c4_aci
when generatingbest_fit_parameters
.- error_threshold_factor
A multiplicative factor that sets the threshold value of the error function used to define the edges of the confidence intervals; see details below.
- absorptance
The leaf absorptance (dimensionless). See Equation 35 from S. von Caemmerer (2021).
- f_spectral
The spectral quality adjustment factor (dimensionless). See Equation 35 from S. von Caemmerer (2021).
- rho
The fraction of light absorbed by photosystem II rather than photosystem I (dimensionless). See Equation 35 from S. von Caemmerer (2021).
- theta
An empirical curvature factor (dimensionless). See Equation 34 from S. von Caemmerer (2021).
- x_etr
The fraction of whole-chain electron transport occurring in the mesophyll (dimensionless). See Equation 29 from S. von Caemmerer (2021).
- ao_column_name
The name of the column in
replicate_exdf
that contains the dimensionless ratio of solubility and diffusivity of O2 to CO2.- a_column_name
The name of the column in
replicate_exdf
that contains the net assimilation inmicromol m^(-2) s^(-1)
.- gamma_star_column_name
The name of the column in
replicate_exdf
that contains the dimensionlessgamma_star
values.- jmax_norm_column_name
The name of the column in
exdf_obj
that contains the normalizedJmax
values (with units ofnormalized to Jmax at its optimal temperature
).- kc_column_name
The name of the column in
replicate_exdf
that contains the Michaelis-Menten constant for rubisco carboxylation inmicrobar
.- ko_column_name
The name of the column in
replicate_exdf
that contains the Michaelis-Menten constant for rubisco oxygenation inmbar
.- kp_column_name
The name of the column in
replicate_exdf
that contains the Michaelis-Menten constant for PEP carboxylase carboxylation inmicrobar
.- oxygen_column_name
The name of the column in
exdf_obj
that contains the concentration of O2 in the ambient air, expressed as a percentage (commonly 21% or 2%); the units must bepercent
.- pcm_column_name
The name of the column in
replicate_exdf
that contains the partial pressure of CO2 in the mesophyll, expressed inmicrobar
.- qin_column_name
The name of the column in
exdf_obj
that contains values of the incident photosynthetically active flux density inmicromol m^(-2) s^(-1)
.- rl_norm_column_name
The name of the column in
replicate_exdf
that contains the normalizedRL
values (with units ofnormalized to RL at 25 degrees C
).- total_pressure_column_name
The name of the column in
exdf_obj
that contains the total pressure inbar
.- vcmax_norm_column_name
The name of the column in
replicate_exdf
that contains the normalizedVcmax
values (with units ofnormalized to Vcmax at 25 degrees C
).- vpmax_norm_column_name
The name of the column in
replicate_exdf
that contains the normalizedVpmax
values (with units ofnormalized to Vpmax at 25 degrees C
).- hard_constraints
To be passed to
calculate_c4_assimilation
; see that function for more details.
Details
In maximum likelihood fitting, each set of parameter values has an associated
likelihood value. If the maximum likelihood is known, then it is also possible
to define a relative likelihood p
according to p = L / L_max
.
The set of all parameter values where p
exceeds a threshold value
p_0
defines a region in parameter space called like a "relative
likelihood region." When taking one-dimensional cuts through parameter space,
the boundaries of the relative likelihood region define a relative likelihood
interval.
Here we calculate the upper and lower limits of the relative likelihood
intervals for each parameter. This is done by fixing the other parameters to
their best-fit values, and varying a single parameter to find the interval
where the relative likelihood is above the threshold value. If the threshold
p_0
is set to 0.147, then these intervals are equivalent to 95%
confidence intervals in most situations. See the Wikipedia page about
relative likelihood
for more information.
If the upper limit of a confidence interval is found to exceed ten times the upper limit specified when fitting that parameter, then the upper limit of the condfidence interval is taken to be infinity.
Value
An exdf
object based on best_fit_parameters
that contains lower
and upper bounds for each parameter; for example, if Vcmax_at_25
was
fit, best_fit_parameters
will contain new columns called
Vcmax_at_25_lower
and Vcmax_at_25_upper
.
Examples
# Read an example Licor file included in the PhotoGEA package
licor_file <- read_gasex_file(
PhotoGEA_example_file_path('c4_aci_1.xlsx')
)
# Define a new column that uniquely identifies each curve
licor_file[, 'species_plot'] <-
paste(licor_file[, 'species'], '-', licor_file[, 'plot'] )
# Organize the data
licor_file <- organize_response_curve_data(
licor_file,
'species_plot',
c(9, 10, 16),
'CO2_r_sp'
)
# Calculate temperature-dependent values of C4 photosynthetic parameters
licor_file <- calculate_arrhenius(licor_file, c4_arrhenius_von_caemmerer)
licor_file <- calculate_peaked_gaussian(licor_file, c4_peaked_gaussian_von_caemmerer)
# Calculate the total pressure in the Licor chamber
licor_file <- calculate_total_pressure(licor_file)
# Calculate PCm
licor_file <- apply_gm(licor_file, 'C4')
# Fit just one curve from the data set
one_result <- fit_c4_aci(
licor_file[licor_file[, 'species_plot'] == 'maize - 5', , TRUE],
Ca_atmospheric = 420
)
# Calculate confidence limits for the fit parameters
parameters_with_limits <- confidence_intervals_c4_aci(
licor_file[licor_file[, 'species_plot'] == 'maize - 5', , TRUE],
one_result$parameters
)
# View confidence limits and best estimate for Vcmax_at_25
parameters_with_limits[, c('Vcmax_at_25_lower', 'Vcmax_at_25', 'Vcmax_at_25_upper')]
#> Vcmax_at_25_lower Vcmax_at_25 Vcmax_at_25_upper
#> 1 33.38873 33.90721 34.4272