CalDIMsubgroup {aihuman} | R Documentation |
Calculate diff-in-means estimates
Description
Calculate average causal effect based on diff-in-means estimator.
Usage
CalDIMsubgroup(
data,
subgroup,
name.group = c("Overall", "Female", "Male", "Non-white\nMale", "White\nMale")
)
Arguments
data |
A |
subgroup |
A list of numeric vectors for the index of each of the five subgroups. |
name.group |
A character vector including the labels of five subgroups. |
Value
A data.frame
of diff-in-means estimates for each value of D and Y for each subgroup.
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))
CalDIMsubgroup(synth, subgroup = subgroup_synth)
[Package aihuman version 0.1.0 Index]