From f381f9a6a8a47b89ec25cd627833a7248da7932b Mon Sep 17 00:00:00 2001 From: ranke Date: Tue, 23 May 2006 07:33:22 +0000 Subject: Don't do calplot and lod for linear models from weighted regression any more, since this is not supported (PR#8877). git-svn-id: http://kriemhild.uft.uni-bremen.de/svn/chemCal@13 5fad18fb-23f0-0310-ab10-e59a3bee62b4 --- inst/doc/chemCal-001.pdf | 4 ++-- inst/doc/chemCal.Rnw | 13 ++++++------- inst/doc/chemCal.log | 4 ++-- inst/doc/chemCal.pdf | Bin 107306 -> 107447 bytes 4 files changed, 10 insertions(+), 11 deletions(-) (limited to 'inst/doc') diff --git a/inst/doc/chemCal-001.pdf b/inst/doc/chemCal-001.pdf index 748b5e1..9211cf1 100644 --- a/inst/doc/chemCal-001.pdf +++ b/inst/doc/chemCal-001.pdf @@ -2,8 +2,8 @@ %ρ\r 1 0 obj << -/CreationDate (D:20060516214219) -/ModDate (D:20060516214219) +/CreationDate (D:20060517131400) +/ModDate (D:20060517131400) /Title (R Graphics Output) /Producer (R 2.3.0) /Creator (R) diff --git a/inst/doc/chemCal.Rnw b/inst/doc/chemCal.Rnw index 26b224f..77888b4 100644 --- a/inst/doc/chemCal.Rnw +++ b/inst/doc/chemCal.Rnw @@ -19,7 +19,7 @@ Ron Wehrens led to the belief that it could be heavily improved if the inverse prediction method given in \cite{massart97} would be implemented, since it also covers the case of weighted regression. -At the moment, the package only consists of two functions, working +At the moment, the package consists of three functions, working on univariate linear models of class \texttt{lm} or \texttt{rlm}. When calibrating an analytical method, the first task is to generate @@ -27,6 +27,10 @@ a suitable model. If we want to use the \chemCal{} functions, we will have to restrict ourselves to univariate, possibly weighted, linear regression so far. +For the weighted case, the function \code{predict.lm} had to be +rewritten, in order to allow for weights for the x values used to +predict the y values. + Once such a model has been created, the calibration can be graphically shown by using the \texttt{calplot} function: @@ -34,12 +38,7 @@ shown by using the \texttt{calplot} function: library(chemCal) data(massart97ex3) attach(massart97ex3) -yx <- split(y,factor(x)) -ybar <- sapply(yx,mean) -s <- round(sapply(yx,sd),digits=2) -w <- round(1/(s^2),digits=3) -weights <- w[factor(x)] -m <- lm(y ~ x,w=weights) +m <- lm(y ~ x, w = rep(0.01,length(x))) calplot(m) @ diff --git a/inst/doc/chemCal.log b/inst/doc/chemCal.log index d399d73..86ecc8e 100644 --- a/inst/doc/chemCal.log +++ b/inst/doc/chemCal.log @@ -1,4 +1,4 @@ -This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=pdflatex 2006.4.5) 16 MAY 2006 21:42 +This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=pdflatex 2006.4.5) 17 MAY 2006 13:14 entering extended mode **chemCal.tex (./chemCal.tex @@ -346,4 +346,4 @@ type1/bluesky/cm/cmbx12.pfb> -Output written on chemCal.pdf (3 pages, 107306 bytes). +Output written on chemCal.pdf (3 pages, 107447 bytes). diff --git a/inst/doc/chemCal.pdf b/inst/doc/chemCal.pdf index 6036bd3..5c6b1ea 100644 Binary files a/inst/doc/chemCal.pdf and b/inst/doc/chemCal.pdf differ -- cgit v1.2.1