R Under development (unstable) (2024-08-19 r87028 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(spatPomp) Loading required package: pomp > set.seed(2) > > # Note: we need N >= 5 here to make the arma_benchmark stable > gbm_model <- gbm(U=2,N=5) > > gbm_pf <- pfilter(gbm_model,Np=5) > > paste("gbm pfilter loglik:",round(logLik(gbm_pf),3)) [1] "gbm pfilter loglik: -30.712" > > ## A call to igirf using the moment-based guide function can test compiled code for eunit_measure, munit_measure, vunit_measure, dunit_measure, runit_measure, rprocess, skeleton, rinit and partrans. > > gbm_igirf_out <- igirf(gbm_model, + Ngirf = 1, + rw.sd = rw_sd(rho=0.02, sigma=0.02, tau=0.02), + cooling.type = "geometric", + cooling.fraction.50 = 0.5, + Np=3, + Ninter = 1, + lookahead = 1, + Nguide = 4, + kind = 'moment', + verbose = FALSE + ) > > paste("gbm igirf loglik:", round(logLik(gbm_igirf_out),3)) [1] "gbm igirf loglik: -28.075" > > ## -------------------------------------------- > ## using gbm to test arma_benchmark() > ## ____________________________________________ > > a1 <- arma_benchmark(gbm_model,order=c(1,0,0)) > > paste("ARMA benchmark:", round(a1$total,3)) [1] "ARMA benchmark: -26.946" > > > > > > proc.time() user system elapsed 1.17 0.15 4.84