Mycroft Holmes, Sherlock's elder brother, was a government official who specialized in taking together facts from a variety of disparate sources and putting together the best course of government action. His deductive skills and logical reasoning abilities exceeded even those of Sherlock. Mycroft was concerned more with the "big picture" than with the details of particular cases. As such, the role of mycroft_assess within the sherlock causal segmentation framework is to evaluate the population-level causal effects that would result from following the course of action (i.e., dynamic treatment) prescribed by Sherlock and Watson. For mycroft_assess to work, both sherlock_calculate and watson_segment must be called in sequence to evaluate the segmentation case and assign a treatment decision to segments.

mycroft_assess(data_from_advising, param_type = c("hte", "ote"),
  est_type = c("onestep"))



A data.table containing the output from successive calls to sherlock_calculate and watson_segment, which matches the input data, augmented with cross-validated nuisance parameter estimates and an estimate of the CATE. A summary of the estimates across segmentation strata is made available as an attribute of the data.table.


A character providing a specification for a family of target parameters to be estimated. The two choices provide estimates of a range of target parameters. Specifically, the choices correspond to

  1. "hte", which computes the average treatment effect (ATE), which contrasts static interventions for treatment assignment and treatment being withhold, for (1) the full population, (2) within the subgroup of units dynamically assigned treatment, and (3) within the subgroup of units from whom treatment was withheld dynamically. Also included is the heterogeneous treatment effect (HTE), defined as a difference of the two subgroup ATEs, which captures the benefit attributable to treating those units who should receive treatment and withholding treatment from those that could be harmed by the treatment.

  2. "ote", which computes several counterfactual means, for (1) the static intervention of assigning treatment to all units, (2) the static intervention of withholding treatment from all units, (3) the dynamic intervention of assigning treatment to those predicted to benefit from it while withholding treatment from those units that could be harmed. In addition, two average treatment effects are evaluated, each contrasting the dynamic treatment rule against the static interventions of assigning or withholding treatment. The latter three parameters capture contrasts based on the optimal treatment effect (OTE).


A character specifying the type of estimator to be computed. Both estimators are asymptotically linear when flexible modeling choices are used to estimate nuisance parameters, doubly robust (consistent when at least one nuisance parameter is correctly estimated), and achieve the best possible variance (i.e., asymptotically efficient) among the class of regular asymptotically linear estimators. The two options are

  1. "onestep", corresponding to the one-step estimator, a first-order solution to the efficient influence function (EIF) estimating equation. This is not a substitution (direct) estimator and may be unstable in the sense of yielding estimates outside the bounds of the target parameter.

  2. "tmle", corresponding to the targeted minimum loss estimator, an approach that updates initial estimates of the outcome model by way of a one-dimensional fluctuation model that aims to approximately solve the EIF estimating equation.