[Yuima-commits] r773 - in pkg/yuima: . man src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Dec 26 19:29:13 CET 2021


Author: iacus
Date: 2021-12-26 19:29:12 +0100 (Sun, 26 Dec 2021)
New Revision: 773

Modified:
   pkg/yuima/DESCRIPTION
   pkg/yuima/man/IC.Rd
   pkg/yuima/man/MWK151.Rd
   pkg/yuima/man/lasso.Rd
   pkg/yuima/man/setPoisson.Rd
   pkg/yuima/src/euler.c
Log:
fixed for cran

Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION	2021-12-18 01:57:43 UTC (rev 772)
+++ pkg/yuima/DESCRIPTION	2021-12-26 18:29:12 UTC (rev 773)
@@ -1,7 +1,7 @@
 Package: yuima
 Type: Package
 Title: The YUIMA Project Package for SDEs
-Version: 1.12.0
+Version: 1.13.0
 Depends: R(>= 2.10.0), methods, zoo, stats4, utils, expm, cubature,
         mvtnorm
 Imports: Rcpp (>= 0.12.1), boot (>= 1.3-2), glassoFast, wavethresh,

Modified: pkg/yuima/man/IC.Rd
===================================================================
--- pkg/yuima/man/IC.Rd	2021-12-18 01:57:43 UTC (rev 772)
+++ pkg/yuima/man/IC.Rd	2021-12-26 18:29:12 UTC (rev 773)
@@ -93,11 +93,11 @@
 
 Akaike, H. (1973). Information theory and an extension of the maximum likelihood principle. In Second International Symposium on Information Theory (Tsahkadsor, 1971), 267-281. \href{https://link.springer.com/chapter/10.1007/978-1-4612-1694-0_15}{https://link.springer.com/chapter/10.1007/978-1-4612-1694-0_15}
 
-Schwarz, G. (1978). Estimating the dimension of a model. The Annals of Statistics, 6(2), 461-464. \href{http://projecteuclid.org/euclid.aos/1176344136}{http://projecteuclid.org/euclid.aos/1176344136}
+Schwarz, G. (1978). Estimating the dimension of a model. The Annals of Statistics, 6(2), 461-464. \doi{10.1214/aos/1176344136}
 
 ## BIC, Quasi-BIC
 
-Eguchi, S. and Masuda, H. (2018). Schwarz type model comparison for LAQ models. Bernoulli, 24(3), 2278-2327. \href{https://projecteuclid.org/euclid.bj/1517540475}{https://projecteuclid.org/euclid.bj/1517540475}.
+Eguchi, S. and Masuda, H. (2018). Schwarz type model comparison for LAQ models. Bernoulli, 24(3), 2278-2327. \doi{10.3150/17-BEJ928}.
 
 ## CIC
 

Modified: pkg/yuima/man/MWK151.Rd
===================================================================
--- pkg/yuima/man/MWK151.Rd	2021-12-18 01:57:43 UTC (rev 772)
+++ pkg/yuima/man/MWK151.Rd	2021-12-26 18:29:12 UTC (rev 773)
@@ -9,7 +9,7 @@
 }
 \usage{data(MWK151)}
 \details{
-The full data records of past temperature, precipitation, and climate and environmental change derived from tree ring measurements. Parameter keywords describe what was measured in this data set. Additional summary information can be found in the abstracts of papers listed in the data set citations, however many of the data sets arise from unpublished research contributed to the International Tree Ring Data Bank. Additional information on data processing and analysis for International Tree Ring Data Bank (ITRDB) data sets can be found on the Tree Ring Page \url{https://www.ncdc.noaa.gov/data-access/paleoclimatology-data}.
+The full data records of past temperature, precipitation, and climate and environmental change derived from tree ring measurements. Parameter keywords describe what was measured in this data set. Additional summary information can be found in the abstracts of papers listed in the data set citations, however many of the data sets arise from unpublished research contributed to the International Tree Ring Data Bank. Additional information on data processing and analysis for International Tree Ring Data Bank (ITRDB) data sets can be found on the Tree Ring Page \url{https://www.ncei.noaa.gov/products/paleoclimatology}.
 
 The MWK151 is only a small part of the data relative to one tree and contains measurement of a tree's ring width in mm, from -608 to 1957.
 }

Modified: pkg/yuima/man/lasso.Rd
===================================================================
--- pkg/yuima/man/lasso.Rd	2021-12-18 01:57:43 UTC (rev 772)
+++ pkg/yuima/man/lasso.Rd	2021-12-26 18:29:12 UTC (rev 773)
@@ -27,6 +27,7 @@
 }
 \author{The YUIMA Project Team}
 \examples{
+\dontrun{
 ##multidimension case
 diff.matrix <- matrix(c("theta1.1","theta1.2", "1", "1"), 2, 2)
 
@@ -58,6 +59,7 @@
 # LASSO
 round(est$lasso,3) 
 }
+}
  
 % Add one or more standard keywords, see file 'KEYWORDS' in the
 % R documentation directory.

Modified: pkg/yuima/man/setPoisson.Rd
===================================================================
--- pkg/yuima/man/setPoisson.Rd	2021-12-18 01:57:43 UTC (rev 772)
+++ pkg/yuima/man/setPoisson.Rd	2021-12-26 18:29:12 UTC (rev 773)
@@ -39,6 +39,7 @@
 \author{The YUIMA Project Team}
 
 \examples{
+\dontrun{
 Terminal <- 10
 samp <- setSampling(T=Terminal,n=1000)
 
@@ -79,8 +80,8 @@
 plot(y5)
 f <- function(t)  beta*(1+sin(lambda*t))
 curve(f, 0, Terminal, col="red")
-
 }
+}
 \keyword{ts}
 
 

Modified: pkg/yuima/src/euler.c
===================================================================
--- pkg/yuima/src/euler.c	2021-12-18 01:57:43 UTC (rev 772)
+++ pkg/yuima/src/euler.c	2021-12-26 18:29:12 UTC (rev 773)
@@ -47,6 +47,11 @@
     PROTECT(t0 = AS_NUMERIC(t0));
     REAL(tpar)[0] = REAL(t0)[0]; /* initial time */
     
+    PROTECT(b0 = allocVector(REALSXP, d));
+    PROTECT(sigma0 = allocVector(REALSXP, d*r));
+    
+    PROTECT(xpar = allocVector(REALSXP, 1));
+     
     for (i = 0; i < n; i++) {
         
         /* assign the current variables */
@@ -55,13 +60,13 @@
         //defineVar(installChar(tvar), tpar, env); 
         
         for (j = 0; j < d; j++) {
-            PROTECT(xpar = allocVector(REALSXP, 1));
+            /* PROTECT(xpar = allocVector(REALSXP, 1));*/
             REAL(xpar)[0] = rX[j + i * d];
             //defineVar(installChar(STRING_ELT(modelstate, j)), duplicate(xpar), env);
             //PROTECT(xvar = STRING_ELT(modelstate, j));
             //defineVar(installChar(xvar), duplicate(xpar), env);
             defineVar(installChar(STRING_ELT(modelstate, j)), xpar, env);
-            UNPROTECT(1);
+/*            UNPROTECT(1); */
         }
         
         /*defineVar(install("env"), env, rho);*/
@@ -73,10 +78,10 @@
         /* PROTECT(b0 = AS_NUMERIC(eval(drift, rho)));
         PROTECT(sigma0 = AS_NUMERIC(eval(diffusion, rho)));
         */
-        PROTECT(b0 = allocVector(REALSXP, d));
+        /* PROTECT(b0 = allocVector(REALSXP, d));  */
         b0 = AS_NUMERIC(eval(drift, rho));
-        PROTECT(sigma0 = allocVector(REALSXP, d*r));
-        sigma0 = AS_NUMERIC(eval(diffusion, rho));
+        /* PROTECT(sigma0 = allocVector(REALSXP, d*r)); */
+        sigma0 = AS_NUMERIC(eval(diffusion, rho)); 
         
         b = REAL(b0);
         sigma = REAL(sigma0);
@@ -94,9 +99,10 @@
         
         REAL(tpar)[0] += rdt[i];
         
-        UNPROTECT(2);
+        
     }
-    
+    UNPROTECT(1); /* xpar */
+    UNPROTECT(2); /* b0, sigma0 */ 
     UNPROTECT(6);
     return(X);
 }



More information about the Yuima-commits mailing list