Fit Standards
fitStd.RdFit a specified function to standards (serial dilutions). Optionally an interactive procedure that allows to remove outliers, evaluate resulting fits, perform revisions, and record a message regarding the fit.
Usage
fitStd(
std,
xvar,
yvar,
model = "sigmoid",
Alow = NULL,
asym = TRUE,
interactive = TRUE,
monot.prompt = FALSE,
rm.before = FALSE,
rm.after = interactive,
maxrm = 2,
set.bounds = FALSE,
overwrite.bounds = FALSE,
bg = NULL,
vsmp = NULL,
optmethod = "Nelder-Mead",
maxit = 5000,
extrapolate.low = FALSE,
extrapolate.up = FALSE,
info = "",
ifix = NULL,
tcklab = NULL,
stdcol = c("firebrick3", "darkslategray"),
rugcol = c("cadetblue", "purple", "firebrick2"),
...
)Arguments
- std
matrix or data frame with standards for fitting.
- xvar, yvar
character strings for the variables used to fit a standard curve. If
NULL, first two columns are assumed to bexandyvariables.- model
the model to be fit.
- Alow
lower asymptote for the sigmoid model. If
NULL, the lower asymptote will be estimated, adding an extra parameter to the model. To fix the asymptote at the level of background, specify"bg". Numeric value ofAlowwill force the asymptote to be fixed at the provided level.- asym
if
TRUE, asymmetry in the fit is allowed, adding an extra parameter to the model.- interactive
logical value. If
TRUE, the user is prompted to evaluate the standards (and/or the fit) and asked to remove outliers if needed.TRUEvalue takes precedence overrm.beforeandrm.after: if both areFALSE,rm.afteris reset toTRUE.- monot.prompt
if
TRUE, the user is prompted to evaluate the standards and possibly remove outliers if the standards are not monotonic (increasing).FALSEvalue is ignored ifinteractiveisTRUE.- rm.before
logical value indicating if potential outliers should be removed before the model is fitted. Ignored if
interactiveisFALSE.- rm.after
logical value indicating if potential outliers should be removed after the model is fitted. Ignored if
interactiveisFALSE.- maxrm
maximum number of outliers to remove.
- set.bounds
if
TRUE, the user is given the option to manually set the bound that is not set automatically. In that case, the prompt appears even ifinteractiveisFALSE.- overwrite.bounds
logical value indicating the option to overwrite automatically set bounds. Ignored if
interactiveisFALSE.- bg
values for background spots.
- vsmp
sample values.
- optmethod
method to be used in optimization.
- maxit
maximum number of iterations in optimization.
- extrapolate.low
if
TRUE, sample values beyond lower bounds will be processed by extrapolation of the standard curve (not recommended). Takes precedence overtrim.flatvalue.- extrapolate.up
if
TRUE, sample values beyond upper bounds will be processed by extrapolation of the standard curve (not recommended). Takes precedence overtrim.flatvalue.- info
information about a particular run for warning messages.
- ifix
sorted integer vector of length 3 with indices of standards to be used for getting starting values for optimization.
- tcklab
tick labels for x-axis.
- stdcol
vector of two colors for the standard points and the fit on the plot.
- rugcol
vector of three colors for the rugplot, which indicates sample values (inside the bounds, between the bounds and extrema, and beyond extrema).
- ...
further graphical parameters.