plot.LocalControlCS: Plots the local treatment difference as a function of radius...

Description Usage Arguments Examples

Description

Creates a plot where the y axis represents the local treatment difference, while the x axis represents the percentage of the maximum radius. If the confidence summary (nnConfidence) is provided, the 50% and 95% confidence estimates are also plotted.

Usage

1
2
3
4
## S3 method for class 'LocalControlCS'
plot(x, ..., nnConfidence, ylim,
  legendLocation = "bottomleft", ylab = "LTD",
  xlab = "Fraction of maximum radius", main = "")

Arguments

x

Return object from LocalControl with "default" outcomeType.

...

Arguments passed on to graphics::plot

nnConfidence

Return object from LocalControlNearestNeighborsConfidence

ylim

The y axis bounds. Defaults to c(0,1).

legendLocation

The location to place the legend. Default "topleft".

ylab

The y axis label. Defaults to "LTD".

xlab

The x axis label. Defaults to "Fraction of maximum radius".

main

The main plot title. Default is empty.

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(lindner)
# Specify clustering variables.
linVars <- c("stent", "height", "female", "diabetic",
             "acutemi", "ejecfrac", "ves1proc")

# Call Local Control once.
linRes <- LocalControl(data = lindner,
                       clusterVars = linVars,
                       treatmentColName = "abcix",
                       outcomeColName = "cardbill",
                       treatmentCode = 1)

# Plot the local treatment differences from Local Control without
# confidence intervals.
plot(linRes, ylim =  c(-6000, 3600))

#If the confidence intervals are calculated:
#linConfidence = LocalControlNearestNeighborsConfidence(
#                                      data = lindner,
#                                      clusterVars = linVars,
#                                      treatmentColName = "abcix",
#                                      outcomeColName = "cardbill",
#                                      treatmentCode = 1, nBootstrap = 100)

# Plot the local treatment difference with confidence intervals.
#plot(linRes, linConfidence)

LocalControl documentation built on May 2, 2019, 7:29 a.m.