mkFunction4RatioFit {CalciOMatic}R Documentation

Function for Ratiometric Fit with the nls function

Description

The function mkFunction4RatioFit returns a function prediciting the exponential time course of an intracellular concentration. The function, the arguments of which depend on the value of type, can be used within the RSS function of a ratiometric fit.

Usage

mkFunction4RatioFit(type = "mono")

Arguments

type a character string (either "mono" or "bi"), specifying which type of exponential decay should be considered

Value

A function that has five or seven arguments, depending on the value of type. If type is set to "mono", the five arguments are the following: t, tOn, log_Ca0, log_dCa and log_tau. If type is set to "bi", the output function has two more arguments: mu and log_dtau. For details about the meaning of each argument, see the caMonoExp or caBiExp functions

Author(s)

Sebastien Joucla sebastien.joucla@parisdescartes.fr

See Also

caMonoExp, caBiExp, ratioFitFromCa, ratioFitFromDf

Examples

## Time parameters
tOn <- 1
Time <- seq(0,30,0.1)
Ca0 <- 0.10
dCa <- 0.25
tau <- 1.5
mu <- 2
dtau <- 10

## Define a calcium biexponential decay with the
## mkCa_MonoBiExp_4_RatioFit function
Ca_biexp_fct <- mkFunction4RatioFit(type = "bi")

Ca_biexp_decay1 <- Ca_biexp_fct(t = Time, tOn = tOn,
                                log_Ca0 = log(Ca0),
                                log_dCa = log(dCa),
                                log_tau = log(tau),
                                mu = mu,
                                log_dtau = log(dtau))

## Define a calcium biexponential decay with the
## caBiExp function
Ca_biexp_decay2 <- caBiExp(t = Time, tOn = tOn, Ca0 = Ca0,
                           dCa = dCa, tau = tau,
                           fact = 1/(1+exp(-mu)), dtau = dtau)

## Check that both decays are similar
plot(Time, Ca_biexp_decay1, type="l", lwd=2)
lines(Time, Ca_biexp_decay2, col="red", lty=2, lwd=2)

[Package CalciOMatic version 1.1-3 Index]