get_functions: Get estimates, estimands, assignment vectors, or samples from...

Description Usage Arguments Examples

Description

Get estimates, estimands, assignment vectors, or samples from a design given data

Usage

1
2
3
4
5
get_estimates(design, data = NULL, start = 1, end = length(design))

draw_assignment(design, data = NULL, start = 1, end = length(design))

draw_sample(design, data = NULL, start = 1, end = length(design))

Arguments

design

A design object, typically created using the + operator

data

A data.frame object with sufficient information to get the data, estimates, estimands, an assignment vector, or a sample.

start

(Defaults to 1) a scalar indicating which step in the design to begin with. By default all data steps are drawn, from step 1 to the last step of the design.

end

(Defaults to length(design)) a scalar indicating which step in the design to finish with.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
design <- declare_population(N = 100, u = rnorm(N)) +
  declare_potential_outcomes(Y ~ Z + u) +
  declare_estimand(ATE = mean(Y_Z_1 - Y_Z_0)) +
  declare_sampling(n = 75) +
  declare_assignment(m = 50) +
  declare_reveal(Y, Z) +
  declare_estimator(Y ~ Z, estimand = "ATE")

dat <- draw_data(design)

draw_data(design, data = dat, start = 2)

get_estimates(design, data = dat)

draw_assignment(design, data = dat)

draw_sample(design, data = dat)

DeclareDesign/ddoldversion documentation built on Oct. 30, 2019, 5:17 p.m.