* using log directory 'd:/Rcompile/CRANpkg/local/4.3/dsem.Rcheck'
* using R version 4.3.3 (2024-02-29 ucrt)
* using platform: x86_64-w64-mingw32 (64-bit)
* R was compiled by
    gcc.exe (GCC) 12.3.0
    GNU Fortran (GCC) 12.3.0
* running under: Windows Server 2022 x64 (build 20348)
* using session charset: UTF-8
* checking for file 'dsem/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'dsem' version '1.5.0'
* 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 'dsem' can be installed ... OK
See 'https://www.r-project.org/nosvn/R.check/r-oldrel-windows-x86_64/dsem-00install.html' for details.
* used C++ compiler: 'g++.exe (GCC) 12.3.0'
* 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 R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... [6s] OK
* checking whether the package can be loaded with stated dependencies ... [5s] OK
* checking whether the package can be unloaded cleanly ... [6s] OK
* checking whether the namespace can be loaded with stated dependencies ... [5s] OK
* checking whether the namespace can be unloaded cleanly ... [6s] OK
* checking loading without being on the library search path ... [6s] OK
* checking startup messages can be suppressed ... [6s] 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 ... [19s] 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 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 line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking pragmas in C/C++ headers and code ... OK
* checking compiled code ... OK
* checking installed files from 'inst/doc' ... OK
* checking files in 'vignettes' ... OK
* checking examples ... [8s] ERROR
Running examples in 'dsem-Ex.R' failed
The error most likely occurred in:

> ### Name: dsemRTMB
> ### Title: Fit dynamic structural equation model
> ### Aliases: dsemRTMB
> 
> ### ** Examples
> 
> # Define model
> sem = "
+   # Link, lag, param_name
+   cprofits -> consumption, 0, a1
+   cprofits -> consumption, 1, a2
+   pwage -> consumption, 0, a3
+   gwage -> consumption, 0, a3
+   cprofits -> invest, 0, b1
+   cprofits -> invest, 1, b2
+   capital -> invest, 0, b3
+   gnp -> pwage, 0, c2
+   gnp -> pwage, 1, c3
+   time -> pwage, 0, c1
+ "
> 
> # Load data
> data(KleinI, package="AER")
> TS = ts(data.frame(KleinI, "time"=time(KleinI) - 1931))
> tsdata = TS[,c("time","gnp","pwage","cprofits",'consumption',
+                "gwage","invest","capital")]
> 
> # Fit model
> fit = dsemRTMB( sem=sem,
+             tsdata = tsdata,
+             estimate_delta0 = TRUE,
+             control = dsem_control(quiet=TRUE) )
Read 10 records
Error in advector(e1) : 
  Invalid argument to 'advector' (lost class attribute?)
