Running examples in ‘DeclareDesign-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: declare_estimand
> ### Title: Declare estimand
> ### Aliases: declare_estimand declare_estimands estimand_handler
> 
> ### ** Examples
> 
> 
> # Set up a design stub for use in examples:
> 
> my_population  <- declare_population(N = 100, X = rnorm(N))
> my_potential_outcomes  <- declare_potential_outcomes(
+   Y ~ (.25 + X) * Z + rnorm(N))
> my_assignment  <- declare_assignment(m = 50)
> design_stub <- my_population + my_potential_outcomes + my_assignment + 
+   declare_reveal()
> 
> # Get example data to compute estimands on
> dat <- draw_data(design_stub)
> 
> # ----------
> # 1. Single estimand
> # ----------
> 
> # Declare an average treatment effect (ATE) estimand
> 
> my_estimand_ATE <- declare_estimand(ATE = mean(Y_Z_1 - Y_Z_0))
> my_estimand_ATE(dat)
  estimand_label  estimand
1            ATE 0.5003669
> 
> # or a conditional estimand
> 
> my_estimand_ATT <- declare_estimand(ATT = mean(Y_Z_1 - Y_Z_0),
+                                     subset = (Z == 1))
> my_estimand_ATT (dat)
  estimand_label  estimand
1            ATT 0.2566042
> 
> # Add estimands to a design along with estimators that reference them
> 
> my_estimator <- declare_estimator(Y ~ Z, 
+   estimand = my_estimand_ATE, label = "estimator")
> 
> design_one <- design_stub + my_estimand_ATE + my_estimator
> 
> get_estimands(design_one)
  estimand_label  estimand
1            ATE 0.1529968
> 
> # ----------
> # 2. Multiple estimands
> # ----------
> 
> # You can also specify multiple estimands for a single estimator 
> 
> # With multiple estimands, you can use one estimator for both...
> 
> my_estimator_two <- declare_estimator(Y ~ Z,
+   estimand = c(my_estimand_ATE, my_estimand_ATT))
> 
> design_two <- design_stub + my_estimand_ATE + 
+   my_estimand_ATT + my_estimator_two
> 
> get_estimands(design_two)
  estimand_label  estimand
1            ATE 0.2496322
2            ATT 0.3383022
> 
> # ----------
> # 3. Paired estimands / estimators from a single model
> # ----------
> 
> # For convenience you can also declare multiple estimands
> # simultaneously and connect these to the corresponding 
> # terms for estimates used in the mode. 
> 
> # Name your estimands the term name they get in your
> # estimator, and set `term = TRUE`
> 
> estimands_regression <- declare_estimand(
+   `(Intercept)` = mean(Y_Z_0),
+   `Z` = mean(Y_Z_1 - Y_Z_0),
+   term = TRUE,
+   label="Regression_Estimands"
+ )
> 
> # For the model based estimator, specify the estimand as usual,
> # but also set `term = TRUE`
> estimators_regression <- declare_estimator(
+   Y ~ Z,
+   estimand = estimands_regression,
+   model = lm,
+   term = TRUE
+ )
> 
> design_regression <- design_stub + estimands_regression +
+   estimators_regression
> 
> run_design(design_regression)
Error: Error in step 6 (estimator):
	Error in names(x) <- value: 'names' attribute [6] must be the same length as the vector [5]
Execution halted