Error when using posterior_linpred in brms

I receive the following error when using posterior_linpred() on a brms object:

Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'as.matrix': Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 102
Error: Something went wrong (see the error message above). Perhaps you transformed numeric variables to factors or vice versa within the model formula? If yes, please convert your variables beforehand. Or did you use a grouping factor also for a different purpose? If yes, please make sure that its factor levels are correct also in the new data you may have provided.

The brms model is a two-parameter item-response model with an ordinal (i.e., ordered factor) response variable:

formula_va_ord_2pl <- bf(
  response ~ 1 + tc_ageCentered + tc_ageCenteredQuadratic + roleFactor + tc_ageCentered:roleFactor + construct + construct:tc_ageCentered + construct:roleFactor + tc_ageCentered:construct:roleFactor + tc_sexFactor + tc_sexFactor:construct + tc_sexFactor:tc_ageCentered + tc_sexFactor:tc_ageCentered:construct + (1 + tc_ageCentered + roleFactor + tc_ageCentered:roleFactor | item) + (1 + tc_ageCentered + tc_ageCenteredQuadratic + roleFactor + tc_ageCentered:roleFactor + construct + tc_ageCentered:construct + construct:roleFactor + tc_ageCentered:construct:roleFactor | tcidFactor),
  disc ~ 1 + tc_ageCentered + tc_ageCenteredQuadratic + roleFactor + tc_ageCentered:roleFactor + construct + (1 + tc_ageCentered + roleFactor + tc_ageCentered:roleFactor | item)
)

bayesianMixedEffectsGRM_23b <- brm(
  formula = formula_va_ord_2pl,
  data = irtData_long,
  family = brmsfamily("cumulative", "logit"),
  chains = 8,
  iter = 10000,
  init = 0,
  init_r = 0.1,
  control = list(adapt_delta = 0.95, max_treedepth = 10),
  save_pars = save_pars(latent = TRUE, all = TRUE),
  seed = 52242
)

The model converges fine. Here’s a reprex of the error:

load("C:/Users/itpetersen/Downloads/irtData_long.rdata")
load("C:/Users/itpetersen/Downloads/bayesianMixedEffectsGRM_23b.rdata")

library("tidyverse")
library("brms")
#> Loading required package: Rcpp
#> Loading 'brms' package (version 2.19.0). Useful instructions
#> can be found by typing help('brms'). A more detailed introduction
#> to the package is available through vignette('brms_overview').
#> 
#> Attaching package: 'brms'
#> The following object is masked from 'package:stats':
#> 
#>     ar
library("rstan")
#> Warning: package 'rstan' was built under R version 4.2.1
#> Loading required package: StanHeaders
#> Warning: package 'StanHeaders' was built under R version 4.2.3
#> 
#> rstan version 2.26.13 (Stan version 2.26.1)
#> For execution on a local, multicore CPU with excess RAM we recommend calling
#> options(mc.cores = parallel::detectCores()).
#> To avoid recompilation of unchanged Stan programs, we recommend calling
#> rstan_options(auto_write = TRUE)
#> For within-chain threading using `reduce_sum()` or `map_rect()` Stan functions,
#> change `threads_per_chain` option:
#> rstan_options(threads_per_chain = 1)
#> Do not specify '-march=native' in 'LOCAL_CPPFLAGS' or a Makevars file
#> 
#> Attaching package: 'rstan'
#> The following object is masked from 'package:tidyr':
#> 
#>     extract
library("data.table")
#> 
#> Attaching package: 'data.table'
#> The following objects are masked from 'package:lubridate':
#> 
#>     hour, isoweek, mday, minute, month, quarter, second, wday, week,
#>     yday, year
#> The following objects are masked from 'package:dplyr':
#> 
#>     between, first, last
#> The following object is masked from 'package:purrr':
#> 
#>     transpose

str(irtData_long$response)
#>  Ord.factor w/ 3 levels "0"<"1"<"2": 2 2 1 2 3 3 1 3 1 2 ...

bayesianMixedEffectsGRM_posterior <- posterior_linpred(bayesianMixedEffectsGRM_23b)
#> Error in h(simpleError(msg, call)) : 
#>   error in evaluating the argument 'x' in selecting a method for function 'as.matrix': Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 102
#> Error: Something went wrong (see the error message above). Perhaps you transformed numeric variables to factors or vice versa within the model formula? If yes, please convert your variables beforehand. Or did you use a grouping factor also for a different purpose? If yes, please make sure that its factor levels are correct also in the new data you may have provided.

