diagnosis_helpers: Explore your design diagnosis

diagnosis_helpersR Documentation

Explore your design diagnosis

Description

Explore your design diagnosis

Usage

get_diagnosands(diagnosis)

get_simulations(diagnosis)

Arguments

diagnosis

A design diagnosis created by diagnose_design.

Examples

design <- 
  declare_model(
    N = 500, 
    U = rnorm(N),
    Y_Z_0 = U, 
    Y_Z_1 = U + rnorm(N, mean = 2, sd = 2)
  ) + 
  declare_assignment(Z = complete_ra(N)) + 
  declare_inquiry(ATE = mean(Y_Z_1 - Y_Z_0)) + 
  declare_measurement(Y = reveal_outcomes(Y ~ Z)) +
  declare_estimator(Y ~ Z, inquiry = "ATE") 

## Not run: 
# using built-in defaults:
diagnosis <- diagnose_design(design)
diagnosis

## End(Not run)

# using a user-defined diagnosand
my_diagnosand <- declare_diagnosands(
  absolute_error = mean(abs(estimate - estimand)))

## Not run: 
diagnosis <- diagnose_design(design, diagnosands = my_diagnosand)
diagnosis

get_diagnosands(diagnosis)

get_simulations(diagnosis)

reshape_diagnosis(diagnosis)


## End(Not run)


DeclareDesign documentation built on June 21, 2022, 1:05 a.m.