panel.residual: Panel function for Residual Variability Plots

View source: R/panel.residual.r

panel.residualR Documentation

Panel function for Residual Variability Plots

Description

Panel function to plot residuals vs any covariate or DV vs (I)PRED

Usage

panel.residual(
  x,
  y,
  abline = "identity",
  col = obs.color,
  cex = 1,
  span = 0.8,
  lwd.loess = 2,
  smooth.col = smooth.color,
  ...
)

Arguments

x, y

numeric vectors x and y

abline

if "identity" (default) the line of identity is drawn. If anything else no abline is drawn.

col

symbol color (defaults to obs.color)

cex

symbol size

span

passed to panel.loess()

lwd.loess

line width of loess smooth

smooth.col

color of smooth line

...

passed to panel.xyplot(), panel.abline(), and panel.loess()

Value

Lattice panel output (invisible)

Examples

library(lattice)
library(reshape2)
trellis.strip.color()
xyplot(CONC ~ value | variable
       , data = subset(
          reshape2::melt(
             get.xpose.tables('example1', getOption('qpExampleDir')
             )
             , measure.vars = c('PRED','IPRED')
          ), EVID == 0)
       , subset = EVID == 0
       , aspect = 1
       , scales = list(x = list(relation = 'free'))
       , panel = panel.residual
       )



qPharmetra/qpToolkit documentation built on May 24, 2023, 8:52 a.m.