sessionInfo()
#> R version 4.2.0 (2022-04-22 ucrt)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 19045)
#> 
#> Matrix products: default
#> 
#> locale:
#> [1] LC_COLLATE=English_United States.utf8 
#> [2] LC_CTYPE=English_United States.utf8   
#> [3] LC_MONETARY=English_United States.utf8
#> [4] LC_NUMERIC=C                          
#> [5] LC_TIME=English_United States.utf8    
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#>  [1] data.table_1.14.8   rstan_2.26.13       StanHeaders_2.26.27
#>  [4] brms_2.19.0         Rcpp_1.0.10         lubridate_1.9.2    
#>  [7] forcats_1.0.0       stringr_1.5.0       dplyr_1.1.2        
#> [10] purrr_1.0.1         readr_2.1.4         tidyr_1.3.0        
#> [13] tibble_3.2.1        ggplot2_3.4.2       tidyverse_2.0.0    
#> 
#> loaded via a namespace (and not attached):
#>  [1] nlme_3.1-162         matrixStats_1.0.0    fs_1.6.2            
#>  [4] xts_0.13.1           threejs_0.3.3        R.cache_0.16.0      
#>  [7] tensorA_0.36.2       tools_4.2.0          backports_1.4.1     
#> [10] utf8_1.2.3           R6_2.5.1             DT_0.28             
#> [13] colorspace_2.1-0     withr_2.5.0          prettyunits_1.1.1   
#> [16] tidyselect_1.2.0     gridExtra_2.3        processx_3.8.1      
#> [19] Brobdingnag_1.2-9    curl_5.0.1           compiler_4.2.0      
#> [22] cli_3.6.1            shinyjs_2.1.0        colourpicker_1.2.0  
#> [25] posterior_1.4.1      scales_1.2.1         dygraphs_1.1.1.6    
#> [28] checkmate_2.2.0      mvtnorm_1.2-2        callr_3.7.3         
#> [31] digest_0.6.31        rmarkdown_2.22       R.utils_2.12.2      
#> [34] base64enc_0.1-3      pkgconfig_2.0.3      htmltools_0.5.5     
#> [37] styler_1.10.1        fastmap_1.1.1        htmlwidgets_1.6.2   
#> [40] rlang_1.1.1          rstudioapi_0.14      shiny_1.7.4         
#> [43] farver_2.1.1         generics_0.1.3       jsonlite_1.8.5      
#> [46] zoo_1.8-12           crosstalk_1.2.0      gtools_3.9.4        
#> [49] R.oo_1.25.0          distributional_0.3.2 inline_0.3.19       
#> [52] magrittr_2.0.3       loo_2.6.0            bayesplot_1.10.0    
#> [55] Matrix_1.5-4.1       munsell_0.5.0        fansi_1.0.4         
#> [58] abind_1.4-5          lifecycle_1.0.3      R.methodsS3_1.8.2   
#> [61] stringi_1.7.12       yaml_2.3.7           pkgbuild_1.4.2      
#> [64] plyr_1.8.8           grid_4.2.0           parallel_4.2.0      
#> [67] promises_1.2.0.1     crayon_1.5.2         miniUI_0.1.1.1      
#> [70] lattice_0.21-8       hms_1.1.3            knitr_1.43          
#> [73] ps_1.7.5             pillar_1.9.0         igraph_1.5.0        
#> [76] markdown_1.7         shinystan_2.6.0      codetools_0.2-19    
#> [79] reshape2_1.4.4       stats4_4.2.0         rstantools_2.3.1    
#> [82] reprex_2.0.2         glue_1.6.2           evaluate_0.21       
#> [85] V8_4.3.0             RcppParallel_5.1.7   tzdb_0.4.0          
#> [88] vctrs_0.6.3          httpuv_1.6.11        gtable_0.3.3        
#> [91] xfun_0.39            mime_0.12            xtable_1.8-4        
#> [94] coda_0.19-4          later_1.3.1          shinythemes_1.2.0   
#> [97] timechange_0.2.0     ellipsis_0.3.2       bridgesampling_1.1-2

Created on 2023-06-26 with reprex v2.0.2