Options reference

Guide for cdid 1.3.0.0 (R). Recorded examples retain their stated versions.

On this page

Find the defaults and allowed values for each argument. Use the help topics in R for examples, or follow the links to the worked examples in this guide.

Signatures

For a complete example, see Get started.

cdid::att_gt(
  yname, tname, idname = NULL, gname, xformla = NULL, data,
  panel = TRUE, allow_unbalanced_panel = NULL,
  control_group = c("nevertreated", "notyettreated"), anticipation = 0,
  weightsname = NULL, fix_weights = NULL, alp = 0.05, bstrap = TRUE,
  cband = TRUE, biters = 1000, clustervars = NULL, est_method = "dr",
  base_period = "varying", faster_mode = TRUE, print_details = FALSE,
  pl = FALSE, cores = 1, compute_inffunc = TRUE, ...,
  mode = NULL, frame = NULL, selection = "none",
  selection_model = "pair_logit", selection_pooling = "separate",
  selection_xformla = NULL, selection_universe = "F", selection_rho = NULL,
  selection_justification = NULL, selection_est_method = "ipw",
  imputation_pooling = "separate", gmm_weighting = c("optimal", "identity", "within"),
  gmm_covariance = "tikhonov", pt_assumption = c("post", "all", "ctrl"),
  pt_start = NULL, cross_pair = FALSE, control = NULL, outcome_pooling = "separate",
  dname = NULL, imputation_scale = "per_period",
  switchers = "both", switch_times = NULL, missing_reference = "exclude"
)

cdid::aggte(
  MP, type = "group", balance_e = NULL, min_e = -Inf, max_e = Inf,
  na.rm = FALSE, bstrap = NULL, biters = NULL, cband = NULL, alp = NULL,
  clustervars = NULL
)

cdid::chain_report(
  object, cohort = NULL, time = NULL, include_pre = FALSE, tol = 1e-10,
  group = NULL, t = NULL
)

cdid::conditional_did_pretest(
  yname, tname, idname = NULL, gname, xformla = NULL, data,
  panel = TRUE, allow_unbalanced_panel = NULL,
  control_group = c("nevertreated", "notyettreated"), weightsname = NULL,
  alp = 0.05, bstrap = TRUE, cband = TRUE, biters = 1000, clustervars = NULL,
  est_method = "ipw", print_details = FALSE, pl = FALSE, cores = 1,
  anticipation = 0, base_period = "varying", fix_weights = NULL,
  mode = NULL, frame = NULL, selection = "none",
  selection_model = "pair_logit", selection_pooling = "separate",
  selection_xformla = NULL, selection_universe = "F", selection_rho = NULL,
  selection_justification = NULL, selection_est_method = "ipw",
  imputation_pooling = "separate", control = NULL, outcome_pooling = "separate"
)

In att_gt(), arguments before ... retain the names and order of did 2.5.1. The deliberate default difference is allow_unbalanced_panel = NULL, which uses did’s FALSE in ordinary mode. The arguments after ... are used only in chained mode; ordinary mode neither evaluates nor forwards them.

Data, timing and comparison group

