NEWS
optic 1.3.0
Breaking changes
- The
autoeffect package is renamed to causalAR, so optic_model() now takes type = "causalAR" and call = "causalAR". The old "autoeffect" strings are no longer accepted and error out as invalid types. Requires causalAR >= 0.3.0.
optic 1.2.8
Improvements
- The power analysis vignette now includes an "Examining other metrics of performance" section showing bias, simulation variance, model-based variance, relative RMSE, and coverage curves alongside the existing power curves, and the summary chunk now uses
summarize_simulation() directly to demonstrate the full set of metrics it returns. Bias and RMSE are reported as a percentage of the outcome mean.
summarize_simulation() now falls back to an uncorrected 95% CI when no t-statistics are available, so coverage and correct_rejection_rate are populated for methods like ASCM and CSA whose default inference does not produce a t-statistic.
Bug fixes
sim_correction_factor(), sim_coverage(), and sim_correct_rejection_rate() now return NA_real_ (rather than numeric(0)) when no test statistics are available, replacing a confusing zero-length result with an explicit missing value.
optic 1.2.7
Internal changes
- Updated the causalAR result extractors (
.extract_results_causal_ar and .se_adjust_cluster_causal_ar) to read the renamed tidymodels-style columns from causalAR::cumulative_effects() (lag, estimate, std.error, statistic, p.value). Requires causalAR >= 0.2.11. (#43)
optic 1.2.6
Bug fixes
optic_simulation() now stops early with an informative message when the input data contains NAs in any required column: unit_var, time_var, the outcome (formula LHS) of any model, or any covariate (formula RHS minus treatment-construct terms) referenced by any model. Treatment columns are excluded because they are simulated by optic. This replaces a class of cryptic downstream errors (e.g. causalAR's "spec_strategy out of sync" message) with a single upfront error that names the offending columns. (#41)
optic 1.2.5
New features
- Added a power analysis vignette demonstrating simulation-based power analysis for TWFE, debiased AR, ASCM, and CSA estimators using the
overdoses dataset. Adds augsynth and ggplot2 to Suggests. (#40)
optic 1.2.4
New features
- Added simulation performance statistics functions:
sim_rejection_rate(), sim_bias(), sim_mse(), sim_correction_factor(), sim_coverage(), sim_type_s_error(), sim_correct_rejection_rate(), and summarize_simulation() for computing Type I error, power, bias, coverage, and related metrics from Monte Carlo simulation output.
optic 1.2.3
Bug fixes
- causalAR model p-values now use the t-distribution (via
cumulative_effects()) instead of manually computing with the normal distribution. This fixes inflated Type I error rates for DAR models. (#38)
optic 1.2.2
New features
- Clustered standard error support for causalAR models, delegating to
causalAR::cumulative_effects(cluster=). Unsupported SE adjustments (huber, arellano) now warn and skip. (#37)
Internal changes
- Moved SE adjustment behavior into the model type registry, replacing if-else chain in
noconf_postmodel(). (#37)
optic 1.2.1
Improvements
- causalAR models now extract covariates from the formula RHS like reg/autoreg models, eliminating separate
x_formula or cov_names parameters. Deprecation warnings added for the old interface. (#36)
Internal changes
- Restored
match.arg() for type and call validation in new_optic_model() constructor. (#35)
optic 1.2.0
New features
- Added causalAR model type support for debiased autoregressive treatment effect estimation. New model type
"causalAR" integrates with the causalAR package. (#34)