Learn R Programming

qpcR (version 1.4-1)

resplot: An (overlayed) residuals barplot

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

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.

Value

A plot as described above.

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 = \sum{|\hat{\varepsilon}_{i, j}|}\).

Examples

Run this code
# NOT RUN {
## 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)
# }

Run the code above in your browser using DataLab