modlist {qpcR}R Documentation

Create nonlinear models from a dataframe and coerce them into a list

Description

Simple function to create a list of nonlinear models from the columns of a qPCR dataframe. Very handy if following functions should be applied to different qPCR models, i.e. by sapply.

Usage

  modlist(x, cyc = 1, fluo = 2:ncol(x), fct = l5(), opt = FALSE, norm = FALSE, ...)

Arguments

x a dataframe containing the qPCR data.
cyc the column containing the cycle numbers, defaults to 1.
fluo the column(s) containing the raw fluorescence data. If not specified, all columns will be used.
fct the function used for building the model, using the function lists from the 'drc' package.
opt logical. Should model optimization take place? If TRUE, model selection is applied.
norm logical. Should the raw data be normalized to within [0, 1] before model fitting?
... other parameters to be passed to mchoice.

Details

For a more detailed description of the functions see i.e. 'l5()'.

Value

A list with each item containing the model from each column. A 'names' attribute containing the column name is attached to each model.

Author(s)

Andrej-Nikolai Spiess

Examples

### calculate efficiencies for each run in
### the 'reps' data
ml <- modlist(reps, fct = l5())
effs <- sapply(ml, function(x) efficiency(x)$eff)
print(effs)

### 'crossing points' for the first 3 runs
### using best model from Akaike weights and normalization
ml <- modlist(reps, fluo = 2:4, fct = l4(), opt = TRUE, norm = TRUE, crit = "weights")
cps <- sapply(ml, function(x) efficiency(x)$cpD2)
print(cps)


[Package qpcR version 1.1-5 Index]