Argument Default Accepted values Notes for chained mode
yname required name of a numeric outcome column Observed values must be finite. Keep missing outcomes as NA.
tname required name of a finite numeric date column The stored calendar is the sorted set of dates present in the data. OR/imputation durations count positions in it; event time and anticipation cutoffs use numeric date values.
idname NULL name of the unit identifier column Required, because units are aligned by identity.
gname required (when dname = NULL) name of the column holding each unit’s first treatment period Known, constant within each panel unit. Use a finite positive treatment date on the time scale of tname, or 0 for never treated. The treatment date need not be a stored row. Retains the cohort ATT(g, t) route.
dname NULL NULL or name of a binary period treatment column ($D_{it} \in {0, 1}$) Binary switching model under no carryover (returns cdid_static_att_gt). In chained panel mode, selects the static route even if the binary treatment is absorbing; specifying both gname and dname is refused. Ordinary mode ignores static arguments. Requires complete known binary $D_{i,1:T}$ across all panel dates for every unit; units with zero or one observed outcome $Y_{it}$ remain in the study population and original-unit influence functions. See Static entry, exit and re-entry.
data required a data frame with one row per unit and date Each ID/date pair must be unique. A balanced panel and an observed reference-date outcome for every unit are not required. See Prepare your panel and Investigate missingness.
missing_reference "exclude" "exclude" or "error" When a required dated covariate is missing, warn and restrict comparisons for the affected cohort to units with known reference covariates. Choose "error" to stop and list missing inputs. See Add a known reference covariate row.
panel TRUE TRUE or FALSE Chained mode requires TRUE. With mode = NULL, FALSE selects ordinary mode.
allow_unbalanced_panel NULL NULL, TRUE or FALSE NULL retains the full unit table, including units with no observed change. Units with repeated observations supply changes. FALSE is refused. In ordinary mode NULL means did’s default FALSE.
control_group "nevertreated" "nevertreated" or "notyettreated"
anticipation 0 finite nonnegative whole number Sets each cohort’s reference period: the latest stored date d with d + anticipation < g.
weightsname NULL name of a column of positive sampling weights Weights that change within a unit need fix_weights, see Changing covariates and weights.
fix_weights NULL NULL, "first_period" or "base_period" "varying" is refused.

The unit table frame is described with the chained arguments and in Handling missing outcomes.

Treatment adjustment

Argument Default Accepted values Notes for chained mode
est_method "dr" "dr", "ipw", "reg" or a custom IPW function (cohort gname only) Any other string is refused before the data are read; nothing is substituted. On the static dname route, built-in "dr", "ipw" and "reg" are supported and custom function callbacks are refused.
outcome_pooling "separate" "separate" or "pooled" (plus explicit cell partitions on the static dname route) Counterfactual outcome-change regression for est_method = "reg" or "dr" (inactive and never evaluated when est_method = "ipw"). Separate fits have comparison-specific slopes; pooled fits share slopes across blocks with local intercepts. On the static dname route, an explicit named character vector (cell_id -> block_id) or named list of cell_id vectors partitioning transition cells (including optional extra non-target stayer training cells) is also accepted; explicit partitions are static-only. Independent of selection and imputation pooling.
xformla NULL one sided formula, such as ~ x1 + x2 The design must have at least one column: ~ 1 and ~ 0 + x are accepted, ~ 0 is refused. Covariates must be fixed within units or are read at reference dates.
... Passed to a custom est_method function; refused when est_method is a string or on the static dname route.

A custom function has did’s panel IPW interface f(y1, y0, D, covariates, i.weights, inffunc = TRUE, ...) and returns a list with a finite scalar ATT and a finite vector or one-column matrix att.inf.func with one entry per supplied row, in that order. Under observation weighting with selection = "conditional_mtar", it must also return log_weight_gradient. Treatment adjustment explains these requirements and the models behind the three string methods.

Chained arguments

