plot.scqe: Plot method for 'scqe'

Description Usage Arguments Value Examples

View source: R/functions.R

Description

The print method provides a plot of the estimates and confidence intervals for the scqe estimates for the range of values of delta provided by the user.

Usage

1
2
## S3 method for class 'scqe'
plot(x, xlab, ylab, ...)

Arguments

x

an object of class scqe

xlab

Optional character label for x axis.

ylab

Optional character label for y axis.

...

Extra optional arguments

Value

Plot of estimates and confidence intervals.

Examples

1
2
3
4
5
6
7
8
9
set.seed(1234)
post <- c(rep(0,100), rep(1,100))
tx <- c(rep(0, 100), rbinom(n = 100, prob = 0.27, size = 1))
y <- rbinom(n = 200, prob = 0.1 + 0.02 * post - 0.05 * tx, size = 1)

# Two cohorts, full data
scqe.2cohort.full <- scqe(post = post, treatment = tx, outcome = y,
                          delta = seq(from = -0.1, to = 0.1, by = 0.05))
plot(scqe.2cohort.full)

chadhazlett/scqe documentation built on May 18, 2021, 1:32 a.m.