[Pomp-commits] r928 - in pkg/pomp: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Apr 18 17:40:16 CEST 2014


Author: kingaa
Date: 2014-04-18 17:40:15 +0200 (Fri, 18 Apr 2014)
New Revision: 928

Modified:
   pkg/pomp/DESCRIPTION
   pkg/pomp/R/abc.R
   pkg/pomp/R/bsmc.R
   pkg/pomp/R/mif.R
   pkg/pomp/R/pfilter.R
   pkg/pomp/R/pmcmc.R
   pkg/pomp/R/pomp-class.R
   pkg/pomp/R/probe-match.R
   pkg/pomp/R/probe.R
   pkg/pomp/R/rprocess-pomp.R
   pkg/pomp/R/spect.R
   pkg/pomp/R/traj-match.R
   pkg/pomp/man/eulermultinom.Rd
   pkg/pomp/man/gompertz.Rd
   pkg/pomp/man/mif-class.Rd
   pkg/pomp/man/mif-methods.Rd
   pkg/pomp/man/pomp.Rd
Log:
- use 'slots' instead of 'representation' in class definitions ('setClass').  Note this has the effect of requiring R>=3.0.0.
- improvements/corrections in the documentation


Modified: pkg/pomp/DESCRIPTION
===================================================================
--- pkg/pomp/DESCRIPTION	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/DESCRIPTION	2014-04-18 15:40:15 UTC (rev 928)
@@ -2,7 +2,7 @@
 Type: Package
 Title: Statistical inference for partially observed Markov processes
 Version: 0.50-1
-Date: 2014-04-17
+Date: 2014-04-18
 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")),
@@ -18,7 +18,7 @@
 	  )
 URL: http://pomp.r-forge.r-project.org
 Description: Inference methods for partially-observed Markov processes
-Depends: R(>= 2.15.1), stats, graphics, methods, mvtnorm, subplex, nloptr, deSolve
+Depends: R(>= 3.0.0), stats, graphics, methods, mvtnorm, subplex, nloptr, deSolve
 License: GPL(>= 2)
 LazyData: true
 BuildVignettes: false

