pkg_architecture

library(rsmart)

The goal of this vignette is to help users understand the overall structure of the rsmart package. While the ‘Reference’ page on the pkgdown website is helpful for examining functions individually, we want to provide a high-level view of the package’s conceptual structure.

The rsmart package has 3 user-facing functions, along with a hierarchy of internal helpers. These functions can be organized into five conceptual groups, each of which we will unpack here in this vignette.

1. User-Facing Entry Points

2. Nuisance Parameter Estimation (called by iaipwe)

These are called first inside iaipwe() to estimate the building blocks:

3. Value Estimation (called by iaipwe)

4. Sandwich Variance — \(B_n\) (empirical variance of estimating equations)

get_bn() assembles \(\Psi_i \Psi_i^T / n\) by collecting individual-level estimating equation contributions:

5. Sandwich Variance — \(A_n\) (derivative of estimating equations)

get_an() assembles \(-\partial\Psi/\partial\theta\) by collecting derivatives:

6. Trial Design Utilities (standalone)