* using log directory ‘/Users/ripley/R/packages/tests-devel/BayesRTMB.Rcheck’ * using R Under development (unstable) (2026-06-29 r90199) * using platform: aarch64-apple-darwin25.5.0 * R was compiled by Apple clang version 21.0.0 (clang-2100.1.1.101) GNU Fortran (GCC) 14.2.0 * running under: macOS Tahoe 26.5.2 * using session charset: UTF-8 * current time: 2026-07-01 18:02:56 UTC * using option ‘--no-stop-on-test-error’ * checking for file ‘BayesRTMB/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘BayesRTMB’ version ‘0.2.1’ * 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 executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘BayesRTMB’ 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 ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... 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 ... [14s/15s] OK * checking Rd files ... 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 ... 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 ... ERROR Running examples in ‘BayesRTMB-Ex.R’ failed The error most likely occurred in: > ### Name: rtmb_fa > ### Title: RTMB-based Factor Analysis Wrapper > ### Aliases: rtmb_fa > > ### ** Examples > > > # Prepare a subset of the BigFive dataset for factor analysis > data(BigFive, package = "BayesRTMB") > fa_data <- BigFive[, 1:10] > > # --- 1. Standard Exploratory Factor Analysis (1 Factor) --- > fit_fa1 <- rtmb_fa(data = fa_data, nfactors = 1) Pre-checking model code... Checking RTMB setup... > > # Maximum A Posteriori (MAP) estimation > map_fa1 <- fit_fa1$optimize() Starting RTMB optimization... > map_fa1$summary() Call: MAP Estimation via RTMB Negative Log-Posterior: 2485.47 Approx. Log Marginal Likelihood (Laplace): -2535.33 Point Estimates and 95% Wald CI: variable Estimate Std. Error Lower 95% Upper 95% L[BF1,Factor1] 0.05250 0.08868 -0.12130 0.22630 L[BF2,Factor1] 0.79972 0.07145 0.65968 0.93976 L[BF3,Factor1] -0.13478 0.08707 -0.30542 0.03587 L[BF4,Factor1] -0.20465 0.08257 -0.36649 -0.04282 L[BF5,Factor1] -0.14443 0.08455 -0.31015 0.02128 L[BF6,Factor1] -0.00682 0.08660 -0.17655 0.16291 L[BF7,Factor1] 0.84338 0.07318 0.69994 0.98681 L[BF8,Factor1] -0.24816 0.08298 -0.41080 -0.08551 L[BF9,Factor1] -0.11264 0.08648 -0.28214 0.05686 L[BF10,Factor1] 0.21358 0.08794 0.04122 0.38593 > > > > # --- 2. Factor Analysis with Rotation and Factor Scores (2 Factors) --- > # Extract 2 factors, apply Promax rotation during model fitting, and calculate factor scores > fit_fa2 <- rtmb_fa(data = fa_data, nfactors = 2, rotate = "promax", score = TRUE) Pre-checking model code... Checking RTMB setup... Error: Failed to setup MakeADFun. [Error]: [Error in 'transform' block] [Message]: '*this' is not a valid 'advector' (constructed using illegal operation?) [Location]: Unknown location [Hint]: An automatic-differentiation (AD) object was used after an invalid operation. Common causes in rtmb_code(): 1. Indexing a matrix as x[t] when you intended a row, x[t, ]. 2. Passing a logit/probability vector with the wrong length to categorical_logit(). 3. Assigning past the end of an AD vector, such as vec[t + 1] when vec has length Trial_t. 4. Growing or rebuilding an AD vector inside a loop; initialize with rep(theta[1] * 0, N) or a fixed-size matrix first. Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [14s/15s] OK * checking PDF version of manual ... OK * checking HTML version of manual ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR See ‘/Users/ripley/R/packages/tests-devel/BayesRTMB.Rcheck/00check.log’ for details. 41.93 real 59.94 user 8.51 sys