* using log directory 'd:/Rcompile/CRANpkg/local/4.6/DesignLibrary.Rcheck' * using R version 4.6.2 (2026-10-29 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 14.3.0 GNU Fortran (GCC) 14.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * current time: 2026-11-11 11:08:47 UTC * checking for file 'DesignLibrary/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'DesignLibrary' version '0.1.10' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'DesignLibrary' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [3s] OK * checking whether the package can be loaded with stated dependencies ... [2s] OK * checking whether the package can be unloaded cleanly ... [2s] OK * checking whether the namespace can be loaded with stated dependencies ... [2s] OK * checking whether the namespace can be unloaded cleanly ... [3s] OK * checking loading without being on the library search path ... [1s] OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [9s] OK * checking Rd files ... [1s] OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking examples ... [2s] ERROR Running examples in 'DesignLibrary-Ex.R' failed The error most likely occurred in: > ### Name: binary_iv_designer > ### Title: Create a binary instrumental variables design > ### Aliases: binary_iv_designer simple_iv_designer > > ### ** Examples > > # Generate a simple iv design: iv identifies late not ate > binary_iv_design_1 <- binary_iv_designer(N = 1000, b = c(.1, .2, .3, .4)) Warning: `declare_population()` is deprecated. Use `declare_model()` instead. This warning is displayed once per session. Error in `declare_potential_outcomes()`: ! `declare_potential_outcomes()` is not a step in DeclareDesign 2.0. ℹ Put potential outcomes in the model, as a formula: • declare_model(N = 100, potential_outcomes(Y ~ 0.2 * Z + U)) ℹ Named potential outcomes are ordinary model variables: • declare_model(Y_Z_0 = U, Y_Z_1 = U + 0.2) Backtrace: ▆ 1. └─DesignLibrary::binary_iv_designer(...) 2. └─DeclareDesign::declare_potential_outcomes(Y ~ a[type] + b[type] * X + d[type] * Z + u_Y, assignment_variables = "X") 3. └─rlang::abort(...) Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [3s] ERROR Running 'testthat.R' [2s] Running the tests in 'tests/testthat.R' failed. Complete output: > library(testthat) > library(DesignLibrary) Loading required package: DeclareDesign Loading required package: randomizr Loading required package: fabricatr Loading required package: estimatr > > test_check(package = "DesignLibrary") Saving _problems/test_designers-17.R Saving _problems/test_diagnose_designers-4.R Saving _problems/test_fanout-6.R Saving _problems/test_simulate_designers-4.R [ FAIL 4 | WARN 1 | SKIP 0 | PASS 19 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test_designers.R:17:3'): (code run outside of `test_that()`) ──────── Error in `declare_potential_outcomes(Y ~ a[type] + b[type] * X + d[type] * Z + u_Y, assignment_variables = "X")`: `declare_potential_outcomes()` is not a step in DeclareDesign 2.0. ℹ Put potential outcomes in the model, as a formula: • declare_model(N = 100, potential_outcomes(Y ~ 0.2 * Z + U)) ℹ Named potential outcomes are ordinary model variables: • declare_model(Y_Z_0 = U, Y_Z_1 = U + 0.2) Backtrace: ▆ 1. └─DesignLibrary (local) the_designer() at test_designers.R:17:3 2. └─DeclareDesign::declare_potential_outcomes(Y ~ a[type] + b[type] * X + d[type] * Z + u_Y, assignment_variables = "X") 3. └─rlang::abort(...) ── Error ('test_diagnose_designers.R:4:3'): with and without term ────────────── Error in `declare_potential_outcomes(Y_A_0_B_0 = mean_A0B0 + u + rnorm(N, sd = outcome_sds[1]), Y_A_0_B_1 = mean_A0B1 + u + rnorm(N, sd = outcome_sds[2]), Y_A_1_B_0 = mean_A1B0 + u + rnorm(N, sd = outcome_sds[3]), Y_A_1_B_1 = mean_A1B1 + u + rnorm(N, sd = outcome_sds[4]))`: `declare_potential_outcomes()` is not a step in DeclareDesign 2.0. ℹ Put potential outcomes in the model, as a formula: • declare_model(N = 100, potential_outcomes(Y ~ 0.2 * Z + U)) ℹ Named potential outcomes are ordinary model variables: • declare_model(Y_Z_0 = U, Y_Z_1 = U + 0.2) Backtrace: ▆ 1. └─DesignLibrary::two_by_two_designer(...) at test_diagnose_designers.R:4:3 2. └─DeclareDesign::declare_potential_outcomes(...) 3. └─rlang::abort(...) ── Error ('test_fanout.R:6:3'): fan out IDs are correct ──────────────────────── Error in `declare_potential_outcomes(Y ~ (1 - Z) * (u_0 * control_sd + control_mean) + Z * (u_1 * treatment_sd + treatment_mean))`: `declare_potential_outcomes()` is not a step in DeclareDesign 2.0. ℹ Put potential outcomes in the model, as a formula: • declare_model(N = 100, potential_outcomes(Y ~ 0.2 * Z + U)) ℹ Named potential outcomes are ordinary model variables: • declare_model(Y_Z_0 = U, Y_Z_1 = U + 0.2) Backtrace: ▆ 1. └─DesignLibrary::two_arm_designer(rho = 0) at test_fanout.R:6:3 2. └─DeclareDesign::declare_potential_outcomes(...) 3. └─rlang::abort(...) ── Error ('test_simulate_designers.R:4:3'): MH sim ids ───────────────────────── Error in `declare_potential_outcomes(Y ~ (1 - Z) * (u_0 * control_sd + control_mean) + Z * (u_1 * treatment_sd + treatment_mean))`: `declare_potential_outcomes()` is not a step in DeclareDesign 2.0. ℹ Put potential outcomes in the model, as a formula: • declare_model(N = 100, potential_outcomes(Y ~ 0.2 * Z + U)) ℹ Named potential outcomes are ordinary model variables: • declare_model(Y_Z_0 = U, Y_Z_1 = U + 0.2) Backtrace: ▆ 1. └─DesignLibrary::two_arm_designer() at test_simulate_designers.R:4:3 2. └─DeclareDesign::declare_potential_outcomes(...) 3. └─rlang::abort(...) [ FAIL 4 | WARN 1 | SKIP 0 | PASS 19 ] Error: ! Test failures. Execution halted * checking PDF version of manual ... [21s] OK * checking HTML version of manual ... [6s] OK * DONE Status: 2 ERRORs