plot.FRTCI.test: plot.FRTCI.test

View source: R/S3_plot.R

plot.FRTCI.testR Documentation

plot.FRTCI.test

Description

Plot curve from FRTCI.test object.

Usage

## S3 method for class 'FRTCI.test'
plot(x, true.tau, xlab, ylab, true.tau.col, plot.envelope, ci.line.col, ...)

Arguments

x

An object of class FRTCI.test

true.tau

The true value of tau, if known. Default is NULL.

xlab

X-axis label. Default is tau.

ylab

Y-axis label. Default is "p-value".

true.tau.col

Color to plot true tau value, if provided. Default is red.

plot.envelope

Plot envelope around tested values of tau. Default is TRUE.

ci.line.col

Color to plot confidence interval around estimated treatment effect. Default is blue.

...

Further arguments to be passed to print.FRTCI.test()

Examples

Z <- rep(c(0, 1), 100)
tau <- 4
Y <- ifelse(Z, rnorm(100, tau), rnorm(100, 0))
df <- data.frame(Y=Y, Z=Z)
tst <- detect_idiosyncratic(Y ~ Z, df, B = 50, grid.size = 50)
plot(tst)


hettx documentation built on Aug. 20, 2023, 1:06 a.m.