pla.plots: Make plots for parallel line models

Description Usage Arguments Value Author(s) Examples

Description

Plots of the "restricted" and "unrestricted" fits for parallel line models. Also plots of the model with individual fits for each combination of sample and dose can be displayed, on the scale of observed values, or corrected for the mean of the values for the dilution step. Finally residuals can be plotted in qq-plots (qqnorm), histograms, box-plots, or against dilutions step, sample, repetition, row, column, block, plate, etc.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
pla.plots(dataframe,
          sampleLabels = levels(unlist(dataframe["Sample"])),
          indexOfReference = 1,
          design = "blocks",
          main = "Parallel Line Model",
          setPdf = FALSE,
          pdfName = "PlaPlots.pdf",
          nc = 4,
          mfrow = c(2, nc),
          oma = c(1, 0, 2, 0),
          mar = c(3.5, 3.5, 0, 0) + 0.6,
          joinReplicates = TRUE,
          showRho = FALSE,
          plots = "default",
          xlab = "Log(Dosis)",
          ylab = "Response: Response",
          pch = 14 + as.numeric(unlist(dataframe["Replicate"])),
          cex = 2,
          lwd = 4,
          colTst = "black",
          colRef = "grey",
          colRho = "grey10",
          colNrm = "grey70",
          tests = NULL)

Arguments

dataframe

The data.frame with relevant variables, created by functions data2assayFrame or assayTable2frame - as for pla.fit.

sampleLabels

A vector of character strings giving the labels of the samples, standard and test-samples: "S", "T", "U", ... If data["Sample"] has one of these values, then these rows are used. These labels are also used for labels of the returned values.

indexOfReference

Index of the reference among the samples given by sampleLabels.

design

crd, blocks, or latin, see pla.fit.

main

Main title for plot.

setPdf

If TRUE then PDF graphics is produced in pdfName. This should not be used for Sweave.

pdfName

A character string giving the name of the file for PDF graphics.

nc

4 or 3. Numeric value used for mfrow. One plot for the unrestricted model and the histogram of residuals omitted by 3.

mfrow

See par.

oma

See par.

mar

See par.

joinReplicates

See plotSamples.

showRho

See plotSamples.

plots

A (vector of) character strings from the list "default", "all", "restricted", "unrestricted", "twoway", "stepadjusted", "qplot", "histogram", "residualsSamples", "residualsBoxSampleStep", "residualsBoxSample", "residualsRow", "residuals-Column", "residualsBlock", "residualsPlate", "residualsStep".

xlab

See plotSamples.

ylab

See plotSamples.

pch

See plotSamples.

cex

See plotSamples.

lwd

See plotSamples.

colTst

Color(s) of test-samples, "T", "U", ...

colRef

Color of reference or standard, i.e. "S".

colRho

Color of displayed potency.

colNrm

Color for qqnorm and curve in histogram.

tests

Optional returned values from pla.fit.

Value

No values returned.

Author(s)

Jens Henrik Badsberg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
data(HepatitisB); Data <- HepatitisB

Design <- "crd"
Data <- readAssayTable(paste(system.file(package = "pla"),
                             "vignettes/PhEur/data/HepatitisB.txt",
                             sep = "/"))
Frame  <- as.data.frame(Data)

fits   <- pla.fit(Frame, design = Design, sampleLabels = c("S", "T", "U", "V"), 
                  dr = 2.25, returnPotencyEstimates = TRUE)

cbbPalette <- c("#000000", "#009E73", "#e79f00", "#9ad0f3",
                "#0072B2", "#D55E00", "#CC79A7", "#F0E442")

plots <- pla.plots(Frame, sampleLabels = c("S", "T", "U", "V"),
                   nc = 3, showRho = FALSE, colTst = cbbPalette[2:4],
                   ## main = Data@assayTitle,
                   main = "PhEur: HepatitisB; Three hepatitis B vaccines against a standard",
                   tests = fits@tests)

## Alternative on object of class 'pla':

plaModel <- plaCRD(Data,
  assayTitle = "PhEur: HepatitisB; Three hepatitis B vaccines against a standard")
print(plaModel, formatTest = "short")
plots    <- plot(plaModel)

pla documentation built on May 2, 2019, 11:12 a.m.