SSnrh: self start for non-rectangular hyperbola (photosynthesis)

SSnrhR Documentation

self start for non-rectangular hyperbola (photosynthesis)

Description

Self starter for Non-rectangular Hyperbola with parameters: asymptote, quantum efficiency, curvature and dark respiration

Usage

nrh(x, asym, phi, theta, rd)

SSnrh(x, asym, phi, theta, rd)

Arguments

x

input vector (x) which is normally light intensity (PPFD, Photosynthetic Photon Flux Density).

asym

asymptotic value for photosynthesis

phi

quantum efficiency (mol CO2 per mol of photons) or initial slope of the light response

theta

curvature parameter for smooth transition between limitations

rd

dark respiration or value of CO2 uptake at zero light levels

Details

This function is described in Archontoulis and Miguez (2015) - (doi:10.2134/agronj2012.0506).

Value

a numeric vector of the same length as x (time) containing parameter estimates for equation specified

nrh: vector of the same length as x (time) using the non-rectangular hyperbola

Examples


require(ggplot2)
set.seed(1234)
x <- seq(0, 2000, 100)
y <- nrh(x, 35, 0.04, 0.83, 2) + rnorm(length(x), 0, 0.5)
dat <- data.frame(x = x, y = y)
fit <- nls(y ~ SSnrh(x, asym, phi, theta, rd), data = dat)
## Visualize observed and simulated
ggplot(data = dat, aes(x = x, y = y)) + 
  geom_point() + 
  geom_line(aes(y = fitted(fit)))
## Testing predict function
prd <- predict_nls(fit, interval = "confidence")
datA <- cbind(dat, prd)
## Plotting
ggplot(data = datA, aes(x = x, y = y)) + 
  geom_point() + 
  geom_line(aes(y = fitted(fit))) + 
  geom_ribbon(aes(ymin = Q2.5, ymax = Q97.5), 
  fill = "purple", alpha = 0.3)

x <- seq(0, 2000)
y <- nrh(x, 30, 0.04, 0.85, 2)
plot(x, y)

nlraa documentation built on May 29, 2024, 2:01 a.m.