fit_isothermal_growth {biogrowth}R Documentation

Fit primary growth models

Description

[Superseded]

The function fit_isothermal_growth() has been superseded by the top-level function fit_growth(), which provides a unified approach for growth modelling.

Nonetheless, it can still fit a primary growth model to data obtained under static environmental conditions.

Usage

fit_isothermal_growth(
  fit_data,
  model_name,
  starting_point,
  known_pars,
  ...,
  check = TRUE,
  formula = logN ~ time,
  logbase_mu = logbase_logN,
  logbase_logN = 10
)

Arguments

fit_data

Tibble of data for the fit. It must have two columns, one with the elapsed time (time by default) and another one with the decimal logarithm of the populatoin size (logN by default). Different column names can be defined using the formula argument.

model_name

Character defining the primary growth model

starting_point

Named vector of initial values for the model parameters.

known_pars

Named vector of known model parameters (not fitted).

...

Additional arguments passed to modFit().

check

Whether to do some basic checks (TRUE by default).

formula

an object of class "formula" describing the x and y variables. logN ~ time as a default.

logbase_mu

Base of the logarithm the growth rate is referred to. By default, the same as logbase_logN. See vignette about units for details.

logbase_logN

Base of the logarithm for the population size. By default, 10 (i.e. log10). See vignette about units for details.

Value

An instance of FitIsoGrowth().

Examples


## Some dummy data

library(tibble)

my_data <- tibble(time = c(0, 25, 50, 75, 100),
    logN = c(2, 2.5, 7, 8, 8))

## Choose the model

my_model <- "Baranyi"

## Initial values for the model parameters

start = c(logNmax = 8, lambda = 25, logN0 = 2)

## Any model parameter can be fixed

known <- c(mu = .2)

## Now, we can call the function

static_fit <- fit_isothermal_growth(my_data, my_model, start, known)

summary(static_fit)

## We can plot the fitted model against the observations

plot(static_fit)


[Package biogrowth version 1.0.4 Index]