The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Type: Package
Title: Design-Based Causal Inference Method for Incomplete Block Designs
Version: 0.0.1
Description: This R package implements methods for estimation and inference under Incomplete Block Designs and Balanced Incomplete Block Designs within a design-based finite-population framework. Based on 'Koo and Pashley' (2024) <doi:10.48550/arXiv.2405.19312>, it includes block-level estimators and extends to unit-level effects using 'Horvitz-Thompson' and 'Hájek' estimators. The package also provides asymptotic confidence intervals to support valid statistical inference.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.2
Imports: crossdes, dplyr, tidyr
URL: https://github.com/taehyeonkoo/IBDInfer
NeedsCompilation: no
Packaged: 2025-04-16 23:02:26 UTC; taehyeon
Author: Taehyeon Koo [aut, cre], Nicole Pashley [ctb]
Maintainer: Taehyeon Koo <tk587@stat.rutgers.edu>
Repository: CRAN
Date/Publication: 2025-04-17 00:10:07 UTC

Design-based Inference for Incomplete Block Designs

Description

Conduct the design-based inference for incomplete block designs.

Usage

IBDInfer(y, b, z, g, w = c("Unit", "Block"), alpha = 0.05, data = NULL)

Arguments

y

Observed outcomes.

b

Block identifier (ID).

z

Assigned treatments.

g

A contrast vector, must sum to zero.

w

A weight vector, must sum to one and contain non-negative values.

alpha

Confidence level, default set to 0.05.

data

A data frame; if provided, y, b, and z should be column names in the data frame.

Value

IBDInfer returns an object of class "IBD", which is a list containing the following components: :

tau.ht

The Horvitz-Thompson estimator of tau.

tau.haj

The Hajek estimator of tau.

var_tau_ht_bb

Variance estimator for the Horvitz-Thompson estimator with between-block bias.

var_tau_ht_wb

Variance estimator for the Horvitz-Thompson estimator with within-block bias.

var_tau_haj_bb

Variance estimator for the Hajek estimator with between-block bias.

var_tau_haj_wb

Variance estimator for the Hajek estimator with within-block bias.

CI_ht_bb

Confidence interval with the Horvitz-Thompson estimator and variance estimator with between-block bias.

CI_ht_wb

Confidence interval with the Horvitz-Thompson estimator and variance estimator with within-block bias.

CI_haj_bb

Confidence interval with the Hajek estimator and variance estimator with between-block bias.

CI_haj_wb

Confidence interval with the Hajek estimator and variance estimator with within-block bias.

yht

The Horvitz-Thompson estimator for each treatment.

yhaj

The Hajek estimator for each treatment.

Sht_bb

Covariance estimator for the Horvitz-Thompson estimator for each treatment with between-block bias.

Sht_wb

Covariance estimator for the Horvitz-Thompson estimator for each treatment with within-block bias.

Shaj_bb

Covariance estimator for the Hajek estimator for each treatment with between-block bias.

Shaj_wb

Covariance estimator for the Hajek estimator for each treatment with within-block bias.

alpha

Confidence level

References

Koo, T., Pashley, N.E. (2024), Design-based Causal Inference for Incomplete Block Designs, arXiv preprint arXiv:2405.19312.

Examples

K <- 6
n.trt <- 3
t <- 2
n.vec <- rep(4, K)
df <- IBDgen(K = K, n.trt = n.trt, t = t, n.vec = n.vec)$blk_assign
df$y <- rnorm(nrow(df), 0, 1)
IBDInfer <- IBDInfer(y = y, b = blk_id, z = assign, g = c(1, -1, 0), w = "Block", data = df)


Generating Incomplete Block Designs

Description

Generate incomplete block designs.

Usage

IBDgen(K, n.trt, t, n.vec = NULL, L = NULL, l = NULL, W = NULL, balanced = T)

Arguments

K

The number of blocks.

n.trt

The number of whole treatments.

t

The number of treatments to be assigned to each block.

n.vec

The vector of block sizes.

L

The vector of the number of blocks having each treatment.

l

The matrix of the number of blocks having each pair of treatments.

W

The set of treatment subsets used in the design.

balanced

Whether the design is balanced or not. If TRUE, generate a balanced design.

Value

A list containing the following components:

W

The set of treatment subsets used in the design.

W.uniq

The unique set of treatment subsets used in the design with proportion in W.

Rk

The block assignment matrix.

blk_assign

The block assignment data frame.

References

Sailer, M. O., & Bornkamp, M. B. (2022). Package ‘crossdes’: Construction of Crossover Designs.

Examples

K <- 6
n.trt <- 3
t <- 2
n.vec <- rep(4, K)
IBDgen(K = K, n.trt = n.trt, t = t, n.vec = n.vec)


Global Variables for IBDInfer

Description

This section declares global variables used in the IBDInfer package to prevent R CMD check warnings.


Summary of IBD

Description

Summary function for IBDInfer

Usage

## S3 method for class 'IBD'
summary(object, ...)

Value

No return value, called for summary.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.