Learn R Programming

nCal (version 14.11-8)

drm.fit: Fit drm

Description

drm.fit fit concentration-response curves using drm function from drc package.

Usage

drm.fit (formula, data, robust="mean", fit.4pl=FALSE, w=NULL, gof.threshold=.2, 
    verbose=FALSE, bcVal = NULL, bcAdd = 0)

## S3 method for class 'drc':
getVarComponent(object, ...)

Arguments

formula
a formula object.
data
a data frame object.
robust
a string. Passed to drm. See ?drm for more details.
fit.4pl
boolean. If TRUE, 4PL model is fitted. If FALSE, 5PL model is fitted.
gof.threshold
a threshold to determine when to try more self start functions
w
weights
bcVal
numeric, passed to drm
bcAdd
numeric, passed to drm
...
...
verbose
Boolean. If TRUE, verbose messages are printed.
object
a drm object.

Value

  • An object of type drm.

Details

drm.fit differs from drc::drm in several aspects. (1) It tries several self start functions in order to get better fits. (2) It uses gof.threshold to report lack of fit. (3) It tried to determine whether the standard deviation of the parameter estimates can be estimated.

Examples

Run this code
# simulate a dataset
set.seed(1)
log.conc=log(1e4)-log(3)*9:0
n.replicate=2
fi=simulate1curve (p.eotaxin[1,], rep(log.conc,each=n.replicate), sd.e=0.2)
dat.std=data.frame(fi, expected_conc=exp(rep(log.conc,each=n.replicate)), analyte="Test", 
    assay_id="Run 1", sample_id=NA, well_role="Standard", dilution=rep(3**(9:0), each=n.replicate),
    replicate=rep(1:n.replicate, 10))

fit = drm.fit(log(fi) ~ expected_conc, dat = dat.std)
plot(fit, log="xy")
fit

Run the code above in your browser using DataLab