Argument Default Accepted values Active when
mode NULL NULL, "chained" or "ordinary" Always. NULL selects chained mode for panel = TRUE and ordinary mode otherwise.
frame NULL the unit table: a data frame with one row per study unit, matched to data by idname Chained mode. Without it, the units in data form the study population.
selection "none" "none", "conditional_mtar", or the legacy name "corollary1" Chained mode. On the cohort gname route only, "corollary1" means "conditional_mtar" with selection_model = "pair_logit". Static dname accepts only "none" or "conditional_mtar".
selection_est_method "ipw" "ipw" (observation weighting), "imputation" (change imputation) or "dr" (augmented correction) "imputation" and "dr" require selection = "conditional_mtar" and a built-in est_method ("ipw", "reg" or "dr").
selection_model "pair_logit" "pair_logit" or "independent_period_logit" An active conditional-MTAR correction with selection_est_method equal to "ipw" or "dr". Never evaluated under "imputation". A nondefault value with selection = "none" is refused.
selection_pooling "separate" Cohort gname: "separate", "within_cohort" or "across_cohorts". Static dname: "separate", "within_group" or "pooled" As for selection_model. Local intercepts are retained per pair/date and cohort or role population whenever selection_xformla includes an intercept.
selection_xformla NULL, which inherits xformla one sided formula An observation model is fitted ("ipw" or "dr"). Never evaluated under "imputation".
selection_universe "F" "F" (whole unit table), "B" (units observed at least once) or "A" (units observed at least twice) "B" and "A" require observation weighting and selection_model = "pair_logit". Static transport is defined within each transition role.
selection_rho NULL NULL or the name of a column of known normalized density ratios For "A" or "B". The column is in the unit table for cohort models and in data for switching models.
selection_justification NULL a nonempty character string Required with "B" or "A". For switching models, the statement applies within each switcher and stayer group.
imputation_pooling "separate" Cohort gname: "separate", "within_cohort" or "across_cohorts". Static dname: "separate", "within_group" or "pooled" selection_est_method is "imputation" or "dr"; otherwise never evaluated. Local intercepts are retained when xformla includes an intercept.
imputation_scale "per_period" "per_period" or "per_change" Static dname route when selection_est_method is "imputation" or "dr"; otherwise never evaluated. "per_period" multiplies non-intercept covariate slopes by the stored-calendar index gap $L_k = u_{\text{idx}} - s_{\text{idx}}$; "per_change" leaves them unscaled.
switchers "both" "both", "entry" or "exit" Static dname route: selects both transition directions ($0 \to 1$ and $1 \to 0$), entry only ($D_{t-1} = 0 \to D_t = 1$), or exit only ($D_{t-1} = 1 \to D_t = 0$).
switch_times NULL NULL or a vector of panel transition dates in $t_2, \dots, t_T$ Static dname route: NULL automatically includes all transition cells in the requested direction(s) with at least one switcher ($n_{\text{switchers}} \ge 1$). Explicit dates retain all requested directions at those dates (keeping zero-switcher cells as available = FALSE with support_status = "empty_switchers").
gmm_weighting "optimal" "optimal", its alias "two_step", "identity" or "within" (cohort gname only) Chained mode (both cohort gname and static dname routes; on a complete panel with dname and selection = "none", all-pair chaining reduces to the direct complete-data baseline estimator with gmm_executed = FALSE). "within" requires a built-in est_method ("ipw", "reg" or "dr") and supports all selection, outcome_pooling, and reference-date covariate/weight options on the cohort route; it is inapplicable and refused on the static dname route.
gmm_covariance "tikhonov" "tikhonov" Validated in chained mode; the handler is used under covariance-whitened weighting ("optimal", or "within" on the cohort route).
pt_assumption "post" "post", "all" or "ctrl" Cohort gname route ("all" and "ctrl" are inapplicable and refused on the static dname route).
pt_start NULL one finite numeric date of the stored calendar (or NULL under "post" and "ctrl") Cohort gname route: required under "all"; optional under "ctrl" (NULL defaults to the earliest stored calendar date); refused under "post". A non-NULL value is refused on the static dname route.
cross_pair FALSE TRUE or FALSE Cohort gname route. TRUE separates target-cohort and clean control-cohort within-unit change moments; requires a built-in est_method ("ipw", "reg" or "dr") and supports all selection, outcome_pooling, and reference-date covariate/weight options. On the static dname route FALSE is accepted and TRUE is refused as inapplicable.
control NULL a named list, see The control list Chained mode (both cohort gname and static dname routes).

Handling missing outcomes

