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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jun 25 19:38:58 CEST 2014


Author: kingaa
Date: 2014-06-25 19:38:58 +0200 (Wed, 25 Jun 2014)
New Revision: 981

Modified:
   pkg/pomp/DESCRIPTION
   pkg/pomp/NAMESPACE
   pkg/pomp/R/abc-methods.R
   pkg/pomp/R/bsmc.R
   pkg/pomp/R/generics.R
   pkg/pomp/R/mif-methods.R
   pkg/pomp/R/pmcmc-methods.R
   pkg/pomp/R/probe.R
   pkg/pomp/inst/NEWS
   pkg/pomp/inst/NEWS.Rd
   pkg/pomp/man/abc-methods.Rd
   pkg/pomp/man/mif-methods.Rd
   pkg/pomp/man/pmcmc-methods.Rd
   pkg/pomp/tests/ou2-mif-fp.R
   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
Log:
- new 'mifList' class
- define plot methods for 'mifList'
- warn on ignored 'y' in 'plot(x,y)'
- deprecate 'compare.mif'

Modified: pkg/pomp/DESCRIPTION
===================================================================
--- pkg/pomp/DESCRIPTION	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/DESCRIPTION	2014-06-25 17:38:58 UTC (rev 981)
@@ -1,8 +1,8 @@
 Package: pomp
 Type: Package
 Title: Statistical inference for partially observed Markov processes
-Version: 0.51-4
-Date: 2014-06-23
+Version: 0.52-1
+Date: 2014-06-26
 Authors at R: c(person(given=c("Aaron","A."),family="King",
 		role=c("aut","cre"),email="kingaa at umich.edu"),
 	  person(given=c("Edward","L."),family="Ionides",role=c("aut")),

Modified: pkg/pomp/NAMESPACE
===================================================================
--- pkg/pomp/NAMESPACE	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/NAMESPACE	2014-06-25 17:38:58 UTC (rev 981)
@@ -43,7 +43,7 @@
 exportClasses(
               pomp,
               pfilterd.pomp,
-              mif,
+              mif,mifList,
               pmcmc,pmcmcList,
               traj.matched.pomp,
               probed.pomp,probe.matched.pomp,

Modified: pkg/pomp/R/abc-methods.R
===================================================================
--- pkg/pomp/R/abc-methods.R	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/R/abc-methods.R	2014-06-25 17:38:58 UTC (rev 981)
@@ -1,12 +1,12 @@
 ## this file contains short definitions of methods for the 'abc' class
 
-## extract the convergence record
+## extract the convergence record as an 'mcmc' object
 setMethod(
           'conv.rec',
           'abc',
           function (object, pars, ...) {
             if (missing(pars)) pars <- colnames(object at conv.rec)
-            coda::mcmc(object at conv.rec[,pars,drop=FALSE])
+            coda::mcmc(object at conv.rec[,pars,drop=FALSE],...)
           }
           )
 
@@ -21,6 +21,8 @@
             ## } else {
             ##   plot.ts(conv.rec(x,pars),xlab="iteration",...)
             ## }
+            if (!missing(y))
+              warning(sQuote("y")," is ignored")
             abc.diagnostics(c(x),pars=pars,scatter=scatter,...)
           }
           )
@@ -98,6 +100,7 @@
           }
           )
 
