Learn R Programming

hettx (version 1.0.1)

Fisherian and Neymanian Methods for Detecting and Measuring Treatment Effect Variation

Description

Implements methods developed by Ding, Feller, and Miratrix (2016) , and Ding, Feller, and Miratrix (2018) for testing whether there is unexplained variation in treatment effects across observations, and for characterizing the extent of the explained and unexplained variation in treatment effects. The package includes wrapper functions implementing the proposed methods, as well as helper functions for analyzing and visualizing the results of the test.

Copy Link

Version

Install

install.packages('hettx')

Monthly Downloads

328

Version

1.0.1

License

GPL (>= 3)

Maintainer

Ben Fifield

Last Published

February 24th, 2026

Functions in hettx (1.0.1)

rcrmtvnorm

Generate truncated multivariate normal draws
make_linear_data

Generate dataset according to a linear model.
rq_stat

rq_stat
glance.RI.regression.result

Glance at an RI.regression.result
vcov.RI.regression.result

Get vcov() from object.
variance_ratio_test

Variance ratio test
hettx-deprecated

Deprecated functions in hettx
plot.RI.R2.result

Make a plot of the treatment effect R2 estimates
plot.FRTCI.test

plot.FRTCI.test
tidy.FRTCI.test

Tidy a FRTCI.test result
test_stat_info

test_stat_info
tidy.RI.R2.result

Tidy an RI.R2.result
estimate_systematic

Calculate systematic effects model using LATE, ITT, or full potential outcomes.
make_randomized_dat

Make fake data for simulations
make_randomized_compliance_dat

Generate fake data with noncompliance.
tidy.RI.regression.result

Tidy an RI.regression.result
detect_idiosyncratic

detect_idiosyncratic
Penn46_ascii

Sample data set
SE

Extract the standard errors from a var-cov matrix.
SKS_stat_cov_pool

SKS_stat_cov_pool
R2

Estimate treatment variation R2
KS_stat

KS_stat
SKS_pool_t

SKS_pool_t
SKS_stat

SKS_stat
SKS_stat_int_cov_pool

SKS_stat_int_cov_pool
SKS_stat_cov_rq

SKS_stat_cov_rq
glance.FRTCI.test

Glance at a FRTCI.test result
get_p_value

get p-value along with uncertainty on p-value
coef.RI.regression.result

Extract coefficients of a fit RI regression model.
WSKS_t

WSKS_t
generate_permutations

Generate permutation distributions for FRT tests
get_testing_grid

Build a grid of treatment effect models for interaction testing
get_tau_vector

Generate a grid of treatment effect values to test
ToyData

Toy data set
glance.RI.R2.result

Glance at an RI.R2.result
hettx-package

Fisherian and Neymanian Methods for Detecting and Measuring Treatment Effect Variation