# crm.fit: Fit Concentration Response Model In nCal: Nonlinear Calibration

## Description

crm.fit can fit a constant or power variance function or log transform both sides.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```crm.fit (formula, data, fit.4pl=FALSE, var.model=c("constant","power"), robust="mean", method=c("gls-pl","gnls","mle"), max.iter=50, reltol=1e-3, gof.threshold=0.2, log.both.sides=FALSE, verbose=FALSE) ## S3 method for class 'crm' deviance(object, ...) ## S3 method for class 'crm' print(x, ..., digits=3) ## S3 method for class 'crm' lines(x, ...) ## S3 method for class 'crm' coef(object, parameterization=c("cla","gh","ed50b","edb50"), ...) ```

## Arguments

 `formula` `data` `fit.4pl` Boolean `var.model` string `robust` string `method` string `max.iter` number `digits` number `reltol` numeric `gof.threshold` numeric `verbose` Boolean `log.both.sides` Boolean, log transform both sides `object, x` crm object `parameterization` string, output parameterization `...` additional argument

## Details

crm.fit implements an iterative method for estimating a model with power variance. method: gls-pl means GLS-PL (see reference) log.both.sides: transform both sides (see reference)

## Value

An object of crm and drm type.

 `var.power` estimated power parameter in the power variance function

## References

Fong, Y., Yu, X. (2014) Transformation Model Choice in Nonlinear Regression Analysis of Serial Dilution Assays, submitted

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19``` ```## Not run: dat.std=dat.QIL3[dat.QIL3\$assay_id=="LMX001",] # run 3 iter to save time for examples fit.1=crm.fit(fi~expected_conc, dat.std, var.model="power", verbose=TRUE, max.iter=2) fit.2=crm.fit(log(fi)~expected_conc, dat.std, verbose=TRUE) fit.3=crm.fit(log(fi)~expected_conc, dat.std, var.model="power", verbose=TRUE, max.iter=2) sapply(list(fit.1, fit.2, fit.3), coef) fit.1\$var.power fit.2\$var.power fit.3\$var.power plot(fit.1, log="xy", type="all", lwd=3, pch="*") lines(fit.2, expy=TRUE, col=2, lwd=3) lines(fit.3, expy=TRUE, col=4, lty=2, lwd=3) ## End(Not run) ```

nCal documentation built on Dec. 3, 2017, 5:04 p.m.