Learn R Programming

sensitivityPStrat (version 1.0-6)

plot.sensitivity: plots the results of calls to the sensitivity functions.

Description

Functions used to plot the objects created by the sensitivityPStrat family of functions.

Usage

"plot"(x, xlim, ylim, xlab = expression(beta), ylab = "ACE", display = c("analytic", "bootstrap"), ci.select = 1, col = "black", line.col = col, point.col = col, analytic.col = "red", analytic.line.col = analytic.col, analytic.point.col = analytic.col, bootstrap.col = "green", bootstrap.line.col = bootstrap.col, bootstrap.point.col = bootstrap.col, panel.last = NULL, type = "l", ...)
"plot"(x, xlim, ylim, xlab = expression(beta[0]), ylab = expression(beta[1]), display = c("analytic", "bootstrap"), col = c(gray(.9), gray(1), gray(.8)), panel.last = NULL, ...)
"plot"(x, xlim, ylim, xlab = expression(beta), ylab = "SCE", t.point, display = c("analytic", "bootstrap"), col = "black", line.col = col, point.col = col, analytic.col = "red", analytic.line.col = analytic.col, analytic.point.col = analytic.col, bootstrap.col = "green", bootstrap.line.col = bootstrap.col, bootstrap.point.col = bootstrap.col, panel.last = NULL, type = "l", ...)

Arguments

x
sensitivity object
t.point
the time point at which data to create the plot.
display
character vector. Controls which confidence interval to use plot.
ci.select
integer vector or all. Selects the confidence interval to be ploted. If set to all then all confidence intervals are plotted. Default value is 1.
line.col
the color all the lines should be.
point.col
the color all the infinity points should be.
analytic.col
vector; the color of all of the analytic confidence interval markings. Value are recycled if more confidence intervals are selected then given color values.
analytic.line.col
vector;the color of all of the analytic confidence interval lines. Value are recycled if more confidence intervals are selected then given color values.
analytic.point.col
vector; the color of all of the analytic confidence interval infinity points. Value are recycled if more confidence intervals are selected then given color values.
bootstrap.col
vector; the color of all of the bootstrap confidence interval markings. Value are recycled if more confidence intervals are selected then given color values.
bootstrap.line.col
vector; the color of all of the bootstrap confidence interval lines. Value are recycled if more confidence intervals are selected then given color values.
bootstrap.point.col
vector; the color of all of the bootstrap confidence interval infinity points. Value are recycled if more confidence intervals are selected then given color values.
xlim, ylim, xlab, ylab, col, panel.last, type
...
arguments passed to plot.default

See Also

plot.default

Examples

Run this code
data(vaccine.trial)

ansJR<-with(vaccine.trial,
          sensitivityJR(z=treatment,s=hiv.outcome,y=logVL,
                    beta0=c(-1,-.5,-.25,0,.25,.5,1),
                    beta1=c(-1,-.5,-.25,0,.25,.5,1),
                    phi=c(0.95,0.90), selection="infected",
                    groupings=c("placebo","vaccine"),
                    N.boot=50)
         )

plot(ansJR)

ans<-with(vaccine.trial,
          sensitivityGBH(z=treatment,s=hiv.outcome,y=logVL,
                    beta=c(-Inf,-1,0.75,-0.5,-0.25,0,.25,.5,.75,1,Inf),
                    selection="infected",
                    groupings=c("placebo","vaccine"),
                    empty.principal.stratum=c("not infected","infected"),
                    ci.method="bootstrap", ci=c(0.95, 0.9, 0.9),
                    ci.type=c("twoSided", "upper", "lower"),
                    custom.FUN=function(mu0, mu1, ...) mu1 - mu0,
                    N.boot=50, method=c("ACE", "T1", "T2"),
                    upperTest=TRUE, lowerTest=TRUE, twoSidedTest=TRUE)
         )

plot(ans, ci.select="all", bootstrap.col=c("red","green","blue"))

Run the code above in your browser using DataLab