Main estimator for patterned sensitivity analysis of exclusion violations in fixed-effect or residualized IV designs.
Usage
plausexog(
formula,
data,
fe = NULL,
fe_engine = c("fixest", "lfe"),
vcov = c("iid", "hc1", "cluster"),
cluster = NULL,
method = c("ltz", "uci", "bpe"),
prior = NULL,
delta = NULL,
violation_pattern = NULL,
bpe = FALSE,
bpe_design = NULL,
bpe_spec = list(design = NULL, subset = NULL, z_names = NULL),
bpe_kappa = 1,
bpe_omega = NULL,
bpe_min_n_S = 2000,
bpe_min_clusters_S = 30,
bpe_max_F_S = NULL,
bpe_min_varZ_S = 1e-06,
bpe_equiv_margin = NULL,
bpe_equiv_level = 0.95,
bpe_transport = c("sampling", "none", "conservative"),
bpe_transport_kappa = 0,
bpe_not_applicable = c("na", "error"),
scale_instrument = c("residual_sd", "none"),
grid = list(),
...
)
plausexog_iv(...)
spliv(
formula,
data,
fe = NULL,
fe_engine = c("fixest", "lfe"),
vcov = c("iid", "hc1", "cluster"),
cluster = NULL,
method = c("ltz", "uci", "bpe"),
prior = NULL,
delta = NULL,
violation_pattern = NULL,
bpe = FALSE,
bpe_design = NULL,
bpe_spec = list(design = NULL, subset = NULL, z_names = NULL),
bpe_kappa = 1,
bpe_omega = NULL,
bpe_min_n_S = 2000,
bpe_min_clusters_S = 30,
bpe_max_F_S = NULL,
bpe_min_varZ_S = 1e-06,
bpe_equiv_margin = NULL,
bpe_equiv_level = 0.95,
bpe_transport = c("sampling", "none", "conservative"),
bpe_transport_kappa = 0,
bpe_not_applicable = c("na", "error"),
scale_instrument = c("residual_sd", "none"),
grid = list(),
...
)Arguments
- formula
IV formula
y ~ X | Z.- data
Data frame.
- fe
Optional one-sided formula of fixed effects.
- fe_engine
FE demeaning engine, one of
"fixest"or"lfe".- vcov
One of
"iid","hc1", or"cluster".- cluster
Cluster ids or one-sided formula, required when
vcov = "cluster".- method
One of
"ltz","uci", or"bpe".- prior
Optional prior list with
muandOmega(oromega) for LTZ. Whenviolation_patternis supplied, patterned LTZ currently requires a scalar prior over the pattern coefficient.- delta
Optional non-negative scalar sensitivity magnitude. With
method = "uci",deltaimplies theta bounds[-delta, +delta]unless explicit bounds are supplied ingrid. Withmethod = "ltz"and no explicitprior,deltainduces a zero-mean normal LTZ prior.- violation_pattern
Optional
spliv_pattern()object describing how the direct effect of the instrument may vary across observations. If omitted, LTZ/UCI retain the package's backward-compatible uniform direct-effect behavior. This argument is currently supported for LTZ and UCI, but not for confirmatory BPE.- bpe
Logical; when
TRUE, learn prior moments from a confirmatorybpe_design()and run LTZ.- bpe_design
Optional
bpe_design()object for confirmatory BPE.- bpe_spec
Optional list. Prefer
bpe_spec = list(design = my_design). For backward compatibility,bpe_spec$subsetmay also be supplied, but it must represent an explicit researcher-supplied subset and should be paired with a non-emptyrationale, explicitpre_specified = TRUE, and any relevant metadata such asvariables_usedorsubset_type. Supply exactly one confirmatory subset source:bpe_design,bpe_spec$design, orbpe_spec$subset. Exploratorysubset_ruleinputs are not accepted for confirmatory estimation.- bpe_kappa
Positive scalar multiplier applied to the confirmatory BPE covariance after transport adjustment.
- bpe_omega
Deprecated. Confirmatory BPE now uses the full reduced-form covariance from the subset together with
bpe_transport.- bpe_min_n_S
Minimum subset size required for BPE eligibility. Default
2000.- bpe_min_clusters_S
Minimum number of clusters required in subset
Swhenvcov = "cluster". Default30.- bpe_max_F_S
Deprecated. The first-stage F-statistic is reported for diagnostics only and no longer determines confirmatory BPE eligibility.
- bpe_min_varZ_S
Minimum residualized instrument variance required in subset
S. Default1e-6.- bpe_equiv_margin
Researcher-specified first-stage equivalence margin. Confirmatory BPE currently supports exactly one instrument.
- bpe_equiv_level
Confidence level for the first-stage equivalence check.
- bpe_transport
One of
"none","sampling", or"conservative".- bpe_transport_kappa
Non-negative scalar controlling the conservative transport covariance inflation.
- bpe_not_applicable
Behavior when subset diagnostics fail. One of
"na"(default) to return NA estimates, or"error"to stop.- scale_instrument
One of
"residual_sd"(default) or"none".- grid
List controlling UCI bounds or other tuning parameters. For backward-compatible scalar UCI, if
grid$deltais supplied andgrid$gmin/grid$gmaxare omitted, the package interpretsdeltaas a direct-effect bound of[-delta, +delta]under the chosenscale_instrument. Whenviolation_patternis supplied,grid$deltainstead refers to theta bounds over the pattern-scaled direct effect.- ...
Reserved.
Details
spliv implements patterned sensitivity analysis for exclusion violations in
IV designs with fixed effects or other residualization steps. Researchers can
supply a theoretically motivated spliv_pattern() object to specify where
direct effects of an instrument are expected to be larger or smaller, and the
package then scales LTZ/UCI sensitivity along that pattern.
The package does not estimate an unrestricted direct-effect field. Instead, researchers supply a structured pattern and ask whether conclusions survive direct effects scaled along that pattern.
In applied work, users should usually vary delta over a range with
spliv_sensitivity_path() rather than report one arbitrary sensitivity
value.
Patterned sensitivity currently supports one endogenous treatment, one excluded instrument, and one researcher-specified pattern at a time.
Confirmatory BPE is not a subgroup-search procedure. The researcher must
supply a pre-specified bpe_design() object, the package validates that
subset, and BPE proceeds only if the confirmatory eligibility checks pass.
The first-stage F-statistic is still reported for diagnostics, but confirmatory BPE eligibility is determined by the pre-specification checks, subset size, cluster count, residualized instrument variation, and a first-stage equivalence interval.
BPE reduced-form covariance is propagated as a full covariance matrix and can
optionally be inflated via bpe_transport.