| estimand | R Documentation |
Computes a post-hoc estimand from a fect fit, with bootstrap or
jackknife uncertainty. The type argument selects from a closed
enum of mathematically-defined estimands; the by argument
selects the grouping axis. The accessor imputed_outcomes
is the underlying long-form data source for any estimand the
dispatcher does not ship natively.
estimand(
fit,
type = c("att", "att.cumu", "aptt", "log.att"),
by = c("event.time", "cohort", "calendar.time", "overall"),
cells = NULL,
weights = NULL,
window = NULL,
direction = c("on", "off"),
vartype = c("bootstrap", "jackknife", "parametric", "none"),
conf.level = 0.95,
ci.method = c("basic", "percentile")
)
fit |
A |
type |
Estimand type. |
by |
Grouping axis. One of |
cells |
Optional filter on which treated cells to include.
Accepts |
weights |
Aggregation-weight handling. |
window |
Optional event-time window |
direction |
Either |
vartype |
|
conf.level |
Two-sided confidence level. Defaults to 0.95. |
ci.method |
|
A data frame with columns <by_key>, estimate, se,
ci.lo, ci.hi, n_cells, and vartype.
Always tidy regardless of type or by.
estimand(fit, "att", "event.time") returns estimate,
se, ci.lo, ci.hi byte-identical to columns
ATT, S.E., CI.lower, CI.upper of
fit$est.att, when default arguments are used. This invariant
is asserted by package tests.
Chen, Jiafeng, and Jonathan Roth. 2024. "Logs with Zeros? Some Problems and Solutions." Quarterly Journal of Economics 139 (2): 891–936.
imputed_outcomes for the underlying long-form accessor;
fect for the fitting interface.
## Not run:
library(fect)
fit <- fect(Y ~ D, data = simdata, index = c("id", "time"),
method = "fe", force = "two-way",
se = TRUE, nboots = 200, parallel = FALSE)
## Default: per-event-time ATT (matches fit$est.att numerically).
est <- estimand(fit, "att", "event.time")
head(est)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.