Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fit_isothermal_growth

Fit primary growth models


Description

Fits 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
)

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.

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)

biogrowth

Modelling of Population Growth

v0.2.0
GPL-3
Authors
Alberto Garre [aut, cre] (<https://orcid.org/0000-0002-4404-3550>), Jeroen Koomen [aut], Heidy den Besten [aut], Marcel Zwietering [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.