Package 'temperatureresponse'

Title: Temperature Response
Description: Fits temperature response models to rate measurements taken at different temperatures.
Authors: Etienne Low-Decarie [aut, cre]
Maintainer: Etienne Low-Decarie <[email protected]>
License: GPL-3
Version: 0.2
Built: 2024-11-08 03:11:41 UTC
Source: https://github.com/low-decarie/temperatureresponse

Help Index


amend_output

Description

Helper function that add terms to the broom output of fit

Usage

amend_output(output, fit, f_equ, temp, rate, try_test, augment, return_fit)

Arguments

output

broom output of fit

fit

the model output of the fitting process

f_equ

equation with fitted parameters

temp

temperature values of measurements

rate

rate that changes with temperature

try_test

did the model fitting succeed or produce an error?

augment

add columns to the original dataset such as predictions, residuals and cluster assignments using package::broom (T/F)?

return_fit

return the model object (T/F)?

Value

a data frame of, depending on augment argument, if FALSE, parameters, if TRUE, data with predicted values


Temperature response of the growth rate of Emiliania_huxleyi

Description

A data set containing the temperature response of the growth rate of Emiliania_huxleyi

Usage

Emiliania_huxleyi

Format

A data frame with 39 rows and 3 variables:

temp

temperature

rate

growth rate

...

Source

to_be_added


Equation 10

Description

Equation from Thomas et al. (2014)

Usage

equ10(temp, rate, augment = F, return_fit = F)

Arguments

temp

temperature (in Celsius)

rate

rate measurement

augment

logical wether the dataset with fits should be returned instead of the parameter values

return_fit

logical wether the model fit object should be returned

Value

a data frame of, depending on augment argument, if FALSE, parameters, if TRUE, data with predicted values

Examples

#output <- with(Emiliania_huxleyi, equ10(temp=temp, rate=rate))

Equation 11

Description

Equation in Montagnes et al. 2008

Usage

equ11(temp, rate, augment = F, return_fit = F)

Arguments

temp

temperature (in Celsius)

rate

rate measurement

augment

logical wether the dataset with fits should be returned instead of the parameter values

return_fit

logical wether the model fit object should be returned

Value

depends on augment: if false, fitting parameters or fitted data

Examples

output <- with(Emiliania_huxleyi, equ11(temp=temp, rate=rate))

Equation 12

Description

Equation in Montagnes et al (2008) citing Flinn (1991)

Usage

equ12(temp, rate, augment = F, return_fit = F)

Arguments

temp

temperature (in Celsius)

rate

rate measurement

augment

logical wether the dataset with fits should be returned instead of the parameter values

return_fit

logical wether the model fit object should be returned

Value

depends on augment: if false, fitting parameters or fitted data

Examples

output <- with(Emiliania_huxleyi, equ12(temp=temp, rate=rate))

Equation 13

Description

Equation in Ratkowsky et al. (1983)

Usage

equ13(temp, rate, augment = F, return_fit = F)

Arguments

temp

temperature (in Celsius)

rate

rate measurement

augment

logical wether the dataset with fits should be returned instead of the parameter values

return_fit

logical wether the model fit object should be returned

Value

depends on augment: if false, fitting parameters or fitted data

Examples

output <- with(Emiliania_huxleyi, equ14(temp=temp, rate=rate))

Equation 14

Description

Equation from Kamykowski (1985)

Usage

equ14(temp, rate, augment = F, return_fit = F)

Arguments

temp

temperature (in Celsius)

rate

rate measurement

augment

logical wether the dataset with fits should be returned instead of the parameter values

return_fit

logical wether the model fit object should be returned

Value

a data frame of, depending on augment argument, if FALSE, parameters, if TRUE, data with predicted values


Equation 15

Description

New equation (based on sine)

Usage

equ15(temp, rate, augment = F, return_fit = F)

Arguments

temp

temperature (in Celsius)

rate

rate measurement

augment

logical wether the dataset with fits should be returned instead of the parameter values

return_fit

logical wether the model fit object should be returned

Value

a data frame of, depending on augment argument, if FALSE, parameters, if TRUE, data with predicted values

Examples

output <- with(Emiliania_huxleyi, equ15(temp=temp, rate=rate))

Equation 16

Description

Equation from "A Key Marine Diazotroph in a Changing Ocean: The Interacting Effects of Temperature, CO2 and Light on the Growth of Trichodesmium erythraeum IMS101". Challenging to fit to many datasets. Does not fit to example dataset.

