aboutsummaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorranke <ranke@5fad18fb-23f0-0310-ab10-e59a3bee62b4>2005-02-15 19:15:54 +0000
committerranke <ranke@5fad18fb-23f0-0310-ab10-e59a3bee62b4>2005-02-15 19:15:54 +0000
commit965af33bfc386b0c96a50c85fbddf98211e266c4 (patch)
tree0add80bd2712189a8ae511df0631f122bd270ae2 /man
parenta94bd86465fe191102a2bf85a3631c83cd10db0a (diff)
Cleaned up version, only containing very basic stuff.
git-svn-id: http://kriemhild.uft.uni-bremen.de/svn/chemCal@2 5fad18fb-23f0-0310-ab10-e59a3bee62b4
Diffstat (limited to 'man')
-rw-r--r--man/calm.Rd43
-rw-r--r--man/calplot.Rd52
-rw-r--r--man/calpredict.Rd64
-rw-r--r--man/din32645.Rd2
-rw-r--r--man/multical.Rd37
-rw-r--r--man/pahCalibration.Rd19
-rw-r--r--man/pahMeasurements.Rd19
-rw-r--r--man/plot.calm.Rd48
-rw-r--r--man/predictx.Rd37
9 files changed, 129 insertions, 192 deletions
diff --git a/man/calm.Rd b/man/calm.Rd
new file mode 100644
index 0000000..c16f663
--- /dev/null
+++ b/man/calm.Rd
@@ -0,0 +1,43 @@
+\name{calm}
+\alias{calm}
+\alias{print.calm}
+\alias{predict.calm}
+\alias{summary.calm}
+\title{Generate a calibration model}
+\description{
+ This function fits a calibration model to the data
+ frame.
+}
+\usage{
+ calm(data)
+}
+\arguments{
+ \item{data}{
+ A data frame with numeric x data in the first column and
+ numeric y data in the second column.
+ }
+}
+\value{
+ An object of class \code{calm}, which is derived from
+ a linear model \code{lm}, the only difference being that
+ it contains the additional attributes \code{xname},
+ \code{yname} and \code{intercept}, the latter being a
+ boolean reporting wether the model uses an intercept or not.
+}
+\note{
+ The decision if the returned model contains an intercept is taken based on
+ the significance of the fitted intercept on a significance level of 0.95.
+ The methods \code{\link{print.calm}}, \code{\link{predict.calm}}
+ \code{\link{summary.calm}} are just newly assigned names for the
+ corresponding methods from the class \code{\link{lm}}.
+}
+\examples{
+ data(din32645)
+ calm(din32645)
+}
+\author{
+ Johannes Ranke
+ \email{jranke@uni-bremen.de}
+ \url{http://www.uft.uni-bremen.de/chemie/ranke}
+}
+\keyword{regression}
diff --git a/man/calplot.Rd b/man/calplot.Rd
deleted file mode 100644
index 7500912..0000000
--- a/man/calplot.Rd
+++ /dev/null
@@ -1,52 +0,0 @@
-\name{calplot}
-\alias{calplot}
-\title{Plot calibration graphs}
-\description{
- Produce graphics of calibration data, the fitted model as well
- as prediction and confidence intervals.
-}
-\usage{
- calplot(x,y,intercept=FALSE,measurand="substance x",xunit="mg/L",yunit="Area",level=0.95)
-}
-\arguments{
- \item{x}{
- A vector of x values.
- }
- \item{y}{
- A vector of y values.
- }
- \item{intercept}{
- A boolean describing if the calibration curve is to be forced
- through zero.
- }
- \item{measurand}{
- The name of what is being measured as a character vector.
- }
- \item{xunit}{
- The unit of the given values on the x axis as a character vector.
- }
- \item{yunit}{
- The unit of the y axis as a character vector. Defaults to "Area".
- }
- \item{level}{
- The confidence level of the confidence and prediction bands. Defaults to
- 0.95.
- }
-}
-\value{
- A linear model object for y ~ x. You will also get a plot of the calibration
- data, of your fitted model as well as lines showing the confidence limits and
- the prediction limits.
-}
-\examples{
-data(pahCalibration)
-attach(pahCalibration)
-\dontrun{calplot(conc,phenanthrene,"Phenanthrene","mg/L")}
-detach(pahCalibration)
-}
-\author{
- Johannes Ranke
- \email{jranke@uni-bremen.de}
- \url{http://www.uft.uni-bremen.de/chemie/ranke}
-}
-\keyword{regression}
diff --git a/man/calpredict.Rd b/man/calpredict.Rd
deleted file mode 100644
index a91d018..0000000
--- a/man/calpredict.Rd
+++ /dev/null
@@ -1,64 +0,0 @@
-\name{calpredict}
-\alias{calpredict}
-\title{Estimate measurement results including confidence intervals}
-\description{
- This function generates estimates for x values from y values, including
- a confidence interval for the x values. The formulas in this function used
- for prediction of concentrations from (replicate) measurements are taken from
- the "Handbook of Chemometrics and Qualimetrics Part A" by D. L. Massart,
- Vandeginste, B. G. M., Buydens, L. M. C., De Jong, S., Lewi, P. J. and
- Smeyers-Verbeke, J, Elsevier, Amsterdam, 1997 and from the EURACHEM/CITAC
- report on "Quantifying uncertainty in analytical measurement", 2000,
- pp. 111f.
-}
-\usage{
- calpredict(yobs,xi,yi,xunit="",level=0.95,intercept=FALSE,syobs=FALSE)
-}
-\arguments{
- \item{yobs}{
- A numeric vector containing the observed data.
- }
- \item{xi}{
- A vector of x values of the calibration.
- }
- \item{yi}{
- A vector of y values of the calibration.
- }
- \item{xunit}{
- The unit of the given values on the x axis as a character string.
- }
- \item{level}{
- The desired confidence level for the confidence interval of the
- estimates. Defaults to 0.95.
- }
- \item{intercept}{
- Logical value determining if an intercept is to be fitted or not.
- Default is FALSE.
- }
- \item{syobs}{
- If TRUE, a standard deviation for the given y values is
- calculated, and the resulting confidence interval will
- include this variability (not validated yet). If FALSE (default), this
- standard deviation is not included in the
- confidence interval. If a numeric value is given,
- it is used for the standard deviation of "real samples",
- in addition to the standard deviation of the y values
- in the calibration (also not validated yet).
- }
-}
-\value{
- A list containing the estimate, its standard deviation and its
- confidence interval.
-}
-\examples{
-data(pahCalibration)
-attach(pahCalibration)
-y <- c(51.2,51.4,51.1,51.8)
-estimate <- calpredict(y,conc,acenaphthene,xunit="mg/L")
-}
-\author{
- Johannes Ranke
- \email{jranke@uni-bremen.de}
- \url{http://www.uft.uni-bremen.de/chemie/ranke}
-}
-\keyword{regression}
diff --git a/man/din32645.Rd b/man/din32645.Rd
index 901bdf0..0a2a790 100644
--- a/man/din32645.Rd
+++ b/man/din32645.Rd
@@ -5,7 +5,7 @@
\description{
Sample dataset to test the package.
}
-\usage{data(pahCalibration)}
+\usage{data(din32645)}
\format{
A dataframe containing 10 rows of x and y values.
}
diff --git a/man/multical.Rd b/man/multical.Rd
deleted file mode 100644
index 7d62277..0000000
--- a/man/multical.Rd
+++ /dev/null
@@ -1,37 +0,0 @@
-\name{multical}
-\alias{multical}
-\title{Calculation of results in a dataframe}
-\description{
- This function provides the possibility to perform the calibration
- of multiple components simultaneously, and to provide the results
- including confidence intervals in a dataframe.
-}
-\usage{
- multical(cf,df,intercept=FALSE)
-}
-\arguments{
- \item{cf}{
- A data frame containig the data for the calibration standards.
- }
- \item{df}{
- A data frame with the measured sample data.
- }
- \item{intercept}{
- Logical value determining if an intercept is to be fitted or not.
- Default is FALSE.
- }
-}
-\value{
- A data frame containig the measurement results with a confidence interval.
-}
-\examples{
-data(pahCalibration)
-data(pahMeasurements)
-result <- multical(pahCalibration,pahMeasurements)
-}
-\author{
- Johannes Ranke
- \email{jranke@uni-bremen.de}
- \url{http://www.uft.uni-bremen.de/chemie/ranke}
-}
-\keyword{regression}
diff --git a/man/pahCalibration.Rd b/man/pahCalibration.Rd
deleted file mode 100644
index 540af4a..0000000
--- a/man/pahCalibration.Rd
+++ /dev/null
@@ -1,19 +0,0 @@
-\name{pahCalibration}
-\docType{data}
-\alias{pahCalibration}
-\title{Calibration data for HPLC measurement of 4 PAH}
-\description{
- This dataset was produced during a course on trace analysis
- of organic contaminants. The data are far from perfect, but
- good enough to serve as an example.
-}
-\usage{data(pahCalibration)}
-\format{
- A dataframe containing the areas for the four polycyclic aromatic
- hydrocarbons (PAH) Acenaphthene, Phenanthrene, Anthracene and Pyrene.
- Each measurement of a standard solution makes up one row.
-}
-\source{
- \url{http://www.uft.uni-bremen.de/chemie}
-}
-\keyword{datasets}
diff --git a/man/pahMeasurements.Rd b/man/pahMeasurements.Rd
deleted file mode 100644
index 77b646b..0000000
--- a/man/pahMeasurements.Rd
+++ /dev/null
@@ -1,19 +0,0 @@
-\name{pahMeasurements}
-\docType{data}
-\alias{pahMeasurements}
-\title{Measurement data for HPLC measurement of 4 PAH}
-\description{
- This dataset was produced during a course on trace analysis
- of organic contaminants. The data are far from perfect, but
- good enough to serve as an example.
-}
-\usage{data(pahMeasurements)}
-\format{
- A dataframe containing the areas for the four polycyclic aromatic
- hydrocarbons (PAH) Acenaphthene, Phenanthrene, Anthracene and Pyrene
- in the different samples.
-}
-\source{
- \url{http://www.uft.uni-bremen.de/chemie}
-}
-\keyword{datasets}
diff --git a/man/plot.calm.Rd b/man/plot.calm.Rd
new file mode 100644
index 0000000..bb302c7
--- /dev/null
+++ b/man/plot.calm.Rd
@@ -0,0 +1,48 @@
+\name{plot.calm}
+\alias{plot.calm}
+\title{Plot calibration graphs from calibration models}
+\description{
+ Produce graphics of calibration data, the fitted model as well
+ as prediction and confidence intervals.
+}
+\usage{
+ plot.calm(x,...,xunit="",yunit="",measurand="",level=0.95)
+}
+\arguments{
+ \item{x}{
+ A calibration model of type \code{\link{calm}}. It is named
+ x here because the generic plot method expects x to be its
+ first argument.
+ }
+ \item{...}{
+ I just included this because I wanted to avoid the error messages
+ from R CMD check that tell me I should read "Writing R extensions"
+ which I did ...
+ }
+ \item{xunit}{
+ The unit of the given values on the x axis as a character vector.
+ }
+ \item{yunit}{
+ The unit of the y axis as a character vector.
+ }
+ \item{measurand}{
+ The name of what is being measured as a character vector.
+ }
+ \item{level}{
+ The confidence level of the confidence and prediction bands. Defaults to
+ 0.95.
+ }
+}
+\value{
+ A plot of the calibration data, of your fitted model as well as lines showing
+ the confidence limits and the prediction limits.
+}
+\examples{
+
+}
+\author{
+ Johannes Ranke
+ \email{jranke@uni-bremen.de}
+ \url{http://www.uft.uni-bremen.de/chemie/ranke}
+}
+\keyword{regression}
diff --git a/man/predictx.Rd b/man/predictx.Rd
new file mode 100644
index 0000000..a3946b0
--- /dev/null
+++ b/man/predictx.Rd
@@ -0,0 +1,37 @@
+\name{predictx}
+\alias{predictx}
+\title{Predict x from y values for calibration models}
+\description{
+ This function predicts x values from y values, as in classical calibration,
+ including a confindence interval.
+}
+\usage{
+ predictx(m,yobs,level=0.95)
+}
+\arguments{
+ \item{m}{
+ A calibration model of type \code{\link{calm}}.
+ }
+ \item{yobs}{
+ A vector of observed y values for one sample.
+ }
+ \item{level}{
+ The confidence level for the confidence interval to be reported.
+ }
+}
+\value{
+ A vector containing the estimate (\code{estimate}), its estimated standard
+ deviation (\code{sdxpred}), its estimated confidence (\code{confxpred}).
+}
+\examples{
+ data(din32645)
+ m <- calm(din32645)
+ r <- predictx(m,3500,level=0.95)
+ cat("\nThe confidence interval is",r[["estimate"]],"+-",r[["confxpred"]],"\n")
+}
+\author{
+ Johannes Ranke
+ \email{jranke@uni-bremen.de}
+ \url{http://www.uft.uni-bremen.de/chemie/ranke}
+}
+\keyword{regression}

Contact - Imprint