quantchem (version 0.13)

lmcal, nlscal: Perform linear and nonlinear calibration of analytical method

Description

Fit given calibration data to several regression models.

Usage

lmcal(x, y, confint = 0.95, gridratio = 0.05) nlscal(x, y, confint = 0.95, gridratio = 0.05)

Arguments

x
a vector of standard concentrations
y
a vector of corresponding respondes (peak areas etc.)
confint
confidence interval for graphing prediction intervals
gridratio
a part of x variable range, to extend plot range (default 5 percent)

Value

Returns object of class c("lmcal","cal") or c("nlscal","cal"), which is the list of following components:
models
A list of fitted models (p1-p4,P1-P4,l1,l2,bx,by,r1-r4,R1-R4)
graph
A list used by plot() method to produce graphs. Stored permanently to make custom graphing easier. Containing following elements: grid - a grid of x values, fitted - corresponding fitted values, upperc,lowerc - upper and lower bound for interval="confidence" prediction, upperp,lowerp - upper and lower bound for interval="prediction" prediction
x
Concentration vector
y
Response vector
Linear calibration object contains also following elements:
weigh
A dataframe containing sequence of gamma values and corresponding mean relative errors, estimated during weighting process
wx
Value of gamma for oprimal weighting on x
wy
Value of gamma for oprimal weighting on y
yw
Logical, if weighting on y gives better result than on x
px
Optimal Box-Cox power for transform of x variable
py
Optimal Box-Cox power for transform of y variable

Details

For linear 'lmcal' fitting, procedure is performed as follows. First, the calibration data are fitted to OLS linear, quadratic, cubical, and 4th order polynomial. These models are called p1 - p4. Next, linear model is reweighted using x and y raised to power gamma from range (-4,4) with 0.1 accuracy. The optimal weights are detected by minimal mean relative error (MRE) according to Almeida et al. (2002). The best weighting scheme is then chosen, and data are fit to the same equations (called P1-P4, with uppercase).

Next, the optimal value of lambda for Box-Cox transform is estimated with accuracy up to 0.001, for transformation of x and y. The transformed models are then fitted (called bx and by).

Then, two next log-log transformed models, are fitted - linear called l1, and quadratic (mentioned sometimes as Wagner transform), called l2.

Last, the same models as p1 - p4 and P1 - P4, are fitted using rlm robust method, and called r1 - r4 and R1 - R4.

This function performs also computation of grid and corresponding predicted values for easy graphing of fitted models.

For nonlinear 'nlscal' fitting, procedure is performed as above, but there are following models fitted: asymptotic (a1), asymptotic through origin (a2), logistic (g1), four parameter logistic (g2), Michaelis-Menten (m1) and nonparametric (loess) spline (s1). There are no weighting nor transform when fitting by 'nlscal'.

References

Almeida, A.M., Castel-Branco, M.M., Falcao, A.C. (2002) Linear regression for calibration lines revisited: weighting schemes for bioanalytical methods. J. Chromatogr. B Biomed. Sci. Appl. 774, 215-222.

Nagaraja, N.V., Paliwal, J.K., Gupta, R.C. (1999) Choosing the calibration model in assay validation. J. Pharm. Biomed. Anal. 20, 433-438.

Kimanani, E.K., Lavigne, J. (1998) Bioanalytical calibration curves: variability of optimal powers between and within analytical methods. J. Pharm. Biomed. Anal. 16, 1107-1115.

Kirkup, L., Mulholland, M. (2004). Comparison of linear and non-linear equations in univariate calibration. J. Chromatogr. A, 1029, 1-11.

Kimanani, E.K. (1998) Bioanalitical calibration curves: proposal for statistical criteria. J. Pharm. Biomed. Anal. 16, 1117-1124.

Baumann, K., Waetzig, H. (1997) Regression and calibration for analytical separation techniques. Part I. Design considerations. Process Control and Quality, 10, 59-73.

Baumann, K. (1997) Regression and calibration for analytical separation techniques. Part II. Validation, weighted and robust regression. Process Control and Quality, 10, 75-112.

Coleman, D.E., Vanatta, L.E. (1999) Lack-of-fit testing of ion chromatographic calibration curves with inexact replicates. J. Chromatogr. A 850, 43-51.

See Also

lm, rlm, boxcox

Examples

data(ibuprofen)
attach(ibuprofen)
fit = lmcal(conc,area)
fit
summary(fit)