idd.cfplot: Plot the counterfactual.

Description Usage Arguments Value Examples

View source: R/idd.cfplot.R

Description

idd.cfplot takes an output object after idd and plots the counterfactual using ggplot2.

Usage

1
idd.cfplot(x, mult = 1e+05, donor = FALSE)

Arguments

x

Name of the idd output object.

mult

Multiplier for the rates (default=100000).

donor

Plot a counterfactual based on the entire donor pool as well? Defaults to FALSE.

Value

Returns a ggplot of the estimated counterfactual based on the selected control group.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
data(simpanel)
idd.out <- idd(eventvar="y",
             popvar="pop",
             idvar="age",
             timevar="time",
             postvar="post",
             treatvar="treat",
             data=simpanel)
plot.out <- idd.cfplot(idd.out)

## End(Not run)

carlbona/idd documentation built on June 12, 2018, 2:23 p.m.