[Pomp-commits] r1111 - in pkg/pomp: . R inst tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Feb 27 03:58:17 CET 2015


Author: kingaa
Date: 2015-02-27 03:58:17 +0100 (Fri, 27 Feb 2015)
New Revision: 1111

Modified:
   pkg/pomp/DESCRIPTION
   pkg/pomp/R/mif.R
   pkg/pomp/inst/NEWS
   pkg/pomp/inst/NEWS.Rd
   pkg/pomp/tests/bbs-trajmatch.Rout.save
   pkg/pomp/tests/bbs.Rout.save
   pkg/pomp/tests/blowflies.Rout.save
   pkg/pomp/tests/dacca.Rout.save
   pkg/pomp/tests/dimchecks.Rout.save
   pkg/pomp/tests/fhn.Rout.save
   pkg/pomp/tests/filtfail.Rout.save
   pkg/pomp/tests/gillespie.Rout.save
   pkg/pomp/tests/gompertz.Rout.save
   pkg/pomp/tests/logistic.Rout.save
   pkg/pomp/tests/ou2-abc.Rout.save
   pkg/pomp/tests/ou2-bsmc.Rout.save
   pkg/pomp/tests/ou2-bsmc2.Rout.save
   pkg/pomp/tests/ou2-forecast.Rout.save
   pkg/pomp/tests/ou2-kalman.Rout.save
   pkg/pomp/tests/ou2-mif-fp.Rout.save
   pkg/pomp/tests/ou2-mif.R
   pkg/pomp/tests/ou2-mif.Rout.save
   pkg/pomp/tests/ou2-mif2.R
   pkg/pomp/tests/ou2-mif2.Rout.save
   pkg/pomp/tests/ou2-nlf.Rout.save
   pkg/pomp/tests/ou2-pmcmc.Rout.save
   pkg/pomp/tests/ou2-probe.Rout.save
   pkg/pomp/tests/ou2-procmeas.Rout.save
   pkg/pomp/tests/ou2-simulate.Rout.save
   pkg/pomp/tests/ou2-spect.Rout.save
   pkg/pomp/tests/ou2-trajmatch.Rout.save
   pkg/pomp/tests/partrans.Rout.save
   pkg/pomp/tests/pfilter.Rout.save
   pkg/pomp/tests/pomppomp.Rout.save
   pkg/pomp/tests/prior.Rout.save
   pkg/pomp/tests/ricker-bsmc.Rout.save
   pkg/pomp/tests/ricker-probe.Rout.save
   pkg/pomp/tests/ricker-spect.Rout.save
   pkg/pomp/tests/ricker.Rout.save
   pkg/pomp/tests/rw2.Rout.save
   pkg/pomp/tests/sir.Rout.save
   pkg/pomp/tests/skeleton.Rout.save
   pkg/pomp/tests/steps.Rout.save
   pkg/pomp/tests/synlik.Rout.save
   pkg/pomp/tests/verhulst.Rout.save
Log:
- deprecate, but do not ignore, the 'pars' argument to 'mif'.  It will be removed later.

Modified: pkg/pomp/DESCRIPTION
===================================================================
--- pkg/pomp/DESCRIPTION	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/DESCRIPTION	2015-02-27 02:58:17 UTC (rev 1111)
@@ -1,7 +1,7 @@
 Package: pomp
 Type: Package
 Title: Statistical Inference for Partially Observed Markov Processes
