resplot: An (overlayed) residuals barplot

Description Usage Arguments Details Value Author(s) Examples

Description

A plotting function which displays a barplot of the (standardized) residuals. The bars are colour-coded with heat colours proportional to the residual value. As default, the residuals are displayed together with the points of the fitted PCR curve.

Usage

1
resplot(object, overlay = TRUE, ylim = NULL, ...)

Arguments

object

an object of class 'pcrfit.

overlay

logical. If TRUE, the residuals are plotted on top of the fitted curve, else alone.

ylim

graphical ylim values for tweaking the scale and position of the barplot overlay.

...

any other parameters to be passed to barplot.

Details

If replicate data is present in the fitted curve, the residuals from all replicates i, j are summed up from the absolute values: Y_i = ∑{|\hat{\varepsilon}_{i, j}|}.

Value

A plot as described above.

Author(s)

Andrej-Nikolai Spiess

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Create l5 model and plot 
## standardized residuals.
m1 <- pcrfit(reps, 1, 2, l5)
resplot(m1)

## Not run: 
## Using replicates.
m2 <- pcrfit(reps, 1, 2:5, l5)
resplot(m2)

## End(Not run)

Example output

Loading required package: MASS
Loading required package: minpack.lm
Loading required package: rgl
Loading required package: robustbase
Loading required package: Matrix
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 
[1] "pcrfit" "nls"   
[1] "pcrfit" "nls"   

qpcR documentation built on May 2, 2019, 5:17 a.m.

Related to resplot in qpcR...