Handling missing outcomes explains the assumptions and models. The interface rules are these.

  • Formulas. xformla and selection_xformla are one sided formulas whose stats::terms intercept and assignment information is respected, including intercept only (~ 1) and no intercept (~ 0 + x) forms. Only selection_xformla accepts a design with no columns (~ 0); its observation model then has no parameters and uses the fixed probability 0.5 for each pair, or 0.25 for a product of two dates.
  • Observation weighting (selection_est_method = "ipw") fits selection_model with selection_pooling on the fitting sample selected by selection_universe. "independent_period_logit" requires selection_universe = "F" and the independence of the two dates given cohort and covariates.
  • Change imputation ("imputation") requires selection = "conditional_mtar", selection_universe = "F", selection_rho = NULL, known cohorts and complete xformla covariates on every row of the unit table, and est_method equal to "ipw", "reg" or "dr". It fits no observation model.
  • Augmented correction ("dr") has the requirements of change imputation, supports treatment IPW, OR or DR, needs complete covariates of both formulas on every row of the unit table and uses every observation model and imputation argument. Observation, imputation and counterfactual outcome pooling are independent choices.
  • Not supported: known pair probabilities (including a design probability of one), estimated or unnormalized transport ratios, and probit models.
Argument Default Meaning
pt_assumption "post" "post": parallel trends from each cohort’s reference period onward. "ctrl": adds common untreated trends among clean control cohorts $k > g$ from pt_start onward, leaving target cohort $g$’s own pre-reference trends free. "all": adds common untreated trends for both target and control cohorts from pt_start up to each reference period.
pt_start NULL Under "all", one finite numeric date that equals a stored calendar date exactly, common to all cohorts and chosen before looking at results (omitting it, NULL and dates outside the calendar are errors). Under "ctrl", NULL defaults to the earliest stored calendar date, or a finite numeric date in the stored calendar restricts control-cohort trend pooling to dates from pt_start onward. Under "post", any non-NULL value is refused.
base_period "varying" Reporting of cells before treatment, with did’s meaning: "varying" compares each stored period after the first with the preceding stored period; "universal" compares every preperiod with the reference period, including its exact-zero reference cell. Independent of pt_assumption.
anticipation 0 A nonnegative whole number used in the numeric-date cutoff d + anticipation < g; it moves the reference period back. This is not the stored-index duration of the outcome models.

Parallel trends and Cross-pair chaining and control parallel trends explain PT-post, PT-ctrl, PT-all and the cases where PT-ctrl or PT-all adds no restriction.

GMM weighting and covariance regularization

Chained mode combines the available comparisons by GMM. gmm_weighting = "optimal", the default, uses feasible two step weighting based on the estimated covariance of the comparisons; "two_step" is an alias for it. gmm_weighting = "identity" requests unweighted estimation explicitly. gmm_weighting = "within" weights moments by the inverse of the analytical covariance of within-unit changes under uncorrelated level shocks. Inference uses complete unit-level influence functions. See Cross-pair chaining for the matched regression specification. Identity weighting is never substituted automatically.

Before the covariance is checked, the package applies exact reductions that remove proven redundancies among the comparisons. When the reduced covariance is well conditioned, it is used as it is. When it is singular or nearly singular, judged by the ratio of its smallest to its largest eigenvalue, or when it is known to be rank deficient or its Cholesky factorization fails, the selected handler gmm_covariance = "tikhonov" adds a ridge proportional to the trace of the reduced covariance before it is inverted for the weights. At exactly zero covariance the criterion is full-catalog least squares with the actual zero sandwich variance. Invalid or materially indefinite covariance inputs still refuse. No comparison, unit or identified contrast is dropped. "tikhonov" is the only accepted value of gmm_covariance. The weighting request, whether the handler was invoked and why, its tuning and the conditioning are recorded in fit$chained$covariance_handling. The advanced entries condition_trigger and ridge_relative of the control list belong to this step.

