fitStd: Fit Standards

Description Usage Arguments Details Value

View source: R/fitStd.R

Description

Fits a specified function to MFI summary of serial dilutions. Optionally an interactive procedure that allows to remove outliers, evaluate resulting fits, perform revisions, and record a message regarding the fit.

Usage

1
2
3
4
5
6
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, smp = NULL,
  optmethod = "Nelder-Mead", maxit = 5000, info = "", ifix = NULL,
  rugcols, ptcol, ...)

Arguments

std

data frame of standard dilutions

xvar

character strings for the variables used to fit a standard curve.

yvar

character strings for the variables used to fit a standard curve.

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 of Alow will 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. TRUE value takes precedence over rm.before and rm.after: if both are FALSE, rm.after is reset to TRUE.

monot.prompt

if TRUE, the user is prompted to evaluate the standards and possibly remove outliers if the standards are not monotonic (increasing). FALSE value is ignored if interactive is TRUE.

rm.before

logical value indicating if potential outliers should be removed before the model is fitted. Ignored if interactive is FALSE.

rm.after

logical value indicating if potential outliers should be removed after the model is fitted. Ignored if interactive is FALSE.

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 if interactive is FALSE.

overwrite.bounds

logical value indicating the option to overwrite automatically set bounds. Ignored if interactive is FALSE.

bg

background values

smp

sample values

optmethod

method to be used in optimization.

maxit

maximum number of iterations in optimization.

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.

rugcols

vector of three colors for the rugplot, which indicates sample values (inside the bounds, between the bounds and extrema, and beyond extrema).

ptcol

color of the standard points on the plot.

...

further graphical parameters.

Details

to be added

Value

A list containing parameters of the fit and bounds of the fit (named vectors), as well as indices of removed points (if any) and flags r.


Greenhouse-Lab/lumfit documentation built on July 20, 2020, 8 p.m.