Calls: dsemRTMB ... dgmrf -> as.vector -> Ops.advector -> Arith2 -> advector
Execution halted
* checking for unstated dependencies in 'tests' ... OK
* checking tests ... [18s] ERROR
  Running 'testthat.R' [18s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > 
  > 
  > library(testthat)
  > library(dsem)
  > 
  > # Run tests
  > testthat::test_check("dsem")
  Read 4 records
    Coefficient_name Number_of_coefficients   Type
  1           beta_z                      6  Fixed
  2             mu_j                      2 Random
  Read 4 records
    Coefficient_name Number_of_coefficients   Type
  1           beta_z                      6  Fixed
  2             mu_j                      2 Random
  3             x_tj                    200 Random
  Read 4 records
  Read 5 records
    Coefficient_name Number_of_coefficients   Type
  1           beta_z                      7  Fixed
  2         delta0_j                      2  Fixed
  3        lnsigma_j                      2  Fixed
  4             mu_j                      2 Random
  5             x_tj                    122 Random
  Read 5 records
    Coefficient_name Number_of_coefficients   Type
  1           beta_z                      7  Fixed
  2         delta0_j                      2  Fixed
  3             mu_j                      2 Random
  4             x_tj                    122 Random
  Read 5 records
    Coefficient_name Number_of_coefficients   Type
  1           beta_z                      7  Fixed
  2         delta0_j                      2  Fixed
  3             mu_j                      2 Random
  4             x_tj                    122 Random
  Read 5 records
    Coefficient_name Number_of_coefficients   Type
  1           beta_z                      6  Fixed
  2         delta0_j                      2  Fixed
  3             mu_j                      2 Random
  Read 4 records
    Coefficient_name Number_of_coefficients   Type
  1           beta_z                      6  Fixed
  2         delta0_j                      2  Fixed
  3             mu_j                      2 Random
  Read 4 records
    Coefficient_name Number_of_coefficients   Type
  1           beta_z                      6  Fixed
  2             mu_j                      2 Random
  Read 4 records
    Coefficient_name Number_of_coefficients   Type
  1           beta_z                      6  Fixed
  2         delta0_j                      2  Fixed
  3             mu_j                      2 Random
  Read 10 records
    Coefficient_name Number_of_coefficients   Type
  1           beta_z                     17  Fixed
  2             mu_j                      8 Random
  Read 10 records
  Read 0 records
    Coefficient_name Number_of_coefficients   Type
  1           beta_z                      2  Fixed
  2             mu_j                      2 Random
  Read 2 records
    Coefficient_name Number_of_coefficients   Type
  1           beta_z                      2  Fixed
  2             mu_j                      2 Random
  Read 4 records
    Coefficient_name Number_of_coefficients   Type
  1           beta_z                      4  Fixed
  2             mu_j                      2 Random
  Read 4 records
    Coefficient_name Number_of_coefficients   Type
  1        lnsigma_j                      2  Fixed
  2             mu_j                      2 Random
  3             x_tj                    122 Random
  Read 4 records
  Read 16 records
    Coefficient_name Number_of_coefficients   Type
  1           beta_z                     24  Fixed
  2             mu_j                      8  Fixed
  3             x_tj                    232 Random
  Read 4 records
    Coefficient_name Number_of_coefficients   Type
  1           beta_z                      5  Fixed
  2             mu_j                      4 Random
  Read 4 records
  Read 16 records
  [ FAIL 7 | WARN 10 | SKIP 0 | PASS 4 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-distributions.R:35:3'): dsem example is working  ───────────────
  Error in `advector(e2)`: Invalid argument to 'advector' (lost class attribute?)
  Backtrace:
       â–†
    1. └─dsem::dsemRTMB(...) at test-distributions.R:35:3
    2.   └─RTMB::MakeADFun(...)
    3.     └─obj$retape()
    4.       └─RTMB:::MakeADFunObject(...)
    5.         └─RTMB:::.MakeTape(mapfunc, obj$env$par)
    6.           └─RTMB (local) f(x)
    7.             └─dsem (local) func(pl)
    8.               └─dsem (local) f(p, ...)
    9.                 └─RTMB::dgmrf(...)
   10.                   └─RTMB::Ops.advector(as.vector(x), as.vector(mu))
   11.                     ├─RTMB:::Arith2(advector(e1), advector(e2), .Generic)
   12.                     └─RTMB::advector(e2)
  ── Failure ('test-gmrf-versions.R:75:3'): dsem constant-variance options  ──────
  apply(margvar, MARGIN = 2, FUN = sd) not equal to c(0, 0).
  2/2 mismatches (average diff: NaN)
  [1] NA - 0 == NA
  [2] NA - 0 == NA
  ── Failure ('test-gmrf-versions.R:94:3'): dsem constant-variance options  ──────
  apply(margvar, MARGIN = 2, FUN = sd) not equal to c(0, 0).
  2/2 mismatches (average diff: NaN)
  [1] NA - 0 == NA
  [2] NA - 0 == NA
  ── Error ('test-platform.R:34:3'): dsem example is working  ────────────────────
  Error in `advector(e2)`: Invalid argument to 'advector' (lost class attribute?)
  Backtrace:
       â–†
    1. └─dsem::dsemRTMB(sem = sem, tsdata = tsdata, control = dsem_control(getsd = FALSE)) at test-platform.R:34:3
    2.   └─RTMB::MakeADFun(...)
    3.     └─obj$retape()
    4.       └─RTMB:::MakeADFunObject(...)
    5.         └─RTMB:::.MakeTape(mapfunc, obj$env$par)
    6.           └─RTMB (local) f(x)
    7.             └─dsem (local) func(pl)
    8.               └─dsem (local) f(p, ...)
    9.                 └─RTMB::dgmrf(...)
   10.                   └─RTMB::Ops.advector(as.vector(x), as.vector(mu))
   11.                     ├─RTMB:::Arith2(advector(e1), advector(e2), .Generic)
   12.                     └─RTMB::advector(e2)
  ── Error ('test-platform.R:135:3'): dsem works with fixed variances  ───────────
  Error in `advector(e2)`: Invalid argument to 'advector' (lost class attribute?)
  Backtrace:
       â–†
    1. └─dsem::dsemRTMB(...) at test-platform.R:135:3
    2.   └─RTMB::MakeADFun(...)
    3.     └─obj$retape()
    4.       └─RTMB:::MakeADFunObject(...)
    5.         └─RTMB:::.MakeTape(mapfunc, obj$env$par)
    6.           └─RTMB (local) f(x)
    7.             └─dsem (local) func(pl)
    8.               └─dsem (local) f(p, ...)
    9.                 └─RTMB::dgmrf(...)
   10.                   └─RTMB::Ops.advector(as.vector(x), as.vector(mu))
   11.                     ├─RTMB:::Arith2(advector(e1), advector(e2), .Generic)
   12.                     └─RTMB::advector(e2)
  ── Error ('test-platform.R:202:3'): Fixing parameters works  ───────────────────
  Error in `advector(e2)`: Invalid argument to 'advector' (lost class attribute?)
  Backtrace:
       â–†
    1. └─dsem::dsemRTMB(sem = sem, tsdata = tsdata, control = dsem_control(getsd = FALSE)) at test-platform.R:202:3
    2.   └─RTMB::MakeADFun(...)
    3.     └─obj$retape()
    4.       └─RTMB:::MakeADFunObject(...)
    5.         └─RTMB:::.MakeTape(mapfunc, obj$env$par)
    6.           └─RTMB (local) f(x)
    7.             └─dsem (local) func(pl)
    8.               └─dsem (local) f(p, ...)
    9.                 └─RTMB::dgmrf(...)
   10.                   └─RTMB::Ops.advector(as.vector(x), as.vector(mu))
   11.                     ├─RTMB:::Arith2(advector(e1), advector(e2), .Generic)
   12.                     └─RTMB::advector(e2)
  ── Error ('test-priors.R:43:3'): priors interface is working  ──────────────────
  Error in `advector(e2)`: Invalid argument to 'advector' (lost class attribute?)
  Backtrace:
       â–†
    1. └─dsem::dsemRTMB(...) at test-priors.R:43:3
    2.   └─RTMB::MakeADFun(...)
    3.     └─obj$retape()
    4.       └─RTMB:::MakeADFunObject(...)
    5.         └─RTMB:::.MakeTape(mapfunc, obj$env$par)
    6.           └─RTMB (local) f(x)
    7.             └─dsem (local) func(pl)
    8.               └─dsem (local) f(p, ...)
    9.                 └─RTMB::dgmrf(...)
   10.                   └─RTMB::Ops.advector(as.vector(x), as.vector(mu))
   11.                     ├─RTMB:::Arith2(advector(e1), advector(e2), .Generic)
   12.                     └─RTMB::advector(e2)
  
  [ FAIL 7 | WARN 10 | SKIP 0 | PASS 4 ]
  Error: Test failures
  Execution halted
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in 'inst/doc' ... OK
* checking re-building of vignette outputs ... [105s] OK
* checking PDF version of manual ... [18s] OK
* checking HTML version of manual ... [6s] OK
* DONE
Status: 2 ERRORs