hetsurr.plot: Constructs plots of the treatment effect, residual treatment...

Description Usage Arguments Value Author(s) References Examples

View source: R/hetsurr.functions.R

Description

Constructs plots of the treatment effect, residual treatment effect, and proportion explained as a function of the continuous baseline covariate

Usage

1
hetsurr.plot(hetsurr.results, xlab.name = "Baseline Covariate", placement = "bottomleft")

Arguments

hetsurr.results

This is a list produced by the hetsurr.fun function.

xlab.name

This is the label for the x-axis; default is "Baseline Covariate".

placement

This is the placement for the legend; default is "bottomleft".

Value

Produces a plot with 3 panels.

Author(s)

Layla Parast

References

Parast, L., Cai, T., Tian L (2021). Testing for Heterogeneity in the Utility of a Surrogate Marker. Biometrics, In press.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
	data(example.data)
	names(example.data)
	#computationally intensive
	
	het.ob = hetsurr.fun(y1=example.data$y1, y0=example.data$y0, s1=example.data$s1, 
	s0=example.data$s0, w1=example.data$w1, w0=example.data$w0, wf.grd = seq(0.25, 1.75, 
	length=50), var.want =TRUE,  test.want = TRUE, type = "cont")
	hetsurr.plot(het.ob)
	
	#reducing dimension of example data to provide a computationally faster example
	het.ob = hetsurr.fun(y1=example.data$y1[1:300], y0=example.data$y0[1:300],
	s1=example.data$s1[1:300], s0=example.data$s0[1:300], w1=example.data$w1[1:300],
	w0=example.data$w0[1:300], wf.grd = seq(0.25, 1.75, length=5), var.want =TRUE,
	test.want = TRUE, type = "cont")
	hetsurr.plot(het.ob)

hetsurr documentation built on Nov. 10, 2021, 5:10 p.m.