Nothing
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' @title Fast multiplier bootstrap weights
#' @description Generates exponential multiplier weights for the
#' wild/multiplier bootstrap used in nonlinear DiD inference.
#' @param n Integer. Number of units.
#' @param nboot Integer. Number of bootstrap iterations.
#' @return A matrix of dimension n x nboot with positive weights
#' that sum to n in each column.
#' @keywords internal
multiplier_weights_cpp <- function(n, nboot) {
.Call('_NonlinearDiD_multiplier_weights_cpp', PACKAGE = 'NonlinearDiD', n, nboot)
}
#' @title Weighted mean (fast)
#' @description Computes weighted mean efficiently for bootstrap.
#' @param x Numeric vector.
#' @param w Numeric weights vector.
#' @return Weighted mean scalar.
#' @keywords internal
weighted_mean_cpp <- function(x, w) {
.Call('_NonlinearDiD_weighted_mean_cpp', PACKAGE = 'NonlinearDiD', x, w)
}
#' @title Logit-scale DR score computation
#' @description Computes the doubly-robust score function for the
#' logit-scale DiD estimator. Used internally for fast SE computation.
#' @param delta_logit Numeric vector of logit(Y1) - logit(Y0).
#' @param D Integer vector of treatment indicators.
#' @param pscore Numeric vector of propensity scores.
#' @param mu_hat Numeric vector of outcome model predictions.
#' @return Numeric vector of DR scores (influence functions).
#' @keywords internal
dr_score_logit_cpp <- function(delta_logit, D, pscore, mu_hat) {
.Call('_NonlinearDiD_dr_score_logit_cpp', PACKAGE = 'NonlinearDiD', delta_logit, D, pscore, mu_hat)
}
#' @title Compute ATT from DR scores
#' @description Returns ATT as mean of DR influence function scores.
#' @param score Numeric vector from dr_score_logit_cpp.
#' @return Scalar ATT estimate.
#' @keywords internal
att_from_score_cpp <- function(score) {
.Call('_NonlinearDiD_att_from_score_cpp', PACKAGE = 'NonlinearDiD', score)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.