makeplots {htetree} | R Documentation |
Visualize Causal Tree and the Estimated Results
Description
An intermediate function used for plotting
Usage
makeplots(
negative,
opfit. = opfit,
trainset,
covariates,
outcomevariable,
data. = data,
hte_effect_setup,
varlabel,
maintitle,
legend.x = 0.8,
legend.y = 0.25,
...
)
Arguments
negative |
a logical value indicating whether we expect the treatment effect to be negative. The default is set as FALSE. |
opfit. |
tree structure generated from causal tree algorithm. |
trainset |
a data frame only containing the variables used in the model and missings values are listwise deleted. |
covariates |
a vector of column names of all covariates (linear terms andpropensity score). |
outcomevariable |
a character representing the column name of the outcome variable. |
data. |
a data frame containing the variables in the model. |
hte_effect_setup |
a empty list to store the adjusted treatment effect. |
varlabel |
a named vector containing variable labels. |
maintitle |
a character string indicating the main title displayed when plotting the tree and results. The default is set as "Heterogeneous Treatment Effect Estimation". |
legend.x , legend.y |
x and y coordinate to position the legend. The default is set as (0.08, 0.25). |
... |
further arguments passed to or from other methods. |
Value
A plot visualizing the tree and estimated treatment effect in each node.