simFit {similarityRichards}R Documentation

Similarity of curves: Relative backfitted values for one sample in one experiment

Description

Calculates the relative backfitted values for one sample in one 'experiment', fitted by Richards curves.

Usage

simFit(Smp = NULL, fitSmp = NULL, Ref = NULL, fitRef = NULL, 
       ny = 0, Sample = TRUE, atSample = TRUE, indepName = "ARGX", 
       minlogx = min(log(Smp[, indepName]) / log(g)),
       maxlogx = max(log(Smp[, indepName]) / log(g)), 
       g = exp(1), length.out = 11,
       LogX = seq(minlogx, maxlogx, length.out = length.out),
       FUN = NULL, applyFUN2X = function(X, FUN, ...) FUN(X, ...), ...) 

Arguments

Smp the dataset of the SAMPLE for FUN.
FUN a function estimating the model for the SAMPLE. This function is only called if the argument fitSmp is not given.
fitSmp an optional fit of the SAMPLE.
Ref the dataset of the REFERENCE for FUN. This dataset have only to be given, if not fitRef is not given.
fitRef an optional fit of the REFERENCE.
ny a (optional) numerical value. This value has to given, if ny is not fitted in the model.
Sample a boolean, if TRUE then the SAMPLE curve determins the values of the dependent variable to find backfitted values for, else the REFERENCE.
atSample a boolean, if TRUE then the the 'curves' are 'adjusted to intersect' at 'x50' for the SAMPLE, else at 'x50' for the REFERENCE.
indepName a text string with the name of the independent variable.
minlogx a numeric value with the minimum of the independent value.
maxlogx a numeric value with the maximum of the independent value.
g an optional an optional numeric value, the base of the logarithm.
length.out a integer value, the number of points to find backfitted values of.
LogX an optional numeric vector, the values of the independent variable.
applyFUN2X a function applied to each dataset, retrieving starting value and fixing outliers, and then calling the function FUN to estimate the model for the modified dataset. This function is only called if the arguments fitSmp and fitRef are not given.
... additional arguments.

Details

The relative back fitted values are computed as follow (for the one sample in one experiment):

The dependent variable ('y') is computed by the estimated Richards function for the SAMPLE in points 'x', the exponential of LogX, possible length.out equidistant points from minlogx to maxlogx for the logarithm (with base g) of the independent variable (indepName).

(This is if Sample is TRUE, else the dependent variable is found for the same points by the estimated Richards function for the REFERENCE.)

For each of these values y of the dependent variable the relative backfitted value is then computed as follows:

The two values 'x.sample' and 'x.reference' of the independent variable are found such that the estimated Richards functions have values y, (by the inverse of the Richards functions).

The ratio x.reference by x.sample is then computed.

This ratio is then adjusted by the same ratio at x50 for the SAMPLE at x50 for the REFERENCE if not atSample).

Value

Matrix with relevant values.

Author(s)

Jens Henrik Badsberg


[Package similarityRichards version 0.5.0 Index]