Modified: pkg/pomp/R/abc.R
===================================================================
--- pkg/pomp/R/abc.R	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/R/abc.R	2014-04-18 15:40:15 UTC (rev 928)
@@ -2,7 +2,7 @@
 setClass(
          'abc',
          contains='pomp',
-         representation=representation(
+         slots=c(
            pars = 'character',
            transform = 'logical',
            Nabc = 'integer',

Modified: pkg/pomp/R/bsmc.R
===================================================================
--- pkg/pomp/R/bsmc.R	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/R/bsmc.R	2014-04-18 15:40:15 UTC (rev 928)
@@ -14,7 +14,7 @@
 setClass(
          "bsmcd.pomp",
          contains="pomp",
-         representation=representation(
+         slots=c(
            transform="logical",
            post="array",
            prior="array",

Modified: pkg/pomp/R/mif.R
===================================================================
--- pkg/pomp/R/mif.R	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/R/mif.R	2014-04-18 15:40:15 UTC (rev 928)
@@ -4,7 +4,7 @@
 setClass(
          'mif',
          contains='pfilterd.pomp',
-         representation=representation(
+         slots=c(
            transform = "logical",
            ivps = 'character',
            pars = 'character',

Modified: pkg/pomp/R/pfilter.R
===================================================================
--- pkg/pomp/R/pfilter.R	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/R/pfilter.R	2014-04-18 15:40:15 UTC (rev 928)
@@ -3,7 +3,7 @@
 setClass(
          "pfilterd.pomp",
          contains="pomp",
-         representation=representation(
+         slots=c(
            pred.mean="array",
            pred.var="array",
            filter.mean="array",

Modified: pkg/pomp/R/pmcmc.R
===================================================================
--- pkg/pomp/R/pmcmc.R	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/R/pmcmc.R	2014-04-18 15:40:15 UTC (rev 928)
@@ -2,14 +2,14 @@
 setClass(
          'pmcmc',
          contains='pfilterd.pomp',
-         representation(
-                        pars = 'character',
-                        transform = 'logical',
-                        Nmcmc = 'integer',
-                        random.walk.sd = 'numeric',
-                        conv.rec = 'matrix',
-                        log.prior = 'numeric'
-                        )
+         slots=c(
+           pars = 'character',
+           transform = 'logical',
+           Nmcmc = 'integer',
+           random.walk.sd = 'numeric',
+           conv.rec = 'matrix',
+           log.prior = 'numeric'
+           )
          )
 
 pmcmc.internal <- function (object, Nmcmc,

Modified: pkg/pomp/R/pomp-class.R
===================================================================
--- pkg/pomp/R/pomp-class.R	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/R/pomp-class.R	2014-04-18 15:40:15 UTC (rev 928)
@@ -14,7 +14,7 @@
 ## define the pomp class
 setClass(
          'pomp',
-         representation=representation(
+         slots=c(
            data = 'array',
            times = 'numeric',
            t0 = 'numeric',
@@ -69,7 +69,7 @@
            has.trans=FALSE,
            par.trans=pomp.fun(),
            par.untrans=pomp.fun(),
-           PACKAGE="",
+           PACKAGE=character(0),
            userdata=list()
            ),
          validity=function (object) {

Modified: pkg/pomp/R/probe-match.R
===================================================================
--- pkg/pomp/R/probe-match.R	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/R/probe-match.R	2014-04-18 15:40:15 UTC (rev 928)
@@ -1,7 +1,7 @@
 setClass(
          "probe.matched.pomp",
          contains="probed.pomp",
-         representation=representation(
+         slots=c(
            transform="logical",
            est="character",
            fail.value="numeric",

Modified: pkg/pomp/R/probe.R
===================================================================
--- pkg/pomp/R/probe.R	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/R/probe.R	2014-04-18 15:40:15 UTC (rev 928)
@@ -1,15 +1,15 @@
 setClass(
          "probed.pomp",
          contains="pomp",
-         representation(
-                        probes="list",
-                        datvals="numeric",
-                        simvals="array",
-                        quantiles="numeric",
-                        pvals="numeric",
-                        synth.loglik="numeric",
-                        seed="integer"
-                        )
+         slots=c(
+           probes="list",
+           datvals="numeric",
+           simvals="array",
+           quantiles="numeric",
+           pvals="numeric",
+           synth.loglik="numeric",
+           seed="integer"
+           )
          )
 
 probe.internal <- function (object, probes, params, nsim = 1, seed = NULL, ...) {

Modified: pkg/pomp/R/rprocess-pomp.R
===================================================================
--- pkg/pomp/R/rprocess-pomp.R	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/R/rprocess-pomp.R	2014-04-18 15:40:15 UTC (rev 928)
@@ -3,7 +3,10 @@
 rprocess.internal <- function (object, xstart, times, params, offset = 0, .getnativesymbolinfo = TRUE, ...)
   .Call(do_rprocess,object,xstart,times,params,offset,.getnativesymbolinfo)
 
-setMethod("rprocess","pomp",
-          function (object, xstart, times, params, offset = 0, ...)
-          rprocess.internal(object=object,xstart=xstart,times=times,params=params,offset=offset,...)
+setMethod(
+          "rprocess",
+          signature=signature(object="pomp"),
+          definition=function (object, xstart, times, params, offset = 0, ...) {
+            rprocess.internal(object=object,xstart=xstart,times=times,params=params,offset=offset,...)
+          }
           )

Modified: pkg/pomp/R/spect.R
===================================================================
--- pkg/pomp/R/spect.R	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/R/spect.R	2014-04-18 15:40:15 UTC (rev 928)
@@ -6,7 +6,7 @@
 setClass(
          "spect.pomp",
          contains="pomp",
-         representation=representation(
+         slots=c(
            kernel.width="numeric",
            transform="function",
            freq="numeric",

Modified: pkg/pomp/R/traj-match.R
===================================================================
--- pkg/pomp/R/traj-match.R	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/R/traj-match.R	2014-04-18 15:40:15 UTC (rev 928)
@@ -1,7 +1,7 @@
 setClass(
          "traj.matched.pomp",
          contains="pomp",
-         representation=representation(
+         slots=c(
            transform="logical",
            est="character",
            evals="integer",

Modified: pkg/pomp/man/eulermultinom.Rd
===================================================================
--- pkg/pomp/man/eulermultinom.Rd	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/man/eulermultinom.Rd	2014-04-18 15:40:15 UTC (rev 928)
@@ -38,7 +38,7 @@
 
   \code{deulermultinom(x=x,size=N,rate=r,dt=dt)}.
   
-  Breto & Ionides discuss how an infinitesimally overdispersed death process can be constructed by compounding a binomial process with a Gamma white noise process.
+  Bret\'o & Ionides discuss how an infinitesimally overdispersed death process can be constructed by compounding a binomial process with a Gamma white noise process.
   The Euler approximation of the resulting process can be obtained as follows.
   Let the increments of the equidispersed process be given by
 
@@ -49,15 +49,14 @@
   That is, \eqn{\Delta W} has mean \eqn{\Delta t} and variance \eqn{\sigma^2 \Delta t}.
   The resulting process is overdispersed and converges (as \eqn{\Delta t} goes to zero) to a well-defined process.
   The following lines of \R code accomplish this:
-
-  \code{dW <- rgammawn(sigma=sigma,dt=dt)}
-  
-  \code{dn <- reulermultinom(size=N,rate=r,dt=dW)}
-
+  \preformatted{
+    dW <- rgammawn(sigma=sigma,dt=dt)
+    dn <- reulermultinom(size=N,rate=r,dt=dW)
+  }
   or
-
-  \code{dn <- reulermultinom(size=N,rate=r*dW/dt,dt=dt)}.
-  
+  \preformatted{
+    dn <- reulermultinom(size=N,rate=r*dW/dt,dt=dt).
+  }
   He et al. use such overdispersed death processes in modeling measles.
   
   For all of the functions described here, direct access to the underlying C routines is available:
@@ -86,7 +85,7 @@
 print(dn <- reulermultinom(5,size=100,rate=c(a=1,b=2,c=3),dt=dW))
 }
 \references{
-  C. Bret\\'o & E. L. Ionides,
+  C. Bret\'o & E. L. Ionides,
   Compound Markov counting processes and their applications to modeling infinitesimally over-dispersed systems.
   Stoch. Proc. Appl., 121:2571--2591, 2011.
 

Modified: pkg/pomp/man/gompertz.Rd
===================================================================
--- pkg/pomp/man/gompertz.Rd	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/man/gompertz.Rd	2014-04-18 15:40:15 UTC (rev 928)
@@ -18,6 +18,6 @@
 coef(gompertz,transform=TRUE)
 }
 \seealso{
-  \code{\link{pomp-class}} and the "intro_to_pomp" vignette.
+  the \dQuote{Introduction to \pkg{pomp}} vignette
 }
 \keyword{datasets}

Modified: pkg/pomp/man/mif-class.Rd
===================================================================
--- pkg/pomp/man/mif-class.Rd	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/man/mif-class.Rd	2014-04-18 15:40:15 UTC (rev 928)
@@ -13,24 +13,23 @@
 }
 \section{Slots}{
   A \code{mif} object is derived from a \code{pfilterd.pomp} object and therefore has all the slots of such an object.
-  See \code{\link{pomp-class}} for details.
-  A full description of slots in a \code{mif} object follows.
+  A description of \code{mif}-specific slots follows.
   \describe{
     \item{ivps}{
-      A character vector containing the names of initial-value parameters (IVPs).
+      character; contains the names of initial-value parameters (IVPs).
       These are parameters which are to be estimated using fixed-lag smoothing.
     }
     \item{pars}{
-      A character vector containing the names of parameters to be estimated using MIF.
+      character; contains the names of parameters to be estimated using MIF.
     }
     \item{transform}{
-      A logical scalar; was the estimation done on the transformed scale?
+      logical scalar; was the estimation done on the transformed scale?
     }
     \item{Nmif}{
-      Number of MIF iterations that have been completed.
+      integer; number of MIF iterations that have been completed.
     }
     \item{particles}{
-      A function of prototype \code{particles(Np,center,sd,...)} that draws particles from a distribution centered on \code{center} and with width proportional to \code{sd}.
+      function of prototype \code{particles(Np,center,sd,...)} that draws particles from a distribution centered on \code{center} and with width proportional to \code{sd}.
       This function can be optionally specified by the user.
     }
     \item{var.factor}{
@@ -46,10 +45,10 @@
       character; the mif update method.
     }
     \item{random.walk.sd}{
-      A named vector containing the random-walk variance to be used for ordinary parameters.
+      named vector containing the random-walk variance to be used for ordinary parameters.
     }
     \item{conv.rec}{
-      The \dQuote{convergence record}: a matrix containing a record of the parameter values, log likelihoods, and other pertinent information, with one row for each MIF iteration.
+      the \dQuote{convergence record}: a matrix containing a record of the parameter values, log likelihoods, and other pertinent information, with one row for each MIF iteration.
     }
     \item{pred.mean, pred.var, filter.mean,
       eff.sample.size, cond.loglik, saved.states, saved.params, seed,
@@ -63,22 +62,13 @@
   }
 }
 \section{Extends}{
-  Class \code{pomp}, directly.
-  See \code{\link{pomp-class}}.
+  Class \code{pfilterd.pomp}, directly.
+  See \code{\link{pfilter}}.
 }
 \section{Methods}{
   See \code{\link{mif}}, \link{mif-methods}, \link{particles-mif}
 }
-\references{
-  E. L. Ionides, C. Bret\\'o, & A. A. King,
-  Inference for nonlinear dynamical systems,
-  Proc. Natl. Acad. Sci. U.S.A., 103:18438--18443, 2006.
-
-  A. A. King, E. L. Ionides, M. Pascual, and M. J. Bouma,
-  Inapparent infections and cholera dynamics,
-  Nature, 454:877--880, 2008.
-}
 \author{Aaron A. King \email{kingaa at umich dot edu}}
-\seealso{\code{\link{mif}}, \link{mif-methods}, \code{\link{pomp}}, \link{pomp-class}}
+\seealso{\code{\link{mif}}, \link{mif-methods}, \code{\link{pfilter}}, \code{\link{pomp}}, \link{pomp-class}}
 \keyword{models}
 \keyword{ts}

Modified: pkg/pomp/man/mif-methods.Rd
===================================================================
--- pkg/pomp/man/mif-methods.Rd	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/man/mif-methods.Rd	2014-04-18 15:40:15 UTC (rev 928)
@@ -10,7 +10,7 @@
 \alias{plot,mif-method}
 \alias{compare.mif}
 \title{Methods of the "mif" class}
-\description{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)
@@ -41,10 +41,6 @@
     \item{logLik}{
       Returns the value in the \code{loglik} slot.
     }
-    \item{mif}{
-      Re-runs the MIF iterations.
-      See the documentation for \code{\link{mif}}.
-    }
     \item{compare.mif}{
       Given a \code{mif} object or a list of \code{mif} objects, \code{compare.mif} produces a set of diagnostic plots.
     }
@@ -52,29 +48,8 @@
       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{predvarplot}{
-      \code{predvarplot(object, pars = NULL, mean = FALSE, \dots)} produces a plot of the scaled prediction variances for each parameter.
-      This can be used to diagnose a good value of the \code{mif} parameters \code{var.factor} and \code{ic.lag}.
-      If used in this way, one should run \code{mif} with \code{Nmif=1} first.
-      Additional arguments in \code{\dots} will be passed to the actual plotting function.
-    }
-    \item{print}{
-      Prints a summary of the \code{mif} object.
-    }
-    \item{show}{
-      Displays the \code{mif} object.
-    }
   }
 }
-\references{
-  E. L. Ionides, C. Bret\\'o, & A. A. King,
-  Inference for nonlinear dynamical systems,
-  Proc. Natl. Acad. Sci. U.S.A., 103:18438--18443, 2006.
-
-  A. A. King, E. L. Ionides, M. Pascual, and M. J. Bouma,
-  Inapparent infections and cholera dynamics,
-  Nature, 454:877--880, 2008.
-}
 \author{Aaron A. King \email{kingaa at umich dot edu}}
 \seealso{\code{\link{mif}}, \code{\link{pomp}}, \code{\link{pomp-class}}, \code{\link{pfilter}}}
 \keyword{models}

Modified: pkg/pomp/man/pomp.Rd
===================================================================
--- pkg/pomp/man/pomp.Rd	2014-04-18 11:24:16 UTC (rev 927)
+++ pkg/pomp/man/pomp.Rd	2014-04-18 15:40:15 UTC (rev 928)
@@ -10,7 +10,8 @@
 \alias{pomp-pomp}
 \title{Partially-observed Markov process object.}
 \description{
-  Create a new \code{pomp} object to hold a partially-observed Markov process model together with a uni- or multi-variate time series.
+  This function creates a \code{pomp} object,
+  encoding a partially-observed Markov process model together with a uni- or multi-variate time series.
 }
 \usage{
 \S4method{pomp}{data.frame}(data, times, t0, \dots, rprocess, dprocess, rmeasure, dmeasure,
@@ -41,18 +42,20 @@
 \arguments{
   \item{data, times}{
     The time series data and times at which observations are made.
-    \code{data} can be specified as a vector, a matrix, a data-frame, or a \code{pomp} object..
+    \code{data} can be specified as a vector, a matrix, a data-frame, or a \code{pomp} object.
+
     If \code{data} is a numeric vector, \code{times} must be a numeric vector of the same length.
+
     If \code{data} is a matrix, it should have dimensions \code{nobs} x \code{ntimes}, where \code{nobs} is the number of observed variables and \code{ntimes} is the number of times at which observations were made (i.e., each column is a distinct observation of the \code{nobs} variables).
     In this case, \code{times} must be given as a numeric vector (of length \code{ntimes}).
-    If \code{data} is a data-frame, \code{times} must name of the column of observation times.
-    Note that, in this case, \code{data} is a data-frame, it will be internally coerced to an array with storage-mode \sQuote{double}.
+
+    If \code{data} is a data-frame, \code{times} must name the column of observation times.
+    Note that, in this case, \code{data} will be internally coerced to an array with storage-mode \sQuote{double}.
     Note that the \code{times} must be numeric and strictly increasing.
   }
   \item{t0}{
-    The zero-time.
-    This must be no later than the time of the first observation, \code{times[1]}.
-    The stochastic dynamical system is initialized at time \code{t0}.
+    The zero-time: the stochastic dynamical system is initialized at time \code{t0}.
+    This must be no later than the time of the first observation, i.e., \code{t0 <= times[1]}.
   }
   \item{rprocess}{
     optional function; a function of prototype \code{rprocess(xstart,times,params,\dots)} that simulates from the unobserved process.
@@ -84,15 +87,18 @@
   }
   \item{measurement.model}{
     optional; a formula or list of formulae, specifying the measurement model.
-    These formulae are parsed internally and used to generate \code{rmeasure} and \code{dmeasure} functions.
+    These formulae are parsed internally to generate \code{rmeasure} and \code{dmeasure} functions.
     If \code{measurement.model} is given it overrides any specification of \code{rmeasure} or \code{dmeasure}.
     See below for an example.
-    \strong{NB:} it will typically be possible to acclerate measurement model computations by writing \code{dmeasure} and/or \code{rmeasure} functions directly.
+    \strong{NB:} This is a convenience function, primarily designed to facilitate exploration;
+    it will typically be possible to acclerate measurement model computations by writing \code{dmeasure} and/or \code{rmeasure} functions directly.
   }
   \item{skeleton, skeleton.type, skelmap.delta.t}{
     The function \code{skeleton} specifies the deterministic skeleton of the unobserved Markov process.
-    If we are dealing with a discrete-time Markov process, its deterministic skeleton is a map: indicate this by specifying \code{skeleton.type="map"}.
-    If we are dealing with a continuous-time Markov process, its deterministic skeleton is a vectorfield: indicate this by specifying \code{skeleton.type="vectorfield"}.
+    If we are dealing with a discrete-time Markov process, its deterministic skeleton is a map:
+    indicate this by specifying \code{skeleton.type="map"}.
+    If we are dealing with a continuous-time Markov process, its deterministic skeleton is a vectorfield:
+    indicate this by specifying \code{skeleton.type="vectorfield"}.
 
     The skeleton function can be specified in one of two ways:
     (1) as an \R function of prototype \code{skeleton(x,t,params,\dots)} that evaluates the deterministic skeleton at state \code{x} and time \code{t} given the parameters \code{params}, or
@@ -104,6 +110,7 @@
   }
   \item{initializer}{
     optional function of prototype \code{initializer(params,t0,\dots)} that yields initial conditions for the state process when given a vector, \code{params}, of parameters.
+
     By default (i.e., if it is unspecified when \code{pomp} is called), the initializer assumes any parameters in \code{params} the names of which end in \dQuote{\code{.0}} are initial values.
     These are simply copied over as initial conditions when \code{init.state} is called (see \code{\link{init.state-pomp}}).
     The names of the state variables are the same as the corresponding initial value parameters, but with the \dQuote{\code{.0}} dropped.
@@ -122,25 +129,31 @@
   }
   \item{params}{
     optional named numeric vector of parameters.
+    This will be coerced internally to storage mode \code{double}.
   }
   \item{covar, tcovar}{
-    An optional table of covariates: \code{covar} is the table (with one column per variable) and \code{tcovar} the corresponding times (one entry per row of \code{covar}).
+    An optional table of covariates:
+    \code{covar} is the table (one column per variable);
+    \code{tcovar} the corresponding times (one entry per row of \code{covar}).
+
     \code{covar} can be specified as either a matrix or a data frame.
     In either case the columns are taken to be distinct covariates.
     If \code{covar} is a data frame, \code{tcovar} can be either the name or the index of the time variable.
-    If a covariate table is supplied, then the value of each of the covariates is interpolated as needed, i.e., whenever \code{rprocess}, \code{dprocess}, \code{rmeasure}, \code{dmeasure}, \code{skeleton}, or \code{init.state} is evaluated.
+
+    If a covariate table is supplied, then the value of each of the covariates is interpolated as needed, i.e., whenever \code{rprocess}, \code{dprocess}, \code{rmeasure}, \code{dmeasure}, \code{skeleton}, \code{rprior}, \code{dprior}, or \code{init.state} is evaluated.
     The resulting interpolated values are passed to the corresponding functions as a numeric vector named \code{covars}.
   }
   \item{obsnames, statenames, paramnames, covarnames}{
-    Optional character vectors specifying the names of observables, state variables, parameters, or covariates, respectively.
-    These are only used in the event that one or more of the basic functions (\code{rprocess}, \code{dprocess}, \code{rmeasure}, \code{dmeasure}, \code{skeleton}) are defined using native routines.
+    Optional character vectors specifying the names of observables, state variables, parameters, and covariates, respectively.
+    These are only used in the event that one or more of the basic functions (\code{rprocess}, \code{dprocess}, \code{rmeasure}, \code{dmeasure}, \code{skeleton}, \code{rprior}, \code{dprior}) are defined using native routines.
     In that case, these name vectors are matched against the corresponding names and the indices of the names are passed to the native routines.
-    Using this facility allows one to write one or more of \code{rprocess}, \code{dprocess}, \code{rmeasure}, \code{dmeasure}, \code{skeleton} in native code in a way that does not depend on the order of states, parameters, and covariates at run time.
-    See the \dQuote{Advanced topics in pomp} vignette for more on this topic and examples.
+    These vectors should list the parameters in the order that the native code expects them.
+    Using this facility allows one to write one or more of the basic functions in native code in a way that does not depend on the order of states, parameters, and covariates at run time.
+    See the \dQuote{Advanced topics in pomp} vignette for more on this topic, including examples.
   }
   \item{zeronames}{
     Optional character vector specifying the names of accumulator variables.
-    See the \dQuote{Advanced topics in pomp} vignette for a discussion of this.
+    See the \dQuote{Advanced topics in pomp} vignette for a discussion of accumulator variables.
   }
   \item{PACKAGE}{
     An optional string giving the name of the dynamically loaded library in which any native routines are to be found.
@@ -153,21 +166,19 @@
     Note that it is the user's responsibility to make sure this holds.
     If \code{obj} is the constructed \code{pomp} object, and \code{coef(obj)} is non-empty, a simple check of this is
 
-    \code{x <- coef(obj,transform=TRUE)}
-
-    \code{obj1 <- obj}
-
-    \code{coef(obj1,transform=TRUE) <- x}
-
-    \code{identical(coef(obj),coef(obj1))}
-
-    \code{identical(coef(obj1,transform=TRUE),x)}.
+    \preformatted{
+      x <- coef(obj,transform=TRUE)
+      obj1 <- obj
+      coef(obj1,transform=TRUE) <- x
+      identical(coef(obj),coef(obj1))
+      identical(coef(obj1,transform=TRUE),x).
+    }
     
     By default, both functions are the identity transformation.
     See the \dQuote{introduction_to_pomp} vignette for an example.
   }
   \item{\dots}{
-    Any additional arguments given to \code{pomp} will be stored in the \code{\link[=pomp-class]{pomp}} object and passed as arguments to each of the functions \code{rprocess}, \code{dprocess}, \code{rmeasure}, \code{dmeasure}, and \code{initializer} whenever they are evaluated.
+    Any additional arguments given to \code{pomp} will be stored in the \code{\link[=pomp-class]{pomp}} object and passed as arguments to each of the basic functions whenever they are evaluated.
   }
 }
 \value{
@@ -177,26 +188,19 @@
 }
 \details{
   \strong{
-    It is not typically necessary (or desirable, or even feasible) to define all of the functions \code{rprocess}, \code{dprocess}, \code{rmeasure}, \code{dmeasure}, and \code{skeleton} in any given problem.
+    It is not typically necessary (or even feasible) to define all of the functions \code{rprocess}, \code{dprocess}, \code{rmeasure}, \code{dmeasure}, and \code{skeleton} in any given problem.
     Each algorithm makes use of a different subset of these functions.
   }
-  In general, the specification of process-model codes \code{rprocess} and/or \code{dprocess} can be somewhat nontrivial:
-  for this reason, \code{\link{plugins}} have been developed to streamline this process for the user.
+  Specification of process-model codes \code{rprocess} and/or \code{dprocess} in most cases is facilitated by so-called \code{\link{plugins}} that have been developed to handle common use-cases.
   Currently, if one's process model evolves in discrete time or one is willing to make such an approximation (e.g., via an Euler approximation), then the \code{\link{euler.sim}}, \code{\link{discrete.time.sim}}, or \code{\link{onestep.sim}} plugin for \code{rprocess} and \code{\link{onestep.dens}} plugin for \code{dprocess} are available.
   For exact simulation of certain continuous-time Markov chains, an implementation of Gillespie's algorithm is available (see \code{\link{gillespie.sim}}).
   To use the plugins, consult the help documentation (\code{?\link{plugins}}) and the vignettes.
 
-  It is anticipated that, in specific cases, it will be possible to obtain increased computational efficiency by writing custom versions of \code{rprocess} and/or \code{dprocess}.
+  In specific cases, it may be possible to obtain increased computational efficiency by writing custom versions of \code{rprocess} and/or \code{dprocess}.
   See the \dQuote{Advanced topics in pomp} vignette for a discussion of this.
   If such custom versions are desired, the following describes how each of these functions should be written in this case.
   \describe{
     \item{\code{rprocess}}{
-      In general, the specification of \code{rprocess} can be somewhat nontrivial:
-      for this reason, \code{\link{plugins}} have been developed to streamline this process for the user.
-      Currently, if one's process model evolves in discrete time or one is willing to make such an approximation (e.g., via an Euler approximation), then the \code{\link{euler.sim}} or \code{\link{onestep.sim}} plugin is available.
-      For exact simulation of certain continuous-time Markov chains, an implementation of Gillespie's algorithm is available (see \code{\link{gillespie.sim}}).
-      To use the plugins, consult the help documentation (\code{?\link{plugins}}) and the vignettes.
-
       If the plugins are not used \code{rprocess} must have at least the following arguments:
       \code{xstart}, \code{times}, \code{params}, and \code{\dots}.
       It can also take additional arguments.
@@ -216,11 +220,6 @@
       The rownames of \code{x} must correspond to those of \code{xstart}.
     }
     \item{\code{dprocess}}{
-      In general, the specification of \code{dprocess} can be somewhat nontrivial:
-      for this reason, \code{\link{plugins}} have been developed to streamline this process for the user.
-      Currently, if one's process model evolves in discrete time or one is willing to make such an approximation (e.g., via an Euler approximation), then the \code{\link{onestep.dens}} plugin for \code{dprocess} is available.
-      To use the plugins, consult the help documentation (\code{?\link{plugins}}) and the vignettes.
-
       If the plugins are not used, \code{dprocess} must have at least the following arguments:
       \code{x}, \code{times}, \code{params}, \code{log}, and \code{\dots}.
       It may take additional arguments.
@@ -245,8 +244,7 @@
     }
   }
 
-  The measurement-model, deterministic skeleton, and initializer components are easily specified without the use of plugins.
-  The following is a guide to writing these components.
+  The following is a guide to writing the measurement-model, deterministic skeleton, and initializer components. 
   \describe{
     \item{\code{rmeasure}}{
       if provided, must take at least the arguments \code{x}, \code{t}, \code{params}, and \code{\dots}.
@@ -307,9 +305,9 @@
 \section{Warning}{
   Some error checking is done by \code{pomp}, but complete error checking is impossible.  
   If the user-specified functions do not conform to the above specifications (see Details), then the results may be invalid.
-  In particular, if both \code{rmeasure} and \code{dmeasure} are specified, the user should verify that these two functions correspond to the same model and if \code{skeleton} is specified, the user is responsible for verifying that it corresponds to the true deterministic skeleton of the model.
-  Each \pkg{pomp}-package algorithm uses some subset of the five basic components (\code{rprocess}, \code{dprocess}, \code{rmeasure}, \code{dmeasure}, \code{skeleton}).
-  If an algorithm requires a component that was not given in the construction of the \code{pomp} object, an error is generated.
+  In particular, if both \code{rmeasure} and \code{dmeasure} are specified, the user should verify that these two functions correspond to the same probability distribution and if \code{skeleton} is specified, the user is responsible for verifying that it corresponds to the true deterministic skeleton of the model.
+  Each \pkg{pomp}-package algorithm uses some subset of the five basic functions (\code{rprocess}, \code{dprocess}, \code{rmeasure}, \code{dmeasure}, \code{skeleton}).
+  If an algorithm requires a component that has not been specified, an informative error will be generated.
 }
 \author{Aaron A. King \email{kingaa at umich dot edu}}
 \seealso{



More information about the pomp-commits mailing list