+## extract the convergence record as an 'mcmc.list' object
 setMethod(
           'conv.rec',
           signature=signature(object='abcList'),
@@ -109,7 +112,9 @@
 setMethod(
           "plot",
           signature=signature(x='abcList'),
-          definition=function (x, y = NULL, ...) {
+          definition=function (x, y, ...) {
+            if (!missing(y))
+              warning(sQuote("y")," is ignored")
             abc.diagnostics(x,...)
           }
           )

Modified: pkg/pomp/R/bsmc.R
===================================================================
--- pkg/pomp/R/bsmc.R	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/R/bsmc.R	2014-06-25 17:38:58 UTC (rev 981)
@@ -367,17 +367,17 @@
 
 setMethod(
           "bsmc",
-          "pomp",
-          function (object, params, Np, est,
-                    smooth = 0.1,
-                    ntries = 1,
-                    tol = 1e-17,
-                    lower = -Inf, upper = Inf,
-                    seed = NULL,
-                    verbose = getOption("verbose"),
-                    max.fail = 0,
-                    transform = FALSE,
-                    ...) {
+          signature=signature(object="pomp"),
+          definition = function (object, params, Np, est,
+            smooth = 0.1,
+            ntries = 1,
+            tol = 1e-17,
+            lower = -Inf, upper = Inf,
+            seed = NULL,
+            verbose = getOption("verbose"),
+            max.fail = 0,
+            transform = FALSE,
+            ...) {
             bsmc.internal(
                           object=object,
                           params=params,
@@ -397,7 +397,10 @@
           }
           )
 
-setMethod("$",signature(x="bsmcd.pomp"),function (x,name) slot(x,name))
+setMethod("$",
+          signature(x="bsmcd.pomp"),
+          definition = function (x, name) slot(x,name)
+          )
 
 bsmc.plot <- function (prior, post, pars, thin, ...) {
   p1 <- sample.int(n=ncol(prior),size=min(thin,ncol(prior)))
@@ -437,7 +440,9 @@
 setMethod(
           "plot",
           signature(x="bsmcd.pomp"),
-          function (x, ..., pars, thin) {
+          function (x, y, ..., pars, thin) {
+            if (!missing(y))
+              warning(sQuote("y")," is ignored")
             if (missing(pars)) pars <- names(coef(x,transform=!x at transform))
             if (missing(thin)) thin <- Inf
             bsmc.plot(

Modified: pkg/pomp/R/generics.R
===================================================================
--- pkg/pomp/R/generics.R	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/R/generics.R	2014-06-25 17:38:58 UTC (rev 981)
@@ -45,7 +45,6 @@
 setGeneric("eff.sample.size",function(object,...)standardGeneric("eff.sample.size"))
 ## convergence record
 setGeneric("conv.rec",function(object,...)standardGeneric("conv.rec"))
-
 ## stochastic simulation
 setGeneric("simulate",function(object,nsim=1,seed=NULL,...)standardGeneric("simulate"))
 

Modified: pkg/pomp/R/mif-methods.R
===================================================================
--- pkg/pomp/R/mif-methods.R	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/R/mif-methods.R	2014-06-25 17:38:58 UTC (rev 981)
@@ -89,11 +89,108 @@
 setMethod(
           "plot",
           "mif",
-          function (x, y = NULL, ...) {
-            compare.mif(x)
+          function (x, y, ...) {
+            if (!missing(y)) {
+              y <- substitute(y)
+              warning(sQuote(y)," is ignored")
+            }
+            mif.diagnostics(list(x))
           }
           )
 
+## mifList class
+setClass(
+         'mifList',
+         contains='list',
+         validity=function (object) {
+           if (!all(sapply(object,is,'mif'))) {
+             retval <- paste0(
+                              "error in ",sQuote("c"),
+                              ": dissimilar objects cannot be combined"
+                              )
+             return(retval)
+           }
+           d <- sapply(object,function(x)dim(x at conv.rec))
+           if (!all(apply(d,1,diff)==0)) {
+             retval <- paste0(
+                              "error in ",sQuote("c"),
+                              ": to be combined, ",sQuote("mif"),
+                              " objects must equal numbers of iterations"
+                              )
+             return(retval)
+           }
+           TRUE
+         }
+         )
+
+setMethod(
+          'c',
+          signature=signature(x='mif'),
+          definition=function (x, ...) {
+            y <- list(...)
+            if (length(y)==0) {
+              new("mifList",list(x))
+            } else {
+              p <- sapply(y,is,'mif')
+              pl <- sapply(y,is,'mifList')
+              if (any(!(p||pl)))
+                stop("cannot mix ",sQuote("mif"),
+                     " and non-",sQuote("mif")," objects")
+              y[p] <- lapply(y[p],list)
+              y[pl] <- lapply(y[pl],as,"list")
+              new("mifList",c(list(x),y,recursive=TRUE))
+            }
+          }
+          )
+
+setMethod(
+          'c',
+          signature=signature(x='mifList'),
+          definition=function (x, ...) {
+            y <- list(...)
+            if (length(y)==0) {
+              x
+            } else {
+              p <- sapply(y,is,'mif')
+              pl <- sapply(y,is,'mifList')
+              if (any(!(p||pl)))
+                stop("cannot mix ",sQuote("mif"),
+                     " and non-",sQuote("mif")," objects")
+              y[p] <- lapply(y[p],list)
+              y[pl] <- lapply(y[pl],as,"list")
+              new("mifList",c(as(x,"list"),y,recursive=TRUE))
+            }
+          }
+          )
+
+setMethod(
+          "[",
+          signature=signature(x="mifList"),
+          definition=function(x, i, ...) {
+            new('mifList',as(x,"list")[i])
+          }
+          )
+
+setMethod(
+          'conv.rec',
+          signature=signature(object='mifList'),
+          definition=function (object, ...) {
+            lapply(object,conv.rec,...)
+          }
+          )
+
+setMethod(
+          "plot",
+          signature=signature(x='mifList'),
+          definition=function (x, y, ...) {
+            if (!missing(y)) {
+              y <- substitute(y)
+              warning(sQuote(y)," is ignored")
+            }
+            mif.diagnostics(x)
+          }
+          )
+
 predvarplot.mif <- function (object, pars, type = 'l', mean = FALSE, ...) {
   if (!is(object,'mif'))
     stop("predvarplot error: ",sQuote("object")," must be of class ",sQuote("mif"),call.=FALSE)
@@ -112,10 +209,12 @@
 }
 
 compare.mif <- function (z) {
-  ## assumes that x is a list of mifs with identical structure
-  if (!is.list(z)) z <- list(z)
-  if (!all(sapply(z,function(x)is(x,'mif'))))
-    stop("compare.mif error: ",sQuote("z")," must be a mif object or a list of mif objects",call.=FALSE)
+  stop(sQuote("compare.mif")," has been deprecated in favor of ",
+       sQuote("plot"))
+}
+
+mif.diagnostics <- function (z) {
+  ## assumes that z is a list of mifs with identical structure
   mar.multi <- c(0,5.1,0,2.1)
   oma.multi <- c(6,0,5,0)
   xx <- z[[1]]

Modified: pkg/pomp/R/pmcmc-methods.R
===================================================================
--- pkg/pomp/R/pmcmc-methods.R	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/R/pmcmc-methods.R	2014-06-25 17:38:58 UTC (rev 981)
@@ -9,7 +9,7 @@
           signature=signature(object='pmcmc'),
           function (object, pars, ...) {
             if (missing(pars)) pars <- colnames(object at conv.rec)
-            coda::mcmc(object at conv.rec[,pars,drop=FALSE])
+            coda::mcmc(object at conv.rec[,pars,drop=FALSE],...)
           }
           )
 
@@ -17,7 +17,9 @@
 setMethod(
           "plot",
           signature=signature(x='pmcmc'),
-          function (x, y = NULL, ...) {
+          function (x, y, ...) {
+            if (!missing(y))
+              warning(sQuote("y")," is ignored")
             pmcmc.diagnostics(list(x))
           }
           )
@@ -96,6 +98,7 @@
           }
           )
 
+## extract the convergence records as a coda::mcmc.list object
 setMethod(
           'conv.rec',
           signature=signature(object='pmcmcList'),
@@ -107,7 +110,9 @@
 setMethod(
           "plot",
           signature=signature(x='pmcmcList'),
-          definition=function (x, y = NULL, ...) {
+          definition=function (x, y, ...) {
+            if (!missing(y))
+              warning(sQuote("y")," is ignored")
             pmcmc.diagnostics(x)
           }
           )

Modified: pkg/pomp/R/probe.R
===================================================================
--- pkg/pomp/R/probe.R	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/R/probe.R	2014-06-25 17:38:58 UTC (rev 981)
@@ -104,7 +104,7 @@
           }
           )
 
-probeplot.internal <- function (x, y, ...) {
+probeplot.internal <- function (x, ...) {
   ##function for plotting diagonal panels
   diag.panel.hist <- function(x, ...) {
     ##plot a histogram for the simulations
@@ -170,9 +170,12 @@
   }
 }
 
-setMethod("plot","probed.pomp", 
-          function (x, y, ...) {
-            probeplot.internal(x=x,y=y,...)
+setMethod("plot",
+          signature=signature(x="probed.pomp"), 
+          definition=function (x, y, ...) {
+            if (!missing(y))
+              warning(sQuote("y")," is ignored")
+            probeplot.internal(x=x,...)
           }
           )
 

Modified: pkg/pomp/inst/NEWS
===================================================================
--- pkg/pomp/inst/NEWS	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/inst/NEWS	2014-06-25 17:38:58 UTC (rev 981)
@@ -1,5 +1,14 @@
 _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._5_2-_1:
+
+        • The new ‘mifList’ class facilitates approaches based on
+          multiple ‘mif’ runs.  The ‘c’ method constructs ‘mifList’s
+          from ‘mif’s.  The ‘plot’ method produces diagnostic plots.
+
+        • ‘compare.mif’ is now deprecated in favor of ‘plot’ applied to
+          a ‘mif’ or ‘mifList’.
+
 _C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._5_1-_3:
 
         • ‘transform’ argument for ‘pmcmc’ and ‘abc’ has been removed.

Modified: pkg/pomp/inst/NEWS.Rd
===================================================================
--- pkg/pomp/inst/NEWS.Rd	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/inst/NEWS.Rd	2014-06-25 17:38:58 UTC (rev 981)
@@ -1,5 +1,13 @@
 \name{NEWS}
 \title{News for package `pomp'}
+\section{Changes in \pkg{pomp} version 0.52-1}{
+  \itemize{
+    \item The new \code{mifList} class facilitates approaches based on multiple \code{mif} runs.
+    The \code{c} method constructs \code{mifList}s from \code{mif}s.
+    The \code{plot} method produces diagnostic plots.
+    \item \code{compare.mif} is now deprecated in favor of \code{plot} applied to a \code{mif} or \code{mifList}.
+  }
+}
 \section{Changes in \pkg{pomp} version 0.51-3}{
   \itemize{
     \item \code{transform} argument for \code{pmcmc} and \code{abc} has been removed.

Modified: pkg/pomp/man/abc-methods.Rd
===================================================================
--- pkg/pomp/man/abc-methods.Rd	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/man/abc-methods.Rd	2014-06-25 17:38:58 UTC (rev 981)
@@ -45,6 +45,9 @@
       \code{conv.rec(object, pars)} returns the columns of the convergence-record matrix corresponding to the names in \code{pars}.
       By default, all rows are returned.
     }
+    \item{c}{
+      Concatenates \code{abc} objects into an \code{abcList}.
+    }
     \item{plot}{
       Diagnostic plots.
     }

Modified: pkg/pomp/man/mif-methods.Rd
===================================================================
--- pkg/pomp/man/mif-methods.Rd	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/man/mif-methods.Rd	2014-06-25 17:38:58 UTC (rev 981)
@@ -6,22 +6,37 @@
 \alias{conv.rec}
 \alias{conv.rec,mif-method}
 \alias{conv.rec-mif}
+\alias{conv.rec,mifList-method}
+\alias{conv.rec-mifList}
 \alias{plot-mif}
 \alias{plot,mif-method}
+\alias{plot-mifList}
+\alias{plot,mifList-method}
+\alias{mifList-class}
+\alias{c-mif}
+\alias{c,mif-method}
+\alias{c-mifList}
+\alias{c,mifList-method}
+\alias{[-mifList}
+\alias{[,mifList-method}
 \alias{compare.mif}
 \title{Methods of the "mif" class}
 \description{Methods of the \code{mif} class.}
 \usage{
 \S4method{logLik}{mif}(object, \dots)
 \S4method{conv.rec}{mif}(object, pars, transform = FALSE, \dots)
-\S4method{plot}{mif}(x, y = NULL, \dots)
+\S4method{conv.rec}{mifList}(object, \dots)
+\S4method{plot}{mif}(x, y, \dots)
+\S4method{plot}{mifList}(x, y, \dots)
+\S4method{c}{mif}(x, \dots, recursive = FALSE)
+\S4method{c}{mifList}(x, \dots, recursive = FALSE)
 compare.mif(z)
 }
 \arguments{
   \item{object}{The \code{mif} object.}
   \item{pars}{Names of parameters.}
   \item{x}{The \code{mif} object.}
-  \item{y}{Ignored.}
+  \item{y, recursive}{Ignored.}
   \item{z}{A \code{mif} object or list of \code{mif} objects.}
   \item{transform}{
     optional logical;
@@ -41,13 +56,15 @@
     \item{logLik}{
       Returns the value in the \code{loglik} slot.
     }
-    \item{compare.mif}{
-      Given a \code{mif} object or a list of \code{mif} objects, \code{compare.mif} produces a set of diagnostic plots.
+    \item{c}{
+      Concatenates \code{mif} objects into an \code{mifList}.
     }
     \item{plot}{
       Plots a series of diagnostic plots.
-      When \code{x} is a \code{mif} object, \code{plot(x)} is equivalent to \code{compare.mif(list(x))}.
     }
+    \item{compare.mif}{
+      Deprecated: use \code{plot} instead.
+    }
   }
 }
 \author{Aaron A. King \email{kingaa at umich dot edu}}

Modified: pkg/pomp/man/pmcmc-methods.Rd
===================================================================
--- pkg/pomp/man/pmcmc-methods.Rd	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/man/pmcmc-methods.Rd	2014-06-25 17:38:58 UTC (rev 981)
@@ -24,7 +24,7 @@
 \S4method{logLik}{pmcmc}(object, \dots)
 \S4method{conv.rec}{pmcmc}(object, pars, \dots)
 \S4method{conv.rec}{pmcmcList}(object, \dots)
-\S4method{plot}{pmcmc}(x, y = NULL, \dots)
+\S4method{plot}{pmcmc}(x, y, \dots)
 \S4method{plot}{pmcmcList}(x, y, \dots)
 \S4method{c}{pmcmc}(x, \dots, recursive = FALSE)
 \S4method{c}{pmcmcList}(x, \dots, recursive = FALSE)

Modified: pkg/pomp/tests/ou2-mif-fp.R
===================================================================
--- pkg/pomp/tests/ou2-mif-fp.R	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/tests/ou2-mif-fp.R	2014-06-25 17:38:58 UTC (rev 981)
@@ -41,6 +41,6 @@
             method="fp"
             )
 
-compare.mif(list(mif1,mif2))
+plot(c(mif1,mif2))
 
 dev.off()

Modified: pkg/pomp/tests/ou2-mif-fp.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-mif-fp.Rout.save	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/tests/ou2-mif-fp.Rout.save	2014-06-25 17:38:58 UTC (rev 981)
@@ -1,5 +1,5 @@
 
-R version 3.0.3 (2014-03-06) -- "Warm Puppy"
+R version 3.1.0 (2014-04-10) -- "Spring Dance"
 Copyright (C) 2014 The R Foundation for Statistical Computing
 Platform: x86_64-unknown-linux-gnu (64-bit)
 
@@ -20,6 +20,8 @@
 Loading required package: subplex
 Loading required package: nloptr
 Loading required package: deSolve
+Loading required package: coda
+Loading required package: lattice
 > 
 > pompExample(ou2)
 newly created pomp object(s):
@@ -64,7 +66,7 @@
 +             method="fp"
 +             )
 > 
-> compare.mif(list(mif1,mif2))
+> plot(c(mif1,mif2))
 > 
 > dev.off()
 null device 
@@ -72,4 +74,4 @@
 > 
 > proc.time()
    user  system elapsed 
- 19.269   0.064  19.562 
+ 22.609   0.039  22.668 

Modified: pkg/pomp/tests/ou2-mif.R
===================================================================
--- pkg/pomp/tests/ou2-mif.R	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/tests/ou2-mif.R	2014-06-25 17:38:58 UTC (rev 981)
@@ -49,9 +49,9 @@
 
 pdf(file="ou2-mif.pdf")
 plot(mif1)
-compare.mif(mif2)
-try(compare.mif(mif1,mif2))
-compare.mif(list(mif1,mif2))
+plot(mif2)
+try(plot(mif1,mif2))
+plot(c(mif1,mif2))
 dev.off()
 
 set.seed(33848585L)

Modified: pkg/pomp/tests/ou2-mif.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-mif.Rout.save	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/tests/ou2-mif.Rout.save	2014-06-25 17:38:58 UTC (rev 981)
@@ -1,5 +1,5 @@
 
-R version 3.0.3 (2014-03-06) -- "Warm Puppy"
+R version 3.1.0 (2014-04-10) -- "Spring Dance"
 Copyright (C) 2014 The R Foundation for Statistical Computing
 Platform: x86_64-unknown-linux-gnu (64-bit)
 
@@ -20,6 +20,8 @@
 Loading required package: subplex
 Loading required package: nloptr
 Loading required package: deSolve
+Loading required package: coda
+Loading required package: lattice
 > 
 > pompExample(ou2)
 newly created pomp object(s):
@@ -85,10 +87,11 @@
 > 
 > pdf(file="ou2-mif.pdf")
 > plot(mif1)
-> compare.mif(mif2)
-> try(compare.mif(mif1,mif2))
-Error in compare.mif(mif1, mif2) : unused argument (mif2)
-> compare.mif(list(mif1,mif2))
+> plot(mif2)
+> try(plot(mif1,mif2))
+Warning message:
+In plot(mif1, mif2) : 'mif2' is ignored
+> plot(c(mif1,mif2))
 > dev.off()
 null device 
           1 
@@ -282,4 +285,4 @@
 > 
 > proc.time()
    user  system elapsed 
- 11.828   0.036  12.014 
+ 14.306   0.041  14.344 

Modified: pkg/pomp/tests/ou2-mif2.R
===================================================================
--- pkg/pomp/tests/ou2-mif2.R	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/tests/ou2-mif2.R	2014-06-25 17:38:58 UTC (rev 981)
@@ -41,7 +41,7 @@
              tol=1e-8
              )  
 
-compare.mif(list(mif1a,mif2a))
+plot(c(mif1a,mif2a))
 
 set.seed(64857673L)
 mif1b <- mif(ou2,Nmif=50,start=guess1,
@@ -91,11 +91,16 @@
              )  
 mif2c <- continue(mif2c,Nmif=50)
 
-compare.mif(list(mif1b,mif2b))
+plot(c(mif1b,mif2b))
 
-compare.mif(list(mif1a,mif1b))
-compare.mif(list(mif2a,mif2b))
+plot(c(mif1a,mif1b))
+plot(c(mif2a,mif2b))
 
-compare.mif(list(mif1b,mif2c))
+plot(mfl1 <- c(mif1b,mif2c))
 
+mfl2 <- c(mfl1,mif2c)
+mfl3 <- c(mif2a,mfl1)
+
+try(c(mif2a,continue(mif2b,Nmif=1)))
+
 dev.off()

Modified: pkg/pomp/tests/ou2-mif2.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-mif2.Rout.save	2014-06-23 14:13:43 UTC (rev 980)
+++ pkg/pomp/tests/ou2-mif2.Rout.save	2014-06-25 17:38:58 UTC (rev 981)
@@ -1,5 +1,5 @@
 
-R version 3.0.3 (2014-03-06) -- "Warm Puppy"
+R version 3.1.0 (2014-04-10) -- "Spring Dance"
 Copyright (C) 2014 The R Foundation for Statistical Computing
 Platform: x86_64-unknown-linux-gnu (64-bit)
 
@@ -20,6 +20,8 @@
 Loading required package: subplex
 Loading required package: nloptr
 Loading required package: deSolve
+Loading required package: coda
+Loading required package: lattice
 > 
 > pompExample(ou2)
 newly created pomp object(s):
@@ -64,7 +66,7 @@
 +              tol=1e-8
 +              )  
 > 
-> compare.mif(list(mif1a,mif2a))
+> plot(c(mif1a,mif2a))
 > 
 > set.seed(64857673L)
 > mif1b <- mif(ou2,Nmif=50,start=guess1,
@@ -117,17 +119,24 @@
 +              )  
 > mif2c <- continue(mif2c,Nmif=50)
 > 
-> compare.mif(list(mif1b,mif2b))
+> plot(c(mif1b,mif2b))
 > 
-> compare.mif(list(mif1a,mif1b))
-> compare.mif(list(mif2a,mif2b))
+> plot(c(mif1a,mif1b))
+> plot(c(mif2a,mif2b))
 > 
-> compare.mif(list(mif1b,mif2c))
+> plot(mfl1 <- c(mif1b,mif2c))
 > 
+> mfl2 <- c(mfl1,mif2c)
+> mfl3 <- c(mif2a,mfl1)
+> 
+> try(c(mif2a,continue(mif2b,Nmif=1)))
+Error in validObject(.Object) : 
+  invalid class "mifList" object: error in 'c': to be combined, 'mif' objects must equal numbers of iterations
+> 
 > dev.off()
 null device 
           1 
 > 
 > proc.time()
    user  system elapsed 
- 50.335   0.068  50.772 
+ 59.213   0.057  59.317 



More information about the pomp-commits mailing list