-Version: 0.62-1
+Version: 0.61-3
 Date: 2015-02-26
 Authors at R: c(person(given=c("Aaron","A."),family="King",
 		role=c("aut","cre"),email="kingaa at umich.edu"),

Modified: pkg/pomp/R/mif.R
===================================================================
--- pkg/pomp/R/mif.R	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/R/mif.R	2015-02-27 02:58:17 UTC (rev 1111)
@@ -114,27 +114,57 @@
   if (is.null(start.names))
     stop("mif error: ",sQuote("start")," must be a named vector",call.=FALSE)
   
-  if (!is.null(pars)) {
-    warning("mif warning: the ",sQuote("pars")," argument to ",sQuote("mif")," is unnecessary and deprecated and will be ignored.\n",
-            "This behavior differs from that previous to ",sQuote("pomp")," version 0.62",call.=FALSE)
-  }
-
   rw.names <- names(rw.sd)
   if (is.null(rw.names) || any(rw.sd<0))
     stop("mif error: ",sQuote("rw.sd")," must be a named non-negative numerical vector",call.=FALSE)
   if (!all(rw.names%in%start.names))
     stop("mif error: all the names of ",sQuote("rw.sd")," must be names of ",sQuote("start"),call.=FALSE)
-  rw.names <- rw.names[rw.sd>0]
+  rw.names <- names(rw.sd[rw.sd>0])
   if (length(rw.names) == 0)
     stop("mif error: ",sQuote("rw.sd")," must have one positive entry for each parameter to be estimated",call.=FALSE)
-  pars <- rw.names[!(rw.names%in%ivps)]
   
-  if (!is.character(ivps) || !all(ivps%in%start.names))
-    stop("mif error: ",sQuote("ivps")," must name model parameters",call.=FALSE)
-
-##  rw.sd <- rw.sd[c(pars,ivps)]
-##  rw.names <- names(rw.sd)
+  if (is.null(pars))
+    pars <- rw.names[!(rw.names%in%ivps)]
+  else
+    warning("mif warning: argument ",sQuote("pars")," is redundant and deprecated.  It will be removed in a future release.",call.=FALSE)
   
+  if (
+      !is.character(pars) ||
+      !is.character(ivps) ||
+      !all(pars%in%start.names) ||
+      !all(ivps%in%start.names) ||
+      any(pars%in%ivps) ||
+      any(ivps%in%pars) ||
+      !all(pars%in%rw.names) ||
+      !all(ivps%in%rw.names)
+      )
+    stop(
+         "mif error: ",
+         sQuote("pars")," and ",sQuote("ivps"),
+         " must be mutually disjoint subsets of ",
+         sQuote("names(start)"),
+         " and must have a positive random-walk SDs specified in ",
+         sQuote("rw.sd"),
+         call.=FALSE
+         )
+  
+  if (!all(rw.names%in%c(pars,ivps))) {
+    extra.rws <- rw.names[!(rw.names%in%c(pars,ivps))]
+    warning(
+            ngettext(length(extra.rws),"mif warning: the variable ",
+                     "mif warning: the variables "),
+            paste(sQuote(extra.rws),collapse=", "),
+            ngettext(length(extra.rws)," has positive random-walk SD specified, but is included in neither ",
+                     " have positive random-walk SDs specified, but are included in neither "),
+            sQuote("pars")," nor ",sQuote("ivps"),
+            ngettext(length(extra.rws),". This random walk SD will be ignored.",
+                     ". These random walk SDs will be ignored."),
+            call.=FALSE
+            )
+  }
+  rw.sd <- rw.sd[c(pars,ivps)]
+  rw.names <- names(rw.sd)
+  
   ntimes <- length(time(object))
   if (is.null(Np)) stop("mif error: ",sQuote("Np")," must be specified",call.=FALSE)
   if (is.function(Np)) {

Modified: pkg/pomp/inst/NEWS
===================================================================
--- pkg/pomp/inst/NEWS	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/inst/NEWS	2015-02-27 02:58:17 UTC (rev 1111)
@@ -1,9 +1,9 @@
 _N_e_w_s _f_o_r _p_a_c_k_a_g_e '_p_o_m_p'
 
-_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._6_2-_1:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._6_1-_3:
 
-        • ‘mif’'s ‘pars’ argument, which is redundant, is now ignored
-          with a warning.  In a future release, this argument will be
+        • ‘mif’'s ‘pars’ argument, which is redundant, is now
+          deprecated.  In a future release, this argument will be
           removed.
 
 _C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._6_1-_1:

Modified: pkg/pomp/inst/NEWS.Rd
===================================================================
--- pkg/pomp/inst/NEWS.Rd	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/inst/NEWS.Rd	2015-02-27 02:58:17 UTC (rev 1111)
@@ -1,8 +1,8 @@
 \name{NEWS}
 \title{News for package `pomp'}
-\section{Changes in \pkg{pomp} version 0.62-1}{
+\section{Changes in \pkg{pomp} version 0.61-3}{
   \itemize{
-    \item \code{mif}'s \code{pars} argument, which is redundant, is now ignored with a warning.
+    \item \code{mif}'s \code{pars} argument, which is redundant, is now deprecated.
     In a future release, this argument will be removed.
   }
 }

Modified: pkg/pomp/tests/bbs-trajmatch.Rout.save
===================================================================
--- pkg/pomp/tests/bbs-trajmatch.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/bbs-trajmatch.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -80,4 +80,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  2.448   0.052   2.525 
+  2.480   0.052   2.555 

Modified: pkg/pomp/tests/bbs.Rout.save
===================================================================
--- pkg/pomp/tests/bbs.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/bbs.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -73,4 +73,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  6.916   0.056   7.013 
+  7.153   0.049   7.193 

Modified: pkg/pomp/tests/blowflies.Rout.save
===================================================================
--- pkg/pomp/tests/blowflies.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/blowflies.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -72,4 +72,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  1.320   0.060   1.411 
+  1.304   0.044   1.380 

Modified: pkg/pomp/tests/dacca.Rout.save
===================================================================
--- pkg/pomp/tests/dacca.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/dacca.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -107,4 +107,4 @@
 > 
 > proc.time()
    user  system elapsed 
- 11.408   0.084  11.550 
+ 10.852   0.064  10.968 

Modified: pkg/pomp/tests/dimchecks.Rout.save
===================================================================
--- pkg/pomp/tests/dimchecks.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/dimchecks.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -179,4 +179,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.592   0.072   0.689 
+  0.560   0.092   0.677 

Modified: pkg/pomp/tests/fhn.Rout.save
===================================================================
--- pkg/pomp/tests/fhn.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/fhn.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -93,4 +93,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  1.064   0.032   1.243 
+  1.084   0.064   1.285 

Modified: pkg/pomp/tests/filtfail.Rout.save
===================================================================
--- pkg/pomp/tests/filtfail.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/filtfail.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -116,4 +116,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.624   0.048   0.693 
+  0.576   0.068   0.660 

Modified: pkg/pomp/tests/gillespie.Rout.save
===================================================================
--- pkg/pomp/tests/gillespie.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/gillespie.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -131,4 +131,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  2.488   0.056   2.574 
+  2.564   0.048   2.635 

Modified: pkg/pomp/tests/gompertz.Rout.save
===================================================================
--- pkg/pomp/tests/gompertz.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/gompertz.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -133,4 +133,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  1.616   0.052   1.820 
+  1.576   0.052   1.652 

Modified: pkg/pomp/tests/logistic.Rout.save
===================================================================
--- pkg/pomp/tests/logistic.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/logistic.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -124,4 +124,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.944   0.072   1.143 
+  0.976   0.052   1.175 

Modified: pkg/pomp/tests/ou2-abc.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-abc.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-abc.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -139,4 +139,4 @@
 > 
 > proc.time()
    user  system elapsed 
- 11.092   0.068  11.369 
+ 11.422   0.073  11.497 

Modified: pkg/pomp/tests/ou2-bsmc.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-bsmc.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-bsmc.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -59,7 +59,7 @@
 > post <- smc$post
 > 
 > print(etime <- toc-tic)
-Time difference of 2.748923 secs
+Time difference of 2.789886 secs
 > 
 > print(
 +       cbind(
@@ -101,4 +101,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  4.712   0.032   4.777 
+  4.688   0.064   4.785 

Modified: pkg/pomp/tests/ou2-bsmc2.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-bsmc2.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-bsmc2.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -56,7 +56,7 @@
 > post <- smc$post
 > 
 > print(etime <- toc-tic)
-Time difference of 1.971769 secs
+Time difference of 2.022153 secs
 > 
 > print(
 +       cbind(
@@ -98,4 +98,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  3.540   0.060   3.626 
+  3.588   0.084   3.697 

Modified: pkg/pomp/tests/ou2-forecast.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-forecast.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-forecast.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -61,4 +61,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  1.596   0.072   1.793 
+  1.420   0.036   1.559 

Modified: pkg/pomp/tests/ou2-kalman.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-kalman.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-kalman.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -164,7 +164,7 @@
     117 function evaluations used
 > toc <- Sys.time()
 > print(toc-tic)
-Time difference of 3.520454 secs
+Time difference of 3.41739 secs
 > tic <- Sys.time()
 > print(loglik.mle <- -kalm.fit1$value,digits=4)
 [1] -477.2
@@ -188,4 +188,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  4.172   0.068   4.270 
+  3.933   0.035   3.954 

Modified: pkg/pomp/tests/ou2-mif-fp.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-mif-fp.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-mif-fp.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -47,8 +47,7 @@
 +             method="fp"
 +             )
 Warning message:
-mif warning: the 'pars' argument to 'mif' is unnecessary and deprecated and will be ignored.
-This behavior differs from that previous to 'pomp' version 0.62 
+mif warning: argument 'pars' is redundant and deprecated.  It will be removed in a future release. 
 > 
 > mif2 <- mif(ou2,Nmif=100,start=guess2,
 +             pars=c('alpha.2','alpha.3'),ivps=c('x1.0','x2.0'),
@@ -65,8 +64,7 @@
 +             method="fp"
 +             )
 Warning message:
-mif warning: the 'pars' argument to 'mif' is unnecessary and deprecated and will be ignored.
-This behavior differs from that previous to 'pomp' version 0.62 
+mif warning: argument 'pars' is redundant and deprecated.  It will be removed in a future release. 
 > 
 > plot(c(mif1,mif2))
 > 
@@ -76,4 +74,4 @@
 > 
 > proc.time()
    user  system elapsed 
- 20.933   0.064  21.259 
+ 25.136   0.029  25.180 

Modified: pkg/pomp/tests/ou2-mif.R
===================================================================
--- pkg/pomp/tests/ou2-mif.R	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-mif.R	2015-02-27 02:58:17 UTC (rev 1111)
@@ -19,7 +19,7 @@
 guess2[c('x1.0','x2.0','alpha.2','alpha.3')] <- 1.5*guess1[c('x1.0','x2.0','alpha.2','alpha.3')]
 
 mif1 <- mif(ou2,Nmif=30,start=guess1,
-            ivps=c('x1.0','x2.0'),
+            pars=c('alpha.2','alpha.3'),ivps=c('x1.0','x2.0'),
             rw.sd=c(
               x1.0=5,x2.0=5,
               alpha.2=0.1,alpha.3=0.1
@@ -33,7 +33,7 @@
             )
 
 mif2 <- mif(ou2,Nmif=30,start=guess2,
-            ivps=c('x1.0','x2.0'),
+            pars=c('alpha.2','alpha.3'),ivps=c('x1.0','x2.0'),
             transform=TRUE,
             rw.sd=c(
               x1.0=5,x2.0=5,
@@ -60,8 +60,9 @@
     mif(
         ou2,
         Nmif=1,
+        pars=c("alpha.1","alpha.4","x1.0"),
         ivps=c("x1.0","x2.0"),
-        rw.sd=c(x1.0=5,x2.0=5,alpha.1=0.1,alpha.4=0.2,alpha.3=-1),
+        rw.sd=c(x1.0=5,x2.0=5,alpha.1=0.1,alpha.4=0.2,alpha.3=0),
         Np=100,cooling.type="geometric",cooling.fraction=0.95^50,
         ic.lag=10,var.factor=1
         )
@@ -70,6 +71,62 @@
 try(
     mif(
         ou2,
+        Nmif=1,
+        pars=c("alpha.1","alpha.4"),
+        ivps=c("x1.0","x2.0"),
+        rw.sd=c(x1.0=5,x2.0=5,alpha.1=0,alpha.4=0.2,alpha.3=0),
+        Np=100,
+        cooling.type="geometric",cooling.fraction=0.95^50,
+        ic.lag=10,var.factor=1
+        )
+    )
+
+try(
+    mif(
+        ou2,
+        Nmif=1,
+        ivps=c("x1.0","x2.0"),
+        rw.sd=c(alpha.1=0.1,alpha.4=0.2,alpha.3=0),
+        Np=100,cooling.type="geometric",cooling.fraction=0.95^50,
+        cooling.factor=0.95,ic.lag=10,var.factor=1
+        )
+    )
+
+try(
+    mif(
+        ou2,
+        Nmif=1,
+        ivps=c("x1.0","x2.0"),
+        rw.sd=c(x1.0=5,x2.0=5,alpha.1=0.1,alpha.4=0.2,alpha.3=0),
+        Np=100,ic.lag=10,var.factor=1
+        )
+    )
+
+try(
+    mif(
+        ou2,
+        Nmif=1,
+        ivps=c("x1.0","x2.0"),
+        rw.sd=c(x1.0=5,x2.0=5,alpha.1=0,alpha.4=0.2,alpha.3=0),
+        Np=-10,cooling.type="geometric",cooling.fraction=0.95^50,
+        ic.lag=10,var.factor=1
+        )
+    )
+
+try(
+    mif(
+        ou2,
+        Nmif=-3,
+        ivps=c("x1.0","x2.0"),
+        rw.sd=c(x1.0=5,x2.0=5,alpha.1=0,alpha.4=0.2,alpha.3=0),
+        Np=11.6,cooling.type="geometric",cooling.fraction=0.95^50,
+        ic.lag=10,var.factor=1
+        )
+    )
+
+try(
+    mif(
+        ou2,
         Nmif=2,
         start=c(alpha.1=0.9,alpha.2=0,alpha.3=0,alpha.4=-Inf,sigma.1=1,sigma.2=0,sigma.3=2,tau=1,x1.0=50,x2.0=-50),
         ivps=c("x1.0","x2.0"),
@@ -94,6 +151,7 @@
 fit <- mif(
            ou2,
            Nmif=0,
+           pars=c("alpha.2","alpha.3"),
            ivps=c("x1.0","x2.0"),
            rw.sd=c(x1.0=5,x2.0=5,alpha.2=0.1,alpha.3=0.2,alpha.3=0),
            Np=100,cooling.type="geometric",cooling.fraction=0.95^50,
@@ -113,7 +171,7 @@
 ff <- pfilter(fit,pred.mean=T,filter.mean=T,pred.var=T,max.fail=100,verbose=T)
 ff <- pfilter(ff)
 fit <- mif(fit,rw.sd=c(x1.0=5,x2.0=5,alpha.2=0.1,alpha.3=0.1))
-fit <- continue(fit,Nmif=2,ivps=c("x1.0"),rw.sd=c(x1.0=5,alpha.2=0.1))
+fit <- continue(fit,Nmif=2,ivps=c("x1.0"),pars=c("alpha.2"))
 s <- coef(fit)
 s[2] <- 0.01
 fit <- mif(fit,Nmif=3,start=s)

Modified: pkg/pomp/tests/ou2-mif.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-mif.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-mif.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -52,7 +52,7 @@
 > guess2[c('x1.0','x2.0','alpha.2','alpha.3')] <- 1.5*guess1[c('x1.0','x2.0','alpha.2','alpha.3')]
 > 
 > mif1 <- mif(ou2,Nmif=30,start=guess1,
-+             ivps=c('x1.0','x2.0'),
++             pars=c('alpha.2','alpha.3'),ivps=c('x1.0','x2.0'),
 +             rw.sd=c(
 +               x1.0=5,x2.0=5,
 +               alpha.2=0.1,alpha.3=0.1
@@ -64,12 +64,13 @@
 +             cooling.factor=0.95,
 +             max.fail=100
 +             )
-Warning message:
-'cooling.factor' is deprecated.
+Warning messages:
+1: mif warning: argument 'pars' is redundant and deprecated.  It will be removed in a future release. 
+2: 'cooling.factor' is deprecated.
 See '?mif' for instructions on specifying the cooling schedule. 
 > 
 > mif2 <- mif(ou2,Nmif=30,start=guess2,
-+             ivps=c('x1.0','x2.0'),
++             pars=c('alpha.2','alpha.3'),ivps=c('x1.0','x2.0'),
 +             transform=TRUE,
 +             rw.sd=c(
 +               x1.0=5,x2.0=5,
@@ -82,6 +83,8 @@
 +             cooling.fraction=0.95^50,
 +             max.fail=100
 +             )
+Warning message:
+mif warning: argument 'pars' is redundant and deprecated.  It will be removed in a future release. 
 > 
 > pdf(file="ou2-mif.pdf")
 > plot(mif1)
@@ -100,17 +103,84 @@
 +     mif(
 +         ou2,
 +         Nmif=1,
++         pars=c("alpha.1","alpha.4","x1.0"),
 +         ivps=c("x1.0","x2.0"),
-+         rw.sd=c(x1.0=5,x2.0=5,alpha.1=0.1,alpha.4=0.2,alpha.3=-1),
++         rw.sd=c(x1.0=5,x2.0=5,alpha.1=0.1,alpha.4=0.2,alpha.3=0),
 +         Np=100,cooling.type="geometric",cooling.fraction=0.95^50,
 +         ic.lag=10,var.factor=1
 +         )
 +     )
-Error : mif error: 'rw.sd' must be a named non-negative numerical vector
+Error : mif error: 'pars' and 'ivps' must be mutually disjoint subsets of 'names(start)' and must have a positive random-walk SDs specified in 'rw.sd'
+In addition: Warning message:
+mif warning: argument 'pars' is redundant and deprecated.  It will be removed in a future release. 
 > 
 > try(
 +     mif(
 +         ou2,
++         Nmif=1,
++         pars=c("alpha.1","alpha.4"),
++         ivps=c("x1.0","x2.0"),
++         rw.sd=c(x1.0=5,x2.0=5,alpha.1=0,alpha.4=0.2,alpha.3=0),
++         Np=100,
++         cooling.type="geometric",cooling.fraction=0.95^50,
++         ic.lag=10,var.factor=1
++         )
++     )
+Error : mif error: 'pars' and 'ivps' must be mutually disjoint subsets of 'names(start)' and must have a positive random-walk SDs specified in 'rw.sd'
+In addition: Warning message:
+mif warning: argument 'pars' is redundant and deprecated.  It will be removed in a future release. 
+> 
+> try(
++     mif(
++         ou2,
++         Nmif=1,
++         ivps=c("x1.0","x2.0"),
++         rw.sd=c(alpha.1=0.1,alpha.4=0.2,alpha.3=0),
++         Np=100,cooling.type="geometric",cooling.fraction=0.95^50,
++         cooling.factor=0.95,ic.lag=10,var.factor=1
++         )
++     )
+Error : mif error: 'pars' and 'ivps' must be mutually disjoint subsets of 'names(start)' and must have a positive random-walk SDs specified in 'rw.sd'
+> 
+> try(
++     mif(
++         ou2,
++         Nmif=1,
++         ivps=c("x1.0","x2.0"),
++         rw.sd=c(x1.0=5,x2.0=5,alpha.1=0.1,alpha.4=0.2,alpha.3=0),
++         Np=100,ic.lag=10,var.factor=1
++         )
++     )
+Error : mif error: 'cooling.fraction' must be specified
+> 
+> try(
++     mif(
++         ou2,
++         Nmif=1,
++         ivps=c("x1.0","x2.0"),
++         rw.sd=c(x1.0=5,x2.0=5,alpha.1=0,alpha.4=0.2,alpha.3=0),
++         Np=-10,cooling.type="geometric",cooling.fraction=0.95^50,
++         ic.lag=10,var.factor=1
++         )
++     )
+Error in mif.internal(object = object, Nmif = Nmif, start = start, ivps = ivps,  : 
+  number of particles, 'Np', must always be positive
+> 
+> try(
++     mif(
++         ou2,
++         Nmif=-3,
++         ivps=c("x1.0","x2.0"),
++         rw.sd=c(x1.0=5,x2.0=5,alpha.1=0,alpha.4=0.2,alpha.3=0),
++         Np=11.6,cooling.type="geometric",cooling.fraction=0.95^50,
++         ic.lag=10,var.factor=1
++         )
++     )
+Error : mif error: 'Nmif' must be a positive integer
+> 
+> try(
++     mif(
++         ou2,
 +         Nmif=2,
 +         start=c(alpha.1=0.9,alpha.2=0,alpha.3=0,alpha.4=-Inf,sigma.1=1,sigma.2=0,sigma.3=2,tau=1,x1.0=50,x2.0=-50),
 +         ivps=c("x1.0","x2.0"),
@@ -139,11 +209,14 @@
 > fit <- mif(
 +            ou2,
 +            Nmif=0,
++            pars=c("alpha.2","alpha.3"),
 +            ivps=c("x1.0","x2.0"),
 +            rw.sd=c(x1.0=5,x2.0=5,alpha.2=0.1,alpha.3=0.2,alpha.3=0),
 +            Np=100,cooling.type="geometric",cooling.fraction=0.95^50,
 +            ic.lag=10,var.factor=1
 +            )
+Warning message:
+mif warning: argument 'pars' is redundant and deprecated.  It will be removed in a future release. 
 > fit <- mif(
 +            fit,
 +            Nmif=2,
@@ -178,7 +251,10 @@
 pfilter timestep 100 of 100 finished
 > ff <- pfilter(ff)
 > fit <- mif(fit,rw.sd=c(x1.0=5,x2.0=5,alpha.2=0.1,alpha.3=0.1))
-> fit <- continue(fit,Nmif=2,ivps=c("x1.0"),rw.sd=c(x1.0=5,alpha.2=0.1))
+> fit <- continue(fit,Nmif=2,ivps=c("x1.0"),pars=c("alpha.2"))
+Warning messages:
+1: mif warning: argument 'pars' is redundant and deprecated.  It will be removed in a future release. 
+2: mif warning: the variables 'alpha.3', 'x2.0' have positive random-walk SDs specified, but are included in neither 'pars' nor 'ivps'. These random walk SDs will be ignored. 
 > s <- coef(fit)
 > s[2] <- 0.01
 > fit <- mif(fit,Nmif=3,start=s)
@@ -217,4 +293,4 @@
 > 
 > proc.time()
    user  system elapsed 
- 12.032   0.080  12.261 
+ 15.048   0.037  15.088 

Modified: pkg/pomp/tests/ou2-mif2.R
===================================================================
--- pkg/pomp/tests/ou2-mif2.R	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-mif2.R	2015-02-27 02:58:17 UTC (rev 1111)
@@ -11,7 +11,7 @@
 
 set.seed(64857673L)
 mif1a <- mif(ou2,Nmif=100,start=guess1,
-             ivps=c('x1.0','x2.0'),
+             pars=c('alpha.2','alpha.3'),ivps=c('x1.0','x2.0'),
              rw.sd=c(
                x1.0=.5,x2.0=.5,
                alpha.2=0.1,alpha.3=0.1),
@@ -26,7 +26,7 @@
              )
 
 mif2a <- mif(ou2,Nmif=100,start=guess1,
-             ivps=c('x1.0','x2.0'),
+             pars=c('alpha.2','alpha.3'),ivps=c('x1.0','x2.0'),
              rw.sd=c(
                x1.0=0.5,x2.0=.5,
                alpha.2=0.1,alpha.3=0.1),
@@ -45,7 +45,7 @@
 
 set.seed(64857673L)
 mif1b <- mif(ou2,Nmif=50,start=guess1,
-             ivps=c('x1.0','x2.0'),
+             pars=c('alpha.2','alpha.3'),ivps=c('x1.0','x2.0'),
              rw.sd=c(
                x1.0=.5,x2.0=.5,
                alpha.2=0.1,alpha.3=0.1),
@@ -60,7 +60,7 @@
 mif1b <- continue(mif1b,Nmif=50)
 
 mif2b <- mif(ou2,Nmif=50,start=guess1,
-             ivps=c('x1.0','x2.0'),
+             pars=c('alpha.2','alpha.3'),ivps=c('x1.0','x2.0'),
              rw.sd=c(
                x1.0=0.5,x2.0=.5,
                alpha.2=0.1,alpha.3=0.1),
@@ -77,7 +77,7 @@
 mif2b <- continue(mif2b,Nmif=50)
 
 mif2c <- mif(ou2,Nmif=50,start=guess1,
-             ivps=c('x1.0','x2.0'),
+             pars=c('alpha.2','alpha.3'),ivps=c('x1.0','x2.0'),
              rw.sd=c(
                x1.0=0.5,x2.0=.5,
                alpha.2=0.1,alpha.3=0.1),

Modified: pkg/pomp/tests/ou2-mif2.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-mif2.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-mif2.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -32,7 +32,7 @@
 > 
 > set.seed(64857673L)
 > mif1a <- mif(ou2,Nmif=100,start=guess1,
-+              ivps=c('x1.0','x2.0'),
++              pars=c('alpha.2','alpha.3'),ivps=c('x1.0','x2.0'),
 +              rw.sd=c(
 +                x1.0=.5,x2.0=.5,
 +                alpha.2=0.1,alpha.3=0.1),
@@ -45,9 +45,11 @@
 +              method="mif2",
 +              tol=1e-8
 +              )
+Warning message:
+mif warning: argument 'pars' is redundant and deprecated.  It will be removed in a future release. 
 > 
 > mif2a <- mif(ou2,Nmif=100,start=guess1,
-+              ivps=c('x1.0','x2.0'),
++              pars=c('alpha.2','alpha.3'),ivps=c('x1.0','x2.0'),
 +              rw.sd=c(
 +                x1.0=0.5,x2.0=.5,
 +                alpha.2=0.1,alpha.3=0.1),
@@ -61,12 +63,14 @@
 +              method="mif",
 +              tol=1e-8
 +              )  
+Warning message:
+mif warning: argument 'pars' is redundant and deprecated.  It will be removed in a future release. 
 > 
 > plot(c(mif1a,mif2a))
 > 
 > set.seed(64857673L)
 > mif1b <- mif(ou2,Nmif=50,start=guess1,
-+              ivps=c('x1.0','x2.0'),
++              pars=c('alpha.2','alpha.3'),ivps=c('x1.0','x2.0'),
 +              rw.sd=c(
 +                x1.0=.5,x2.0=.5,
 +                alpha.2=0.1,alpha.3=0.1),
@@ -78,10 +82,12 @@
 +              cooling.fraction=0.05,
 +              method="mif2"
 +              )
+Warning message:
+mif warning: argument 'pars' is redundant and deprecated.  It will be removed in a future release. 
 > mif1b <- continue(mif1b,Nmif=50)
 > 
 > mif2b <- mif(ou2,Nmif=50,start=guess1,
-+              ivps=c('x1.0','x2.0'),
++              pars=c('alpha.2','alpha.3'),ivps=c('x1.0','x2.0'),
 +              rw.sd=c(
 +                x1.0=0.5,x2.0=.5,
 +                alpha.2=0.1,alpha.3=0.1),
@@ -95,13 +101,14 @@
 +              max.fail=100,
 +              method="mif"
 +              )  
-Warning message:
-'cooling.factor' is deprecated.
+Warning messages:
+1: mif warning: argument 'pars' is redundant and deprecated.  It will be removed in a future release. 
+2: 'cooling.factor' is deprecated.
 See '?mif' for instructions on specifying the cooling schedule. 
 > mif2b <- continue(mif2b,Nmif=50)
 > 
 > mif2c <- mif(ou2,Nmif=50,start=guess1,
-+              ivps=c('x1.0','x2.0'),
++              pars=c('alpha.2','alpha.3'),ivps=c('x1.0','x2.0'),
 +              rw.sd=c(
 +                x1.0=0.5,x2.0=.5,
 +                alpha.2=0.1,alpha.3=0.1),
@@ -113,6 +120,8 @@
 +              max.fail=100,
 +              method="mif2"
 +              )  
+Warning message:
+mif warning: argument 'pars' is redundant and deprecated.  It will be removed in a future release. 
 > mif2c <- continue(mif2c,Nmif=50)
 > 
 > plot(c(mif1b,mif2b))
@@ -135,4 +144,4 @@
 > 
 > proc.time()
    user  system elapsed 
- 51.303   0.148  51.806 
+ 66.333   0.037  66.430 

Modified: pkg/pomp/tests/ou2-nlf.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-nlf.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-nlf.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -85,4 +85,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  4.416   0.048   4.523 
+  4.380   0.092   6.425 

Modified: pkg/pomp/tests/ou2-pmcmc.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-pmcmc.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-pmcmc.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -138,4 +138,4 @@
 > 
 > proc.time()
    user  system elapsed 
- 32.378   0.076  32.745 
+ 28.662   0.057  28.743 

Modified: pkg/pomp/tests/ou2-probe.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-probe.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-probe.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -340,4 +340,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  7.692   0.072   7.942 
+  7.892   0.092   8.187 

Modified: pkg/pomp/tests/ou2-procmeas.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-procmeas.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-procmeas.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -54,4 +54,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.588   0.076   0.684 
+  0.408   0.048   0.479 

Modified: pkg/pomp/tests/ou2-simulate.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-simulate.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-simulate.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -35,7 +35,7 @@
 > ou2.sim <- simulate(ou2,params=p,nsim=100,seed=32043858)
 > toc <- Sys.time()
 > print(toc-tic)
-Time difference of 0.004848957 secs
+Time difference of 0.006910086 secs
 > 
 > coef(ou2,c('x1.0','x2.0')) <- c(-50,50)
 > 
@@ -46,4 +46,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.608   0.052   0.680 
+  0.508   0.040   0.572 

Modified: pkg/pomp/tests/ou2-spect.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-spect.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-spect.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -38,4 +38,4 @@
 > 
 > proc.time()
    user  system elapsed 
- 22.417   0.048  22.562 
+ 21.537   0.040  21.670 

Modified: pkg/pomp/tests/ou2-trajmatch.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-trajmatch.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ou2-trajmatch.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -175,4 +175,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  2.188   0.040   2.279 
+  1.712   0.060   1.801 

Modified: pkg/pomp/tests/partrans.Rout.save
===================================================================
--- pkg/pomp/tests/partrans.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/partrans.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -52,4 +52,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.600   0.052   0.668 
+  0.600   0.060   0.678 

Modified: pkg/pomp/tests/pfilter.Rout.save
===================================================================
--- pkg/pomp/tests/pfilter.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/pfilter.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -77,4 +77,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  8.604   0.040   8.824 
+  8.448   0.080   8.699 

Modified: pkg/pomp/tests/pomppomp.Rout.save
===================================================================
--- pkg/pomp/tests/pomppomp.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/pomppomp.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -55,4 +55,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.556   0.088   0.667 
+  0.580   0.064   0.663 

Modified: pkg/pomp/tests/prior.Rout.save
===================================================================
--- pkg/pomp/tests/prior.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/prior.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -73,4 +73,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.796   0.040   0.857 
+  0.736   0.056   0.809 

Modified: pkg/pomp/tests/ricker-bsmc.Rout.save
===================================================================
--- pkg/pomp/tests/ricker-bsmc.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ricker-bsmc.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -54,4 +54,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  2.608   0.076   2.850 
+  2.604   0.072   2.860 

Modified: pkg/pomp/tests/ricker-probe.Rout.save
===================================================================
--- pkg/pomp/tests/ricker-probe.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ricker-probe.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -297,4 +297,4 @@
 > 
 > proc.time()
    user  system elapsed 
- 12.064   0.080  12.363 
+ 11.976   0.072  12.278 

Modified: pkg/pomp/tests/ricker-spect.Rout.save
===================================================================
--- pkg/pomp/tests/ricker-spect.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ricker-spect.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -70,4 +70,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  2.320   0.064   2.577 
+  2.284   0.084   3.241 

Modified: pkg/pomp/tests/ricker.Rout.save
===================================================================
--- pkg/pomp/tests/ricker.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/ricker.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -83,4 +83,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.708   0.056   0.884 
+  0.704   0.048   0.884 

Modified: pkg/pomp/tests/rw2.Rout.save
===================================================================
--- pkg/pomp/tests/rw2.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/rw2.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -164,7 +164,7 @@
     }
     y
 }
-<environment: 0x2b3ac50>
+<environment: 0x2300468>
 measurement model density, dmeasure = 
 function (y, x, t, params, log, covars, ...) 
 {
@@ -177,7 +177,7 @@
         f
     else exp(f)
 }
-<environment: 0x2b3ac50>
+<environment: 0x2300468>
 prior simulator, rprior = 
 function not specified
 prior density, dprior = 
@@ -342,4 +342,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  0.996   0.040   1.062 
+  0.870   0.033   0.889 

Modified: pkg/pomp/tests/sir.Rout.save
===================================================================
--- pkg/pomp/tests/sir.Rout.save	2015-02-27 02:58:10 UTC (rev 1110)
+++ pkg/pomp/tests/sir.Rout.save	2015-02-27 02:58:17 UTC (rev 1111)
@@ -192,7 +192,7 @@
         method = 0L, zeronames = zeronames, tcovar = tcovar, 
         covar = covar, args = pairlist(...), gnsi = .getnativesymbolinfo)
 }
-<environment: 0x297a5b0>
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/pomp -r 1111


More information about the pomp-commits mailing list