* using log directory 'd:/Rcompile/CRANpkg/local/4.4/cobalt.Rcheck' * using R Under development (unstable) (2024-03-24 r86185 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.2.0 GNU Fortran (GCC) 13.2.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'cobalt/DESCRIPTION' ... OK * this is package 'cobalt' version '4.5.4' * 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 'cobalt' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking 'build' 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 ... [1s] OK * checking whether the package can be loaded with stated dependencies ... [1s] OK * checking whether the package can be unloaded cleanly ... [1s] OK * checking whether the namespace can be loaded with stated dependencies ... [1s] OK * checking whether the namespace can be unloaded cleanly ... [1s] OK * checking loading without being on the library search path ... [1s] OK * checking whether startup messages can be suppressed ... [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 ... [33s] OK * checking Rd files ... [2s] 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 contents of 'data' directory ... OK * checking data for non-ASCII characters ... [0s] OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [18s] ERROR Running examples in 'cobalt-Ex.R' failed The error most likely occurred in: > ### Name: bal.tab.weightit > ### Title: Balance Statistics for 'WeightIt' Objects > ### Aliases: bal.tab.weightit > > ### ** Examples > > ## Don't show: > if (all(sapply(c("WeightIt", "twang"), requireNamespace, quietly = TRUE))) (if (getRversion() >= "3.4") withAutoprint else force)({ # examplesIf + ## End(Don't show) + library(WeightIt) + data("lalonde", package = "cobalt") + + ## Basic propensity score weighting + w.out1 <- weightit(treat ~ age + educ + race + + married + nodegree + re74 + re75, + data = lalonde, method = "ps") + bal.tab(w.out1, un = TRUE, m.threshold = .1, + v.threshold = 2) + + ## Weighting with a multi-category treatment + w.out2 <- weightit(race ~ age + educ + married + + nodegree + re74 + re75, + data = lalonde, method = "ps", + estimand = "ATE", use.mlogit = FALSE) + bal.tab(w.out2, un = TRUE) + bal.tab(w.out2, un = TRUE, pairwise = FALSE) + + ## IPW for longitudinal treatments + data("iptwExWide", package = "twang") + wmsm.out <- weightitMSM(list(tx1 ~ use0 + gender, + tx2 ~ use0 + gender + use1 + tx1, + tx3 ~ use0 + gender + use1 + tx1 + use2 + tx2), + data = iptwExWide, + stabilize = TRUE) + bal.tab(wmsm.out) + ## Don't show: + }) # examplesIf > library(WeightIt) > data("lalonde", package = "cobalt") > w.out1 <- weightit(treat ~ age + educ + race + married + nodegree + re74 + + re75, data = lalonde, method = "ps") > bal.tab(w.out1, un = TRUE, m.threshold = 0.1, v.threshold = 2) Balance Measures Type Diff.Un V.Ratio.Un Diff.Adj M.Threshold V.Ratio.Adj prop.score Distance 1.7569 0.9211 0.1360 0.9758 age Contin. -0.2419 0.4400 -0.1676 Not Balanced, >0.1 0.3689 educ Contin. 0.0448 0.4959 0.1296 Not Balanced, >0.1 0.5657 race_black Binary 0.6404 . 0.0499 Balanced, <0.1 . race_hispan Binary -0.0827 . 0.0047 Balanced, <0.1 . race_white Binary -0.5577 . -0.0546 Balanced, <0.1 . married Binary -0.3236 . -0.0944 Balanced, <0.1 . nodegree Binary 0.1114 . -0.0547 Balanced, <0.1 . re74 Contin. -0.5958 0.5181 -0.2740 Not Balanced, >0.1 0.8208 re75 Contin. -0.2870 0.9563 -0.1579 Not Balanced, >0.1 0.9562 V.Threshold prop.score Balanced, <2 age Not Balanced, >2 educ Balanced, <2 race_black race_hispan race_white married nodegree re74 Balanced, <2 re75 Balanced, <2 Balance tally for mean differences count Balanced, <0.1 5 Not Balanced, >0.1 4 Variable with the greatest mean difference Variable Diff.Adj M.Threshold re74 -0.274 Not Balanced, >0.1 Balance tally for variance ratios count Balanced, <2 4 Not Balanced, >2 1 Variable with the greatest variance ratio Variable V.Ratio.Adj V.Threshold age 0.3689 Not Balanced, >2 Effective sample sizes Control Treated Unadjusted 429. 185. Adjusted 329.01 58.33 > w.out2 <- weightit(race ~ age + educ + married + nodegree + re74 + re75, + data = lalonde, method = "ps", estimand = "ATE", use.mlogit = FALSE) Error in `weightit()`: ! `use.mlogit` is no longer accepted and will be ignored; use `multi.method` instead. See `help("method_glm")` for details. Backtrace: ▆ 1. ├─(if (getRversion() >= "3.4") withAutoprint else force)(...) 2. │ └─base::source(...) 3. │ ├─base::withVisible(eval(ei, envir)) 4. │ └─base::eval(ei, envir) 5. │ └─base::eval(ei, envir) 6. └─WeightIt::weightit(...) 7. ├─base::do.call("weightit.fit", A) 8. └─WeightIt::weightit.fit(...) 9. ├─base::do.call(...) 10. └─WeightIt:::weightit2glm.multi(...) 11. └─WeightIt:::.err("`use.mlogit` is no longer accepted and will be ignored; use `multi.method` instead. See `help(\"method_glm\")` for details") 12. └─chk::err(..., call = pkg_caller_call(start = 2)) 13. └─rlang::abort(msg, class = class, !!!args[named], call = call) Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [2s] OK Running 'testthat.R' [2s] * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [106s] ERROR Error(s) in re-building vignettes: --- re-building 'cobalt.Rmd' using rmarkdown --- finished re-building 'cobalt.Rmd' --- re-building 'faq.Rmd' using rmarkdown --- finished re-building 'faq.Rmd' --- re-building 'longitudinal-treat.Rmd' using rmarkdown --- finished re-building 'longitudinal-treat.Rmd' --- re-building 'love.plot.Rmd' using rmarkdown --- finished re-building 'love.plot.Rmd' --- re-building 'optimizing-balance.Rmd' using rmarkdown --- finished re-building 'optimizing-balance.Rmd' --- re-building 'other-packages.Rmd' using rmarkdown --- finished re-building 'other-packages.Rmd' --- re-building 'segmented-data.Rmd' using rmarkdown Quitting from lines 202-208 [unnamed-chunk-15] (segmented-data.Rmd) Error: processing vignette 'segmented-data.Rmd' failed with diagnostics: `use.mlogit` is no longer accepted and will be ignored; use `multi.method` instead. See `help("method_glm")` for details. --- failed re-building 'segmented-data.Rmd' SUMMARY: processing the following file failed: 'segmented-data.Rmd' Error: Vignette re-building failed. Execution halted * checking PDF version of manual ... [33s] OK * checking HTML version of manual ... [10s] OK * DONE Status: 2 ERRORs