fitModel
is the main fitting function which wraps around the others and
fit iteratively the whole model.
fitParams
fits only the listed parameters and fitParamsSeparately
fit
gene-specific parameters having the shared parameters (e.g. normalisation
factors).
fitNormFactors
fits the normalisation factors having fixed all other
parameters.
fitParams(pulseData, par, namesToOptimise, options) fitParamsSeparately(pulseData, par, knownGenePars, namesToOptimise, options, indexes = seq_len(dim(pulseData$counts)[1])) fitNormFactors(pulseData, par, options) fitModel(pulseData, par, options)
pulseData | the |
---|---|
par | a list with an initial parameters values.
Names correspond to the parameter names used in formulas.
|
namesToOptimise | a vector of names of parameters, which values need be optimised |
options | a list of options. For more details, see setBoundaries, setTolerance, setFittingOptions |
knownGenePars | a vectors of names of the gene-specific parameters, which are assumed to be fixed during optimisation. |
indexes | indexes of genes to fit. By default includes all the genes. |
a list with fitted parameters (only which were optimized)
If no spike-ins are used, relations between samples are inferred
during the model fitting. In this case, the initial parameter list must
containg a field named normFactors
. The normalistion factors are
accepted as a named list, e.g.
par$normFactors <- list(total_fraction = 1, pull_down.4 = c(1, 0.01), pull_down.8 = c(1, 0.01))
This will define the initial values for the normalisation factors. The very first value is always equal 1 irregardless of the user input. This has to be done because the normalisation factors are known only up to some scaling coefficient, because they appear in a multiplication with the expression level or synthesis rate.
The structure of the normFactors
list is identical to the
pulseData$interSampleCoeffs
. This structure is defined by the
formulaIndexes
and conditions
argumenta in the PulseData
,
see PulseData
for more.
fitParamsSeparately
is same as fitParams,
but performs optimisation for gene-specific parameters only.
Every set of parameters is fitted individually for every gene.