R/RcppExports.R

Defines functions cumulative_te cumulative_tscore

Documented in cumulative_te cumulative_tscore

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' calculate cumulative ATE for each potential split
#'
#' @param r response vector
#' @param t indicator variable for treated
#' @param x numeric vector of covariated, sorted low to high
#' @param min_tc smallest number of treated / control units we need
#'        before considering a split
#' @return matrix of left / right daughter ATEs
#' @export
cumulative_te <- function(r, t, x, min_tc = 1L) {
    .Call(`_subgroupTree_cumulative_te`, r, t, x, min_tc)
}

#' calculate cumulative ATE t-score for each potential split
#'
#' @param r response vector
#' @param t indicator variable for treatment
#' @param x numeric predictor vector (sorted low to high)
#' @param ate average treatment effect to test
#' @param minbucket only consider splits with at least minbucket obs
#' @return matrix of left / right daughter tscores
#' @export
cumulative_tscore <- function(r, t, x, ate = 0.0, minbucket = 100L) {
    .Call(`_subgroupTree_cumulative_tscore`, r, t, x, ate, minbucket)
}
molson2/subgroupTree documentation built on Dec. 3, 2019, 10:04 p.m.