Learn R Programming

drLumi (version 0.1.2)

plot.scluminex: Plot method for the scluminex class

Description

This function takes a scluminex object and creates a standard curve, residuals or QQ-plot using ggplot2 package.

Usage

"plot"(x, type = "scurve", subset.list = NULL, psize = 1.8, ncol = NULL, nrow = NULL, out.limit = 2.5, size.text = 1.5, size.legend = 2.5, interval = "confidence", level = 0.95, color.bkg = "green", ...)

Arguments

x
an object of class scluminex
type
character describing the type of plot ('scurve','residuals' or 'qqplot'). Default 'scurve'.
subset.list
list of analytes to be plotted. Default all analytes.
psize
numeric point size
ncol
number of columns to plot the analytes.
nrow
number of rows to plot the analytes.
out.limit
value that defines an outlier. Must be positive value. Only applies for type 'residuals'.
size.text
value that defines the size of the well into the residuals plot. Only applies for type 'residuals'.
size.legend
size of the legend. NA for not showing. Only applies for type 'scurve'.
interval
'confidence' or 'prediction' character in order to plot the fit and the corresponding bands. If NULL only observed points are plotted. Only applies for type 'scurve'.
level
confidence level for the interval. Default 0.95, only applies for type 'scurve'.
color.bkg
character specifying the color of the background line. NA for not showing background. Only applies for type 'scurve'.
...
other arguments to be passed to ggplot function

Value

A ggplot object

Details

All information in order to generate the plots is extracted from the scluminex object.

Examples

Run this code
# Load data and estimate models
data(ecdata)
data(mfidata)

dat <- mfidata[mfidata$plate=="plate_1" & mfidata$analyte=="FGF",]

sdf <- data_selection(dat, ecdata)[[1]]
sdf_luminex <- scluminex("plate_1",sdf$standard, sdf$background,
"SSl4", bkg="ignore", fmfi="mfi", verbose=FALSE)

# Plot standard curves
plot(sdf_luminex, "sc")

# Plots residuals
plot(sdf_luminex, "res")

# Plot QQplot
plot(sdf_luminex, "qq")

Run the code above in your browser using DataLab