Covariance regularization affects only how comparisons are weighted. It supplies no identifying information: an effect that the comparisons cannot identify remains unavailable. Standard errors and bands always use the complete influence functions and the sandwich variance, never the inverse of the regularized matrix. Feasible weighting does not make the estimates unbiased in finite samples.

Inference and computation

Argument Default Meaning in chained mode
alp 0.05 Significance level of intervals and bands.
bstrap TRUE Standard errors from multiplier bootstrap draws instead of analytical ones.
cband TRUE Simultaneous band over the available cells where requested.
biters 1000 Number of multiplier draws.
clustervars NULL At most one cluster variable in addition to idname, with a label for every unit of the unit table. Clustering changes standard errors and bands; the point estimates stay the same.
compute_inffunc TRUE FALSE returns point estimates only, which equal those of TRUE: no influence functions, standard errors, bands or pretrend test, and aggte() refuses the result.
pl, cores FALSE, 1 pl = TRUE, cores = k computes the multiplier draw products on k worker processes, which must be declared with control = list(workers = k); otherwise the request is refused before the data are read. Signs are drawn in your session, so the results equal those of cores = 1. Estimation itself stays serial.
print_details FALSE TRUE reports progress through messages.
faster_mode TRUE Accepted with did’s meaning; chained mode has one computation engine.

The exact combinations of bstrap and cband at each output are listed in the results reference.

The control list

control is an advanced list used only in chained mode. NULL and an empty list give the defaults below, which the result records.

Entry Default Meaning
numeric_workspace_bytes 1073741824 (1 GiB) Admission limit for the counted numeric workspace of a fit.
workers 1 Number of worker processes that pl = TRUE, cores = k may use for multiplier draws. It is never raised automatically, and the workers' buffers count against the same workspace.
counted_work_limit Inf The estimated work cap is off by default. A finite positive whole number refuses, before a stage runs, a fit whose conservative work estimate exceeds it; an explicit Inf also turns it off. Zero, negative, NA and NaN values, numbers that are not whole, values out of range and nonnumeric values are refused.
chunk_rows chosen automatically Number of rows per processing chunk.
condition_trigger 1e-10 Finite, strictly between zero and one; used by the covariance regularization step.
ridge_relative 1e-4 Finite and positive; used by the covariance regularization step.

For the linear cohort-by-date model, set control = list(preset = "cohort_time_fe"). See the cohort-by-date guide for the two control groups, supported date and weight setup, and the treatment and observation adjustments. The preset also accepts keep_nuisance for coefficient reporting.

Unknown entries are refused. The opt-in reporting flag keep_nuisance (TRUE or FALSE, default FALSE) is validated and removed before these checks; it keeps the capture read by nuisance_models() for supported fits on the cohort and static routes. The entry relative_accuracy is refused with class cdid_chained_public_accuracy_deferred, because a guaranteed accuracy for each fit is not provided. The fitted result records the public cap and the internal arithmetic ceiling separately, in fit$chained$public$counted_work_limit and fit$chained$public$work_cap.

Work estimates are conservative diagnostics, not measured run time. These controls limit counted numeric storage and estimated work; they do not limit the memory of the R process, CPU time or the work of a whole call, and the package does not detect the memory or speed of your machine.

Supported combinations

With selection = "conditional_mtar", all nine built-in combinations of treatment adjustment and adjustment for missing outcomes are supported. The qualified custom IPW extension is listed separately in the last row:

est_method selection_est_method = "ipw" "imputation" "dr"
"ipw" supported supported supported
"reg" supported supported supported
"dr" supported supported supported
custom IPW function supported with log_weight_gradient refused refused