Usage

equ16(temp, rate, augment = F, return_fit = F)

Arguments

temp

temperature (in Celsius)

rate

rate measurement

augment

logical wether the dataset with fits should be returned instead of the parameter values

return_fit

logical wether the model fit object should be returned

Value

a data frame of, depending on augment argument, if FALSE, parameters, if TRUE, data with predicted values

Examples

output <- with(Emiliania_huxleyi, equ16(temp=temp, rate=rate))

Equation 4

Description

Equation 4 is model H in Li & Dickie (1987) citing Hinshelwood (1947)

Usage

equ4(temp, rate, augment = F, return_fit = F)

Arguments

temp

temperature (in Celsius)

rate

rate measurement

augment

logical wether the dataset with fits should be returned instead of the parameter values

return_fit

logical wether the model fit object should be returned

Value

a data frame of, depending on augment argument, if FALSE, parameters, if TRUE, data with predicted values

Examples

output <- with(Emiliania_huxleyi, equ4(temp=temp, rate=rate))

Equation 5

Description

Equation 5 is model J from Li & Dickie (1987) citing Johnson et al. (1942) Does not currently work

Usage

equ5(temp, rate, augment = F, return_fit = F)

Arguments

temp

temperature (in Celsius)

rate

rate measurement

augment

logical wether the dataset with fits should be returned instead of the parameter values

return_fit

logical wether the model fit object should be returned

Value

a data frame of, depending on augment argument, if FALSE, parameters, if TRUE, data with predicted values

Examples

output <- with(Emiliania_huxleyi, equ5(temp=temp, rate=rate))

Equation 6

Description

Equation 6

Usage

equ6(temp, rate, augment = F, return_fit = F)

Arguments

temp

temperature (in Celsius)

rate

rate measurement

augment

logical wether the dataset with fits should be returned instead of the parameter values

return_fit

logical wether the model fit object should be returned

Value

a data frame of, depending on augment argument, if FALSE, parameters, if TRUE, data with predicted values

Examples

output <- with(Emiliania_huxleyi, equ6(temp=temp, rate=rate))

Equation 7

Description

Equation 7 from Montagnes et al (2008) citing Schoolfield et al. (1981)

Usage

equ7(temp, rate, augment = F, return_fit = F)

Arguments

temp

temperature (in Celsius)

rate

rate measurement

augment

logical wether the dataset with fits should be returned instead of the parameter values

return_fit

logical wether the model fit object should be returned

Value

a data frame of, depending on augment argument, if FALSE, parameters, if TRUE, data with predicted values

Examples

output <- with(Emiliania_huxleyi, equ7(temp=temp, rate=rate))

Equation 8

Description

Equation in Li & Dickie (1987) citing Stoermer & Ladewski (1976): a*exp(-0.5*((temp-tref)/b)^2)

Usage

equ8(temp, rate, augment = F, plot_profile = F, return_fit = F)

Arguments

temp

temperature (in celsius or Kelvin)

rate

rate measurement

augment

logical wether the dataset with fits should be returned instead of the parameter values

plot_profile

logical should the model fitting profile be plotted

return_fit

logical wether the model fit object should be returned

Value

depends on augment: if false, fitting parameters or fitted data

Examples

output <- with(Emiliania_huxleyi, equ8(temp=temp, rate=rate))

Equation 9

Description

Equation from Montagnes et al. 2008

Usage

equ9(temp, rate, augment = F, return_fit = F)

Arguments

temp

temperature (in Celsius)

rate

rate measurement

augment

logical wether the dataset with fits should be returned instead of the parameter values

return_fit

logical wether the model fit object should be returned

Value

a data frame of, depending on augment argument, if FALSE, parameters, if TRUE, data with predicted values

Examples

output <- with(Emiliania_huxleyi, equ9(temp=temp, rate=rate))

Fit model list

Description

Fits list of models (all models in package by default)

Usage

fitmodellist(temp, rate, augment = F, return_fit = F,
  models = paste0("equ", 4:15))

Arguments

temp

temperature (in Celsius)

rate

rate measurement (for example growth rate, but could also be abundance)

augment

logical wether the dataset with fits should be returned instead of the parameter values

return_fit

logical should the model object be returned

models

list of strings of equations to be fit such as paste0("equ",4:15)

Value

a data frame of, depending on augment argument, if FALSE, parameters, if TRUE, data with predicted values

Examples

output <- with(Emiliania_huxleyi, fitmodellist(temp=temp, rate=rate))