PlotDIMdecisions {aihuman}R Documentation

Plot diff-in-means estimates

Description

See Figure 2 for example.

Usage

PlotDIMdecisions(
  res,
  y.max = 0.2,
  decision.labels = c("signature bond   ", "small cash bond   ", "large cash bond"),
  col.values = c("grey60", "grey30", "grey6"),
  shape.values = c(16, 17, 15)
)

Arguments

res

A data.frame generated with CalDIMsubgroup.

y.max

Maximum value of y-axis.

decision.labels

Labels of decisions (D).

col.values

Color of point for each decisions.

shape.values

Shape of point for each decisions.

Value

A ggplot.

Examples

data(synth)
subgroup_synth = list(1:nrow(synth),which(synth$Sex==0),which(synth$Sex==1),
                      which(synth$Sex==1&synth$White==0),which(synth$Sex==1&synth$White==1))
res_dec = CalDIMsubgroup(synth, subgroup = subgroup_synth)
PlotDIMdecisions(res_dec, decision.labels = c("signature","small cash","middle cash","large cash"),
                 col.values = c("grey60", "grey30", "grey6", "grey1"), 
                 shape.values = c(16, 17, 15, 18))


[Package aihuman version 0.1.0 Index]