inst/doc/case-study-snowgum.R

## ----include=FALSE------------------------------------------------------------
knitr::opts_chunk$set(collapse = TRUE, comment = "#>", fig.width = 7,
                      fig.height = 4.5, dpi = 96)

## ----setup--------------------------------------------------------------------
library(freqTLS)
data(snowgum_psii)

## ----data---------------------------------------------------------------------
leaf_std <- standardize_data(
  snowgum_psii,
  temp = "Temp", duration = "Time", proportion = "fvfm_prop",
  duration_unit = "minutes"
)
table(snowgum_psii$recovery)

## ----fit----------------------------------------------------------------------
leaf_fit <- fit_4pl(
  leaf_std,
  ctmax = ~ 0 + recovery + (1 | plant),
  z = ~ 0 + recovery,
  low = ~ 1,
  up = ~ 1,
  k = ~ 1,
  family = "beta",
  t_ref = 60,
  method = "wald",
  quiet = TRUE
)
diagnose_tdt_fit(leaf_fit)

## ----quantities---------------------------------------------------------------
leaf_tls <- tls(leaf_fit, by = "recovery", lethal = FALSE, method = "wald")
leaf_table <- leaf_tls$summary
names(leaf_table)[names(leaf_table) == "median"] <- "estimate"
leaf_table

## ----eye, fig.alt="Independently scaled Wald Confidence Eyes for Snow-gum CTmax and z after Dark and Light recovery, shown as outlined lenses with hollow estimates."----
plot_confidence_eye(leaf_fit, parm = c("CTmax", "z"), method = "wald")

Try the freqTLS package in your browser

Any scripts or data that you put into this service are public.

freqTLS documentation built on Dec. 4, 2026, 5:11 p.m.