With selection = "none", selection_est_method stays at "ipw" and all of "ipw", "reg", "dr" and a custom function (cohort gname route) are supported. On the static dname route, selection = "none" runs the baseline no-equation estimator (using the direct complete-data kernel static_complete_fit when all outcomes are observed, and chained GMM static_missing_fit when outcomes are missing) and selection = "conditional_mtar" supports all nine built-in combinations of est_method ("ipw", "reg", "dr") and selection_est_method ("ipw", "imputation", "dr"). selection_universe = "B" or "A" is available in the first column with selection_model = "pair_logit". The static route requires a transport justification within switcher and stayer roles. Refused requests stop with an error before estimation; no other combination is substituted. See Static entry, exit and re-entry for the static dname route details.

Changing covariates and weights

Covariates and sampling weights that are constant within each unit and agree with the unit table pass the usual checks and are used as unit characteristics. For such calls, fix_weights = NULL, "first_period" and "base_period" give identical results.

Weights that change within a unit require a fixed reference:

  • "first_period": every comparison uses each unit’s weight at the first stored date.
  • "base_period": every unit in the comparisons for cohort g, controls included, uses its weight at the cohort’s reference period.
  • NULL would mean weights specific to each date, as in did, and is refused.

Covariates that change within a unit, or a formula that uses the time variable, are read at reference dates, following did’s convention of using covariate values from the base period of each comparison. Every comparison used for the effects of cohort g reads each unit’s values at the cohort’s reference period, and a comparison reported before treatment reads them at its earlier date. Values come only from the actual unit and date rows, including rows whose outcome is missing, and are required only where an estimate reads them. When a required value is missing, the default warns and limits the affected cohort to units with known reference covariates. The input must supply the actual value at the relevant date, including for outcomes recorded as NA. This handling is available with every chained method, with or without corrections for missing outcomes.

Aggregation of these fits weights cohorts by their masses at the first stored date, and the standard errors include the uncertainty of these shares. Units never treated need no weight at that date. A share-dependent aggregate is unavailable when a required treated-cohort first-date mass is incomplete, with the unit identifiers recorded. One-cohort bins and a one-bin group overall summary cancel the shares exactly and do not require that mass. With "base_period", each cell keeps the weights of its own cohort’s comparisons, so an aggregate is a declared mixture of cohort effects and does not describe a single weighted population.

Aggregation arguments

Argument Default Meaning for chained results
MP required A cohort result of att_gt() (cdid_MP or MP). Chained cohort results are aggregated from their stored state without refitting; ordinary results go to did::aggte() unchanged. Static cdid_static_att_gt results (dname route) store their switcher-frequency weighted aggregate directly in fit$aggregate and are refused by aggte().
type "group" "simple", "group", "dynamic" or "calendar".
balance_e, min_e, max_e NULL, -Inf, Inf Event time selectors with did’s conventions. For the calendar type they are ignored with did’s warning. The result records how they were applied.
na.rm FALSE FALSE: an aggregate that needs an unavailable cell is NA, and the missing cells are named. TRUE: the aggregate is computed over the available cells and labelled as a restricted target.
bstrap, biters, cband, alp, clustervars NULL NULL inherits the value used by att_gt(). An explicit value overrides it with did’s meaning. A cluster override that cannot be honored is refused.

Selector details matter: simple and group aggregation use only max_e, measured on the sorted union of calendar and cohort dates; min_e and balance_e have no effect there. Dynamic aggregation uses e = t - g in original date units and applies its window and cohort-balance rules. Calendar aggregation ignores all three selectors with a warning. These selectors change the reported target, not the fitted comparison catalog.

A result fitted with compute_inffunc = FALSE is refused with class cdid_chained_request_no_inffunc_error. Multiplier draws use your session’s random number stream, so set.seed() before the call reproduces them, and workers admitted by the fit are reused.

Conditional pretrend test arguments

conditional_did_pretest() keeps did’s 19 arguments in order and appends the chained settings it needs. For panel data, mode = NULL runs the chained conditional test; mode = "ordinary" and repeated cross sections go to did::conditional_did_pretest().

Argument Meaning in chained mode
est_method "ipw" (default), "reg" or "dr". A custom function returns a result with status "not_applicable".
xformla Its design columns are the coordinates of the test; variables that appear only in selection_xformla are not.
bstrap, cband Validated only. The test always uses multiplier draws and reports no standard errors.
biters, alp Number of multiplier draws and level of the reported critical value.
pl, cores Parallel draws when control$workers declares them; results equal those of cores = 1.
anticipation, base_period, fix_weights, frame, the selection arguments, imputation_pooling, outcome_pooling, control The chained settings of att_gt(), with the same meanings; they select the fitted route whose comparisons before treatment are tested.

GMM weighting, cross_pair and the parallel-trends settings are not arguments of the test.

Chain inspection arguments

chain_report() inspects the identification paths and moment combination weights stored in a chained att_gt() result (cdid_MP), without refitting.

Argument Default Meaning
object required A cdid_MP result produced by att_gt() in chained mode.
cohort, group NULL Optional numeric vector of treatment cohorts to filter on (supply at most one).
time, t NULL Optional numeric vector of calendar periods to filter on (supply at most one).
include_pre FALSE When FALSE and time/t is NULL, only post-treatment cells are included.
tol 1e-10 Nonnegative threshold below which near-zero GMM moment weights are omitted from the active weight table.

Refusals

The class names below let scripts distinguish errors. For guidance on what to check, see Troubleshooting.

Refusals are errors that inherit class cdid_error. The most common classes are:

Class Cause
cdid_mode_error invalid mode, or invalid panel while resolving mode = NULL
cdid_chained_panel chained mode with panel not equal to TRUE
cdid_chained_balanced explicit allow_unbalanced_panel = FALSE in chained mode
cdid_chained_unavailable an unsupported request, such as an unknown est_method string (also cdid_chained_request_est_method)
cdid_chained_request_unsupported_selection an unsupported missing-outcome correction, including custom callbacks with change imputation or the augmented correction
cdid_chained_request_* other unsupported requests or inputs, for example invalid pt_start values
cdid_chained_request_parallel_error pl = TRUE, cores = k beyond the declared control$workers
cdid_chained_public_control_error an invalid control list
cdid_custom_ipw_error malformed or nonfinite output of a custom IPW function
cdid_chained_request_no_inffunc_error aggte() on a result fitted with compute_inffunc = FALSE
cdid_static_* / cdid_static_error invalid static dname request (for example missing binary treatment values, inapplicable cohort options, invalid switchers, switch_times, imputation_scale or outcome_pooling partition)
cdid_untested_upstream loading the package with did older than 2.5.1 or DRDID older than 1.4.0

aggte() on a static result gives the upstream error that an MP object is required. Use fit$aggregate for the static switcher-weighted average.

Fits can also stop because a numeric workspace or work limit would be exceeded, or because a model fit, covariance or solve is invalid. Such failures concern the computation; they are not conclusions about whether an effect is identified in the population. Nothing is dropped or relaxed to make a fit succeed.

Tested versions and dependencies

The package requires R 4.1 or later, did 2.5.1 or later and DRDID 1.4.0 or later. Install these dependencies from CRAN. See the installation instructions.


Reading path, step 18 of 22 · Previous: Inference · Next: Results

All steps of the reading path
Step Page
1 Get started
2 Moving from did
3 Incomplete panels
4 Identify effects when the observed units change composition
5 How to compare precision
6 Prepare your panel and unit table
7 Treatment adjustment
8 Choose IPW, OR or DR in an incomplete panel
9 Handling missing outcomes
10 Sampling information for the observation model
11 Choose an observation model
12 Impute actual changes
13 Parallel trends
14 Add PT-all restrictions
15 GMM weighting and covariance regularization
16 Robustness
17 Inference
18 Options (this page)
19 Results
20 Diagnose errors and unavailable results
21 Cross-pair chaining and control parallel trends
22 Short pre-treatment windows
— Static entry, exit and re-entry (dname route)

Guide home · Package overview

View this page at its source version · Report a problem