diagnosis_helpers: Explore your design diagnosis

Description Usage Arguments Examples

Description

Explore your design diagnosis

Usage

1
2
3
get_diagnosands(diagnosis)

get_simulations(diagnosis)

Arguments

diagnosis

A design diagnosis created by diagnose_design.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
my_population <- declare_population(N = 500, noise = rnorm(N))

my_potential_outcomes <- declare_potential_outcomes(
  Y_Z_0 = noise, Y_Z_1 = noise +
  rnorm(N, mean = 2, sd = 2))

my_assignment <- declare_assignment()

my_estimand <- declare_estimand(ATE = mean(Y_Z_1 - Y_Z_0))

my_estimator <- declare_estimator(Y ~ Z, estimand = my_estimand)

my_reveal <- declare_reveal()

design <- declare_design(my_population,
                         my_potential_outcomes,
                         my_estimand,
                         my_assignment,
                         my_reveal,
                         my_estimator)

## 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(est - estimand)))

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

get_diagnosands(diagnosis)

get_simulations(diagnosis)


## End(Not run)

graemeblair/DeclareDesign documentation built on May 8, 2018, 1:24 p.m.