tauPlot2d: Plot estimated interaction index surface slice along one of...

Description Usage Arguments Details Value Author(s) See Also

View source: R/plot.tauSurface.R

Description

Plot estimated interaction index surface slice along one of the doses

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
tauPlot2d(
  tauSurface,
  tauSurface2 = NULL,
  side = "d1",
  groupBy = NULL,
  colorBy = groupBy,
  facetBy = "auto",
  continuous = FALSE,
  continuous2 = FALSE,
  addLine = continuous || continuous2,
  funs = NULL,
  funs2 = NULL,
  title = NULL,
  tauNames = NULL,
  digits = 4,
  facetOpts = NULL
)

Arguments

tauSurface

A tauSurface object returned by getTauSurface.

tauSurface2

An optional second tauSurface object returned by getTauSurface. If provided, a 2d-plot comparing the two tau surfaces is produced. Note that the estimates should have been calculated on the same HarbronFit object.

side

Data column to use as x-axis: "d1", "d2", "total" or another variable from the data in the tauSurface object.

groupBy

Data column to use as grouping. Note that if comparison of two surfaces is performed, this will be ignored.

colorBy

Data column to use for coloring.

facetBy

Whether to facet plots by extra variables used in the tau formula ("auto") or manually provided data column(s) to facet by.

continuous

Whether continuous type of plot is requested (for tauSurface1). This is automatically detected if used via plot.tauSurface, but can be overwritten.

continuous2

Whether continuous type of plot is requested (for tauSurface2). This is automatically detected if used via plot.tauSurface, but can be overwritten.

addLine

Whether to connect tau estimates for subsequent doses.

funs

A list with functions to compute tau surface and confidence bands (for tauSurface1). These are returned by the getTauSurface and are automatically used when the plot.tauSurface is called.

funs2

A list with functions to compute tau surface and confidence bands (for tauSurface2). These are returned by the getTauSurface and are automatically used when the plot.tauSurface is called.

title

Plot title.

tauNames

Tau surface names to use for the plot legend in the case of comparison of estimates (i.e. when tauSurface2 is provided).

digits

Number of digits used in format for the dose labels.

facetOpts

Arguments passed to facet_wrap

Details

The function returns a 2d plot for the interaction index (tau) estimates as a function of one of the two doses in a checkerboard design, or rays in a ray design. Pointwise confidence intervals are displayed as error bars. In addition to plotting tau estimates from one tauSurface object, the function can be used to compare two tauSurface objects. This can be used, for example, to see the difference between Wald-type and boostrap-based confidence intervals for tau. Although the function can be used 'manually', typically one calls the plot.tauSurface method, which then calls this function when which = "2d".

Value

A ggplot2 object.

Author(s)

Maxim Nazarov

See Also

plot.tauSurface, tauPlot3d


drugCombo documentation built on June 30, 2021, 1:07 a.m.