Deprecated in 2.0. Stores diagnosands as an attribute on design, which
diagnose_design() uses in place of the defaults when present. Pass the
diagnosands to the diagnosis instead:
diagnose_design(design, diagnosands = ...).
Usage
set_diagnosands(design, diagnosands = default_diagnosands())Arguments
- design
(required) A
design.- diagnosands
(optional) A diagnosands
design_step. Defaults todefault_diagnosands().
Details
Two reasons, beyond diagnosis not being a feature of a design. The
attribute does not survive redesign(), so anything attached this way is
silently gone the first time a parameter moves, and the defaults that
replace it may not be computable from the estimator's output. And a
diagnosands object replaces the default set rather than adding to it, so
declaring one diagnosand drops the other six without saying so.
See also
Other diagnosands:
declare_diagnosands(),
default_diagnosands(),
format.diagnosis(),
select_diagnosands()
Examples
design <-
declare_model(N = 30, Y = rnorm(N)) +
declare_inquiry(mu = mean(Y)) +
declare_estimator(Y ~ 1, .method = lm, term = "(Intercept)", inquiry = "mu")
# instead of set_diagnosands(design, ...)
diagnose_design(
design,
diagnosands = declare_diagnosands(mean_estimate = mean(estimate, na.rm = TRUE)),
sims = 5,
bootstrap_sims = 0
)
#> Research design diagnosis
#> 5 simulations
#>
#> Design Inquiry Estimator Term N Sims Mean Estimate
#> design mu estimator (Intercept) 5 -0.06