DeclareDesign (version 0.12.0)

set_diagnosands: Set the diagnosands for a design

Description

A researcher often has a set of diagnosands in mind to appropriately assess the quality of a design. set_diagnosands sets the default diagnosands for a design, so that later readers can assess the design on the same terms as the original author. Readers can also use diagnose_design to diagnose the design using any other set of diagnosands.

Usage

set_diagnosands(design, diagnosands = default_diagnosands)

Arguments

design

A design typically created using the + operator

diagnosands

A set of diagnosands created by declare_diagnosands

Value

a design object with a diagnosand attribute

Examples

Run this code
# NOT RUN {
design <-
declare_population(data = sleep) +
  declare_estimand(mean_outcome = mean(extra)) +
  declare_sampling(n = 10) +
  declare_estimator(extra ~ 1, estimand = "mean_outcome",
     term = '(Intercept)', model = lm_robust)

diagnosands <- declare_diagnosands(
  median_bias = median(estimate - estimand), keep_defaults = FALSE)

design <- set_diagnosands(design, diagnosands)

# }
# NOT RUN {
diagnose_design(design)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace