[Pomp-commits] r1110 - in pkg/pomp: inst/examples man

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


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

Removed:
   pkg/pomp/inst/examples/ou2.c
Modified:
   pkg/pomp/man/basic-probes.Rd
   pkg/pomp/man/blowflies.Rd
   pkg/pomp/man/bsmc.Rd
   pkg/pomp/man/bsplines.Rd
   pkg/pomp/man/dacca.Rd
   pkg/pomp/man/eulermultinom.Rd
   pkg/pomp/man/example.Rd
   pkg/pomp/man/gompertz.Rd
   pkg/pomp/man/mif.Rd
   pkg/pomp/man/nlf.Rd
   pkg/pomp/man/ou2.Rd
   pkg/pomp/man/particles-mif.Rd
   pkg/pomp/man/pfilter.Rd
   pkg/pomp/man/plugins.Rd
   pkg/pomp/man/pomp-fun.Rd
   pkg/pomp/man/pomp-methods.Rd
   pkg/pomp/man/pomp-package.Rd
   pkg/pomp/man/pomp.Rd
   pkg/pomp/man/probe.Rd
   pkg/pomp/man/proposals.Rd
   pkg/pomp/man/ricker.Rd
   pkg/pomp/man/rw2.Rd
   pkg/pomp/man/sannbox.Rd
   pkg/pomp/man/simulate-pomp.Rd
   pkg/pomp/man/sir.Rd
   pkg/pomp/man/spect.Rd
   pkg/pomp/man/traj-match.Rd
   pkg/pomp/man/verhulst.Rd
Log:
- get rid of 'ou2.c' in inst/examples
- edit help files

Deleted: pkg/pomp/inst/examples/ou2.c
===================================================================
--- pkg/pomp/inst/examples/ou2.c	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/inst/examples/ou2.c	2015-02-27 02:58:10 UTC (rev 1110)
@@ -1,291 +0,0 @@
-// -*- C++ -*-
-
-// 2-D Ornstein-Uhlenbeck examples as discussed in the "Advanced Topics in pomp" vignette.
-
-#include <R.h>
-#include <Rmath.h>
-#include <Rdefines.h>
-
-// prototypes
-void ou2_normal_rmeasure (double *y, double *x, double *p, 
-			   int *obsindex, int *stateindex, int *parindex, int *covindex,
-			   int ncovar, double *covar, double t);
-void ou2_normal_dmeasure (double *lik, double *y, double *x, double *p, int give_log, 
-			   int *obsindex, int *stateindex, int *parindex, int *covindex,
-			   int covdim, double *covar, double t);
-void ou2_adv (double *x, double *xstart, double *par, double *times, int *n);
-void _ou2_adv (double *x, double *xstart, double *par, double *times, int *n, int *parindex);
-void ou2_step (double *x, const double *p,
-	       const int *stateindex, const int *parindex, const int *covindex,
-	       int ncovars, const double *covars,
-	       double t, double dt);
-void ou2_pdf (double *d, double *X, double *par, double *times, int *n, int *parindex, int *give_log);
-static void sim_ou2 (double *x,
-		     double alpha1, double alpha2, double alpha3, double alpha4, 
-		     double sigma1, double sigma2, double sigma3);
-static double dens_ou2 (double *x1, double *x2,
-			double alpha1, double alpha2, double alpha3, double alpha4, 
-			double sigma1, double sigma2, double sigma3, int give_log);
-
-#define ALPHA1     (pp[0])
-#define ALPHA2     (pp[1])
-#define ALPHA3     (pp[2])
-#define ALPHA4     (pp[3])
-#define SIGMA1     (pp[4])
-#define SIGMA2     (pp[5])
-#define SIGMA3     (pp[6])
-
-// advance the matrix of particles from times[0] to the other times given
-// note that you cannot assume that you can only assume that times[k]-times[k-1]>=0
-// i.e., you cannot assume that successive times are consecutive, nor can you assume that
-// they are distinct.
-void ou2_adv (double *x, double *xstart, double *par, double *times, int *n)
-{
-  int nvar = n[0], npar = n[1], nrep = n[2], ntimes = n[3], incr;
-  double tnow, tgoal, dt = 1.0;
-  double *xp0, *xp1, *pp;
-  int i, j, k;
-
-  incr = nrep*nvar;
-
-  GetRNGstate();       // initialize R's pseudorandom number generator
-
-  for (j = 0; j < nrep; j++) {
-
-    R_CheckUserInterrupt();	// check for an interrupt signal
-
-    xp0 = &xstart[nvar*j];     // pointer to j-th starting state
-    xp1 = &x[nvar*j];	       // pointer to j-th state vector
-    pp = &par[npar*j];	       // pointer to j-th parameter vector
-
-    for (i = 0; i < nvar; i++) xp1[i] = xp0[i]; // copy xstart into the first slice of x
-
-    tnow = times[0];		// initial time
-
-    for (k = 1; k < ntimes; k++) { // loop over times
-    
-      xp0 = xp1;
-      xp1 += incr;
-
-      for (i = 0; i < nvar; i++) xp1[i] = xp0[i]; // copy state vector
-
-      tgoal = times[k];
-
-      while (tnow < tgoal) {
-	sim_ou2(xp1,ALPHA1,ALPHA2,ALPHA3,ALPHA4,SIGMA1,SIGMA2,SIGMA3); // advance state
-	tnow += dt;		// advance time
-      }
-
-    }
-
-  }
-
-  PutRNGstate();	  // finished with R's random number generator
-}
-
-#undef ALPHA1
-#undef ALPHA2
-#undef ALPHA3
-#undef ALPHA4
-#undef SIGMA1
-#undef SIGMA2
-#undef SIGMA3
-
-#define ALPHA1     (pp[parindex[0]])
-#define ALPHA2     (pp[parindex[1]])
-#define ALPHA3     (pp[parindex[2]])
-#define ALPHA4     (pp[parindex[3]])
-#define SIGMA1     (pp[parindex[4]])
-#define SIGMA2     (pp[parindex[5]])
-#define SIGMA3     (pp[parindex[6]])
-
-// just like the above, but with parindex
-void _ou2_adv (double *x, double *xstart, double *par, double *times, int *n, int *parindex)
-{
-  int nvar = n[0], npar = n[1], nrep = n[2], ntimes = n[3], incr;
-  double tnow, tgoal, dt = 1.0;
-  double *xp0, *xp1, *pp;
-  int i, j, k;
-
-  incr = nrep*nvar;
-
-  GetRNGstate();       // initialize R's pseudorandom number generator
-
-  for (j = 0; j < nrep; j++) {
-
-    R_CheckUserInterrupt();	// check for an interrupt signal
-
-    xp0 = &xstart[nvar*j];     // pointer to j-th starting state
-    xp1 = &x[nvar*j];	       // pointer to j-th state vector
-    pp = &par[npar*j];	       // pointer to j-th parameter vector
-
-    for (i = 0; i < nvar; i++) xp1[i] = xp0[i]; // copy xstart into the first slice of x
-
-    tnow = times[0];		// initial time
-
-    for (k = 1; k < ntimes; k++) { // loop over times
-    
-      xp0 = xp1;
-      xp1 += incr;
-
-      for (i = 0; i < nvar; i++) xp1[i] = xp0[i]; // copy state vector
-
-      tgoal = times[k];
-
-      while (tnow < tgoal) {
-	sim_ou2(xp1,ALPHA1,ALPHA2,ALPHA3,ALPHA4,SIGMA1,SIGMA2,SIGMA3); // advance state
-	tnow += dt;		// advance time
-      }
-
-    }
-
-  }
-
-  PutRNGstate();	  // finished with R's random number generator
-}
-
-// pdf of a single 2D OU transition
-void ou2_pdf (double *d, double *X, double *par, double *times, int *n, int *parindex, int *give_log)
-{
-  int nvar = n[0], npar = n[1], nrep = n[2], ntimes = n[3];
-  double *x1, *x2, *pp;
-  int j, k;
-  for (k = 0; k < nrep; k++) {
-    pp = &par[npar*k];	       // get address of k-th parameter vector
-    x1 = &X[nvar*k];	     // get address of (0,0)-th state vector
-    for (j = 1; j < ntimes; j++) {
-      R_CheckUserInterrupt();
-      x2 = &X[nvar*(k+nrep*j)]; // get address of (k,j)-th state vector
-      d[k+nrep*(j-1)] = dens_ou2(x1,x2,ALPHA1,ALPHA2,ALPHA3,ALPHA4,SIGMA1,SIGMA2,SIGMA3,*give_log);
-      x1 = x2;
-    }
-  }
-}
-
-#undef ALPHA1
-#undef ALPHA2
-#undef ALPHA3
-#undef ALPHA4
-#undef SIGMA1
-#undef SIGMA2
-#undef SIGMA3
-
-#define ALPHA1     (p[parindex[0]])
-#define ALPHA2     (p[parindex[1]])
-#define ALPHA3     (p[parindex[2]])
-#define ALPHA4     (p[parindex[3]])
-#define SIGMA1     (p[parindex[4]])
-#define SIGMA2     (p[parindex[5]])
-#define SIGMA3     (p[parindex[6]])
-#define TAU        (p[parindex[7]])
-
-#define X1    (x[stateindex[0]])
-#define X2    (x[stateindex[1]])
-#define Y1    (y[obsindex[0]])
-#define Y2    (y[obsindex[1]])
-
-// onestep simulator for use in 'discrete.time.sim' plug-in
-void ou2_step (double *x, const double *p,
-	       const int *stateindex, const int *parindex, const int *covindex,
-	       int ncovars, const double *covars,
-	       double t, double dt) 
-{
-  sim_ou2(x,ALPHA1,ALPHA2,ALPHA3,ALPHA4,SIGMA1,SIGMA2,SIGMA3);
-}
-
-
-// bivariate normal measurement error density
-void ou2_normal_dmeasure (double *lik, double *y, double *x, double *p, int give_log, 
-			   int *obsindex, int *stateindex, int *parindex, int *covindex,
-			   int covdim, double *covar, double t) 
-{
-  double sd = fabs(TAU);
-  double f = 0.0;
-  f += (ISNA(Y1)) ? 0.0 : dnorm(Y1,X1,sd,1);
-  f += (ISNA(Y2)) ? 0.0 : dnorm(Y2,X2,sd,1);
-  *lik = (give_log) ? f : exp(f);
-}
-
-// bivariate normal measurement error simulator
-void ou2_normal_rmeasure (double *y, double *x, double *p, 
-			   int *obsindex, int *stateindex, int *parindex, int *covindex,
-			   int ncovar, double *covar, 
-			   double t) 
-{
-  double sd = fabs(TAU);
-  Y1 = rnorm(X1,sd);
-  Y2 = rnorm(X2,sd);
-}
-
-#undef ALPHA1
-#undef ALPHA2
-#undef ALPHA3
-#undef ALPHA4
-#undef SIGMA1
-#undef SIGMA2
-#undef SIGMA3
-#undef TAU
-
-#undef X1
-#undef X2
-#undef Y1
-#undef Y2
-
-// simple 2D Ornstein-Uhlenbeck process simulation
-static void sim_ou2 (double *x,
-		     double alpha1, double alpha2, double alpha3, double alpha4, 
-		     double sigma1, double sigma2, double sigma3)
-{
-  double eps[2], xnew[2];
-
-  if (!(R_FINITE(x[0]))) return;
-  if (!(R_FINITE(x[1]))) return;
-  if (!(R_FINITE(alpha1))) return;
-  if (!(R_FINITE(alpha2))) return;
-  if (!(R_FINITE(alpha3))) return;
-  if (!(R_FINITE(alpha4))) return;
-  if (!(R_FINITE(sigma1))) return;
-  if (!(R_FINITE(sigma2))) return;
-  if (!(R_FINITE(sigma3))) return;
-
-  eps[0] = rnorm(0,1);
-  eps[1] = rnorm(0,1);
-
-  xnew[0] = alpha1*x[0]+alpha3*x[1]+sigma1*eps[0];
-  xnew[1] = alpha2*x[0]+alpha4*x[1]+sigma2*eps[0]+sigma3*eps[1];
-
-  x[0] = xnew[0];
-  x[1] = xnew[1];
-}
-
-// simple 2D Ornstein-Uhlenbeck process density
-static double dens_ou2 (double *x1, double *x2,
-			double alpha1, double alpha2, double alpha3, double alpha4, 
-			double sigma1, double sigma2, double sigma3, int give_log)
-{
-  double eps[2], val;
-
-  if (!(R_FINITE(x1[0]))) return R_NaReal;
-  if (!(R_FINITE(x1[1]))) return R_NaReal;
-  if (!(R_FINITE(x2[0]))) return R_NaReal;
-  if (!(R_FINITE(x2[1]))) return R_NaReal;
-  if (!(R_FINITE(alpha1))) return R_NaReal;
-  if (!(R_FINITE(alpha2))) return R_NaReal;
-  if (!(R_FINITE(alpha3))) return R_NaReal;
-  if (!(R_FINITE(alpha4))) return R_NaReal;
-  if (!(R_FINITE(sigma1))) return R_NaReal;
-  if (!(R_FINITE(sigma2))) return R_NaReal;
-  if (!(R_FINITE(sigma3))) return R_NaReal;
-
-  // compute residuals
-  eps[0] = x2[0]-alpha1*x1[0]-alpha3*x1[1];
-  eps[1] = x2[1]-alpha2*x1[0]-alpha4*x1[1];
-
-  // backsolve
-  eps[0] /= sigma1;
-  eps[1] -= sigma2*eps[0];
-  eps[1] /= sigma3;
-
-  val = dnorm(eps[0],0.0,1.0,1)+dnorm(eps[1],0.0,1.0,1)-log(sigma1)-log(sigma3);
-  return ((give_log) ? val : exp(val));
-}

Modified: pkg/pomp/man/basic-probes.Rd
===================================================================
--- pkg/pomp/man/basic-probes.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/basic-probes.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -141,5 +141,4 @@
 \seealso{
   \link{pomp}
 }
-\keyword{models}
 \keyword{ts}

Modified: pkg/pomp/man/blowflies.Rd
===================================================================
--- pkg/pomp/man/blowflies.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/blowflies.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -64,4 +64,5 @@
   in G. Oster (ed.), Some Questions in Mathematical Biology, vol. 13, pp. 65--90.
   American Mathematical Society, Providence.
 }
+\keyword{models}
 \keyword{datasets}

Modified: pkg/pomp/man/bsmc.Rd
===================================================================
--- pkg/pomp/man/bsmc.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/bsmc.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -1,5 +1,6 @@
-\name{bsmc2}
-\title{Liu and West Bayesian Particle Filter}
+\name{Bayesian sequential Monte Carlo}
+\title{The Liu and West Bayesian particle filter}
+\alias{Bayesian sequential Monte Carlo}
 \alias{bsmc}
 \alias{bsmc-pomp}
 \alias{bsmc,pomp-method}
@@ -14,14 +15,14 @@
   Modified versions of the Liu and West (2001) algorithm.
 }
 \usage{
+\S4method{bsmc2}{pomp}(object, params, Np, est, smooth = 0.1,
+     tol = 1e-17, seed = NULL,
+     verbose = getOption("verbose"), max.fail = 0,
+     transform = FALSE, \dots)
 \S4method{bsmc}{pomp}(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, \dots)
-\S4method{bsmc2}{pomp}(object, params, Np, est, smooth = 0.1,
-     tol = 1e-17, seed = NULL,
-     verbose = getOption("verbose"), max.fail = 0,
-     transform = FALSE, \dots)
 }
 \arguments{
 \item{object}{
@@ -120,8 +121,8 @@
 \author{
   Michael Lavine (lavine at math dot umass dot edu),
   Matthew Ferrari (mferrari at psu dot edu),
-  Aaron A. King
-  Edward L. Ionides
+  Aaron A. King (kingaa at umich dot edu)
+  Edward L. Ionides (ionides at umich dot edu)
 }
 \references{
   Liu, J. and M. West.
@@ -130,8 +131,7 @@
   Sequential Monte Carlo Methods in Practice, pages 197-224.
   Springer, New York, 2001.
 }
-\examples{
-## See the "Introducton to pomp" document for examples.
+\seealso{
+  \code{\link{pomp}}, \code{\link{pfilter}}
 }
-\seealso{\link{pomp-class}}
 \keyword{ts}

Modified: pkg/pomp/man/bsplines.Rd
===================================================================
--- pkg/pomp/man/bsplines.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/bsplines.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -35,9 +35,10 @@
     The basis functions returned are periodic with period \code{period}.
   }
 }
-\details{
-  Direct access to the underlying C routines is available.
-  See the header file \dQuote{pomp.h} for details.
+\section{C API}{
+  Access to the underlying C routines is available:
+  See the header file \file{pomp.h} for the details.
+  Do \preformatted{file.show(system.file("include/pomp.h",package="pomp"))} to view this file.
 }
 \author{Aaron A. King \email{kingaa at umich dot edu}}
 \examples{

Modified: pkg/pomp/man/dacca.Rd
===================================================================
--- pkg/pomp/man/dacca.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/dacca.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -36,4 +36,5 @@
   \code{\link{euler.sir}},
   \code{\link{pomp}}
 }
+\keyword{models}
 \keyword{datasets}

Modified: pkg/pomp/man/eulermultinom.Rd
===================================================================
--- pkg/pomp/man/eulermultinom.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/eulermultinom.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -59,8 +59,8 @@
   }
   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:
-  see the header file \dQuote{pomp.h}, included with the package.
+  For all of the functions described here, access to the underlying C routines is available:
+  see below.
 }
 \value{
   \item{reulermultinom}{

Modified: pkg/pomp/man/example.Rd
===================================================================
--- pkg/pomp/man/example.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/example.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -1,6 +1,8 @@
-\name{pompExample}
+\name{Example pomp models}
 \alias{pompExample}
-\title{Pre-built examples of pomp objects.}
+\title{Examples of the construction of POMP models.}
+\alias{Example pomp models}
+\alias{pompExample}
 \description{
   \code{pompExample} loads pre-built example \code{pomp} objects.
 }
@@ -43,3 +45,5 @@
   \code{\link{euler.sir}}, \code{\link{gillespie.sir}},
   \code{\link{bbs}}, \code{\link{verhulst}}
 }
+\keyword{models}
+\keyword{datasets}

Modified: pkg/pomp/man/gompertz.Rd
===================================================================
--- pkg/pomp/man/gompertz.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/gompertz.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -20,4 +20,5 @@
 \seealso{
   \code{pomp}, \code{ricker}, and the tutorials at \url{http://pomp.r-forge.r-project.org}.
 }
+\keyword{models}
 \keyword{datasets}

Modified: pkg/pomp/man/mif.Rd
===================================================================
--- pkg/pomp/man/mif.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/mif.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -217,4 +217,5 @@
 \seealso{
   \code{\link{pomp}}, \code{\link{pfilter}}
 }
+\keyword{optimize}
 \keyword{ts}

Modified: pkg/pomp/man/nlf.Rd
===================================================================
--- pkg/pomp/man/nlf.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/nlf.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -1,4 +1,6 @@
-\name{nlf}
+\name{Nonlinear forecasting}
+\title{Parameter estimation my maximum simulated quasi-likelihood (nonlinear forecasting)}
+\alias{Nonlinear forecasting}
 \alias{nlf}
 \alias{nlf,pomp-method}
 \alias{nlf-pomp}
@@ -9,9 +11,9 @@
 \alias{logLik-nlfd.pomp}
 \alias{$,nlfd.pomp-method}
 \alias{$-nlfd.pomp}
-\title{Fit Model to Data Using Nonlinear Forecasting (NLF)}
 \description{
-  Calls an optimizer to maximize the nonlinear forecasting (NLF) goodness of fit, by simulating data from a model, fitting a nonlinear autoregressive model to the simulated time series (which may be multivariate) and using the fitted model to predict some or all variables in the data time series.
+  \code{nlf} calls an optimizer to maximize the nonlinear forecasting (NLF) goodness of fit.
+  The latter is computed by simulating data from a model, fitting a nonlinear autoregressive model to the simulated time series, and quantifying the ability of the resulting fitted model to predict the data time series.
   NLF is an \sQuote{indirect inference} method using a quasi-likelihood as the objective function.
 }
 \usage{
@@ -138,4 +140,5 @@
   Bruce E. Kendall \email{kendall at bren dot ucsb dot edu},
   Aaron A. King \email{kingaa at umich dot edu}
 }
+\keyword{optimize}
 \keyword{ts}

Modified: pkg/pomp/man/ou2.Rd
===================================================================
--- pkg/pomp/man/ou2.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/ou2.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -23,4 +23,5 @@
 logLik(pf)
 }
 \seealso{\code{\link{pomp}}}
-\keyword{ts}
+\keyword{models}
+\keyword{datasets}

Modified: pkg/pomp/man/particles-mif.Rd
===================================================================
--- pkg/pomp/man/particles-mif.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/particles-mif.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -34,5 +34,4 @@
 }
 \author{Aaron A. King \email{kingaa at umich dot edu}}
 \seealso{\code{\link{mif}}, \link{mif-methods}, \code{\link{pomp}}, \link{pomp-class}}
-\keyword{models}
 \keyword{ts}

Modified: pkg/pomp/man/pfilter.Rd
===================================================================
--- pkg/pomp/man/pfilter.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/pfilter.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -184,5 +184,4 @@
   \code{\link{pomp}}, \code{\link{mif}}, \code{\link{pmcmc}}, \code{\link{bsmc2}},
   and the tutorials on the \href{http://pomp.r-forge.r-project.org}{package website}.
 }
-\keyword{models}
 \keyword{ts}

Modified: pkg/pomp/man/plugins.Rd
===================================================================
--- pkg/pomp/man/plugins.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/plugins.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -1,15 +1,15 @@
-\name{plugins}
+\name{Process model plugins}
+\title{Plug-ins for state-process models}
+\alias{process model plugins}
 \alias{plugins}
-\alias{process model plugins}
 \alias{onestep.sim}
 \alias{euler.sim}
 \alias{discrete.time.sim}
 \alias{onestep.dens}
 \alias{gillespie.sim}
-\title{Plug-ins for state-process models}
 \description{
-  Plug-in facilities for implementing discrete-time Markov processes and continuous-time Markov processes using the Euler algorithm.
-  These can be used in the \code{rprocess} and \code{dprocess} slots of \code{pomp}.
+  The functions documented here can be used to specify the \code{rprocess} and \code{dprocess} slots for a \code{pomp} model.
+  There are options for discrete- and continuous-time Markov processes.
 }
 \usage{
 onestep.sim(step.fun, PACKAGE)
@@ -20,17 +20,19 @@
 }
 \arguments{
   \item{step.fun}{
-    This can be either an \R function, a \code{\link{Csnippet}}, or the name of a compiled, dynamically loaded native function containing the model simulator.
+    This can be either an \R function, the name of a compiled, dynamically loaded native function containing the model simulator, or a \code{\link{Csnippet}}.
+    The latter is the preferred option.
     It should be written to take a single Euler step from a single point in state space.
 
-    If it is an \R function, it should have prototype \code{step.fun(x,t,params,delta.t,...)}.
+    For an explanation and examples on the use of \code{\link{Csnippet}} to write fast simulators, see the tutorials on the \href{http://pomp.r-forge.r-project.org}{package website}.
+
+    If it is an \R function, it should have prototype \preformatted{step.fun(x,t,params,delta.t,...).}
     Here, \code{x} is a named numeric vector containing the value of the state process at time \code{t},
     \code{params} is a named numeric vector containing parameters,
     and \code{delta.t} is the length of the Euler time-step.
 
-    For examples on the use of \code{\link{Csnippet}} to write fast simulators easily, see the tutorials on the \href{http://pomp.r-forge.r-project.org}{package website}.
-
-    If \code{step.fun} is the name of a native function, it must be of type \dQuote{pomp_onestep_sim} as defined in the header \dQuote{pomp.h}, which is included with the \pkg{pomp} package.
+    If \code{step.fun} is the name of a native function, it must be of type \code{pomp_onestep_sim} as defined in the header file \file{pomp.h}, which is included with the \pkg{pomp} package.
+    Do \preformatted{file.show(system.file("include/pomp.h",package="pomp"))} to view this header file.
     For details on how to write such codes, see Details.
   }
   \item{rate.fun}{
@@ -42,7 +44,7 @@
 
     For examples on the use of \code{\link{Csnippet}} to write fast simulators easily, see tutorials on the \href{http://pomp.r-forge.r-project.org}{package website}.
 
-    If \code{rate.fun} is a native function, it must be of type \dQuote{pomp_ssa_rate_fn} as defined in the header \dQuote{pomp.h}, which is included with the package.
+    If \code{rate.fun} is a native function, it must be of type \code{pomp_ssa_rate_fn} as defined in the header \file{pomp.h}, which is included with the package.
     For details on how to write such codes, see Details.
   }
   \item{v, d}{
@@ -60,7 +62,7 @@
     Here, \code{x1} and \code{x2} are named numeric vectors containing the values of the state process at times \code{t1} and \code{t2},
     \code{params} is a named numeric vector containing parameters.
 
-    If \code{dens.fun} is the name of a native function, it should be of type \dQuote{pomp_onestep_pdf} as defined in the header \dQuote{pomp.h}, which is included with the \pkg{pomp} package.
+    If \code{dens.fun} is the name of a native function, it should be of type \code{pomp_onestep_pdf} as defined in the header \file{pomp.h}, which is included with the \pkg{pomp} package.
     This function should return the log likelihood of a transition from \code{x1} at time \code{t1} to \code{x2} at time \code{t2}, assuming that no intervening transitions have occurred.
     For details on how to write such codes, see Details.
   }
@@ -79,35 +81,36 @@
   \code{euler.sim} is appropriate when one cannot do this but can compute the change in state via a sequence of smaller steps.
   This is desirable, for example, if one is simulating a continuous time process but is willing to approximate it using an Euler approach.
   \code{discrete.time.sim} is appropriate when the process evolves in discrete time.
-  In this case, by default, the intervals between observations are integers.
 
   To use \code{euler.sim} or \code{discrete.time.sim}, you must write a function \code{step.fun} that will take a single Euler step, of size at most \code{delta.t}.
-  \code{euler.sim} and \code{discrete.time.sim} will create simulators that take as many steps as needed to get from one time to another.
+  The functions \code{euler.sim} and \code{discrete.time.sim} will create simulators that take as many steps as needed to get from one time to another.
   See below for information on how \code{euler.sim} chooses the actual step size it uses.
 
   \code{gillespie.sim} allows exact simulation of a continuous-time, discrete-state Markov process using Gillespie's algorithm.
-  This is an \dQuote{event-driven} approach: correspondingly, to use \code{gillespie.sim}, you must write a function \code{rate.fun} that computes the rates of each elementary event and specify two matrices (\code{d,v}) that describe, respectively, the dependencies of each rate and the consequences of each event.
+  This is an \dQuote{event-driven} approach: correspondingly, to use \code{gillespie.sim}, you must write a function \code{rate.fun} that computes the rates of each elementary kind of event and specify two matrices (\code{d,v}) that describe, respectively, the dependencies of each rate and the consequences of each event.
 
   \code{onestep.dens} will generate a suitable \code{dprocess} function when one can compute the likelihood of a given state transition simply by knowing the states at two times under the assumption that the state has not changed between the times.
   This is typically possible, for instance, when the \code{rprocess} function is implemented using \code{onestep.sim}, \code{euler.sim}, or \code{discrete.time.sim}.
   [NB: currently, there are no high-level algorithms in \pkg{pomp} that use \code{dprocess}.
-  This function is provided for completeness only, and with an eye toward future development.]
+  This function is provided for completeness only, with an eye toward future development.]
 
   If \code{step.fun} is written as an \R function, it must have at least the arguments \code{x}, \code{t}, \code{params}, \code{delta.t}, and \code{\dots}.
   On a call to this function, \code{x} will be a named vector of state variables, \code{t} a scalar time, and \code{params} a named vector of parameters.
   The length of the Euler step will be \code{delta.t}.
   If the argument \code{covars} is included and a covariate table has been included in the \code{pomp} object, then on a call to this function, \code{covars} will be filled with the values, at time \code{t}, of the covariates.
-  This is accomplished via interpolation of the covariate table.
+  This is accomplished via interpolation of the user-supplied covariate table.
   Additional arguments may be given: these will be filled by the correspondingly-named elements in the \code{userdata} slot of the \code{pomp} object (see \code{\link{pomp}}).
-  If \code{step.fun} is written in a native language, it must be a function of type \dQuote{pomp_onestep_sim} as specified in the header \dQuote{pomp.h} included with the package (see the directory \dQuote{include} in the installed package directory).
 
+  If \code{step.fun} is written in a native language, it must be a function of type \code{pomp_onestep_sim} as specified in the header \file{pomp.h} included with the package.
+  Execute \preformatted{file.show(system.file("include/pomp.h",package="pomp.h"))} to view this file.
+
   If \code{rate.fun} is written as an \R function, it must have at least the arguments \code{j}, \code{x}, \code{t}, \code{params}, and \code{\dots}.
-  Here, \code{j} is the an integer that indicates which specific elementary event we desire the rate of.
+  Here, \code{j} is the an integer that indicates for which of the elementary events the current rate is desired.
   \code{x} is a named vector containing the value of the state process at time \code{t}, and
   \code{params} is a named vector containing parameters.
   If the argument \code{covars} is included and a covariate table has been included in the \code{pomp} object, then on a call to this function, \code{covars} will be filled with the values, at time \code{t}, of the covariates.
   This is accomplished via interpolation of the covariate table.
-  If \code{rate.fun} is a native function, it must be of type \dQuote{pomp_ssa_rate_fn} as defined in the header \dQuote{pomp.h}, which is included with the package.
+  If \code{rate.fun} is a native function, it must be of type \code{pomp_ssa_rate_fn} as defined in the header \file{pomp.h}; see above for instructions on how to view this file.
   
   In writing \code{dens.fun}, you must assume that no state transitions have occurred between \code{t1} and \code{t2}.
   If \code{dens.fun} is written as an \R function, it must have at least the arguments \code{x1}, \code{x2}, \code{t1}, \code{t2}, \code{params}, and \code{\dots}.
@@ -117,7 +120,7 @@
   If the argument \code{covars} is included and a covariate table has been included in the \code{pomp} object, then on a call to this function, \code{covars} will be filled with the values, at time \code{t1}, of the covariates.
   This is accomplished via interpolation of the covariate table.
   As above, any additional arguments will be filled by the correspondingly-named elements in the \code{userdata} slot of the \code{pomp} object (see \code{\link{pomp}}).
-  If \code{dens.fun} is written in a native language, it must be a function of type \dQuote{pomp_onestep_pdf} as defined in the header \dQuote{pomp.h} included with the package (see the directory \dQuote{include} in the installed package directory).
+  If \code{dens.fun} is written in a native language, it must be a function of type \code{pomp_onestep_pdf} as defined in the header \file{pomp.h} included with the package; see above for instructions on how to view this file.
 }
 \value{
   \code{onestep.sim}, \code{euler.sim}, \code{discrete.time.sim}, and \code{gillespie.sim} each return functions suitable for use as the argument \code{rprocess} argument in \code{\link{pomp}}.
@@ -125,5 +128,7 @@
   \code{onestep.dens} returns a function suitable for use as the argument \code{dprocess} in \code{\link{pomp}}.
 }
 \author{Aaron A. King \email{kingaa at umich dot edu}}
-\seealso{\code{\link{eulermultinom}}, \code{\link{pomp}}}
+\seealso{
+  \code{\link{pomp}} and the tutorials on the \href{http://pomp.r-forge.r-project.org}{package website}.
+}
 \keyword{models}

Modified: pkg/pomp/man/pomp-fun.Rd
===================================================================
--- pkg/pomp/man/pomp-fun.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/pomp-fun.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -12,7 +12,6 @@
 \alias{pomp.fun,missing-method}
 \alias{pomp.fun,pomp.fun-method}
 \alias{pomp.fun,Csnippet-method}
-\keyword{internal}
 \title{Definition and methods of the "pomp.fun" class}
 \description{Definition and methods of the \code{pomp.fun} class}
 \usage{
@@ -40,10 +39,12 @@
   \item{object, x}{The \code{pomp.fun} object.}
 }
 \details{
-  The sQuote{pomp.fun} class helps to settle common issues associated with user-defined functions which can be defined either via R code or by a native, compiled routine.
+  The \code{pomp.fun} class helps to settle common issues associated with user-defined functions which can be defined either via R code or by a native, compiled routine.
   It is not exported to userland.
 }
 \author{Aaron A. King \email{kingaa at umich dot edu}}
 \seealso{
   \code{\link{pomp}}
 }
+\keyword{programming}
+\keyword{internal}

Modified: pkg/pomp/man/pomp-methods.Rd
===================================================================
--- pkg/pomp/man/pomp-methods.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/pomp-methods.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -200,5 +200,5 @@
   \link{pomp low-level interface},
   \link[=simulate-pomp]{simulate}
 }
-\keyword{models}
+\keyword{programming}
 \keyword{ts}

Modified: pkg/pomp/man/pomp-package.Rd
===================================================================
--- pkg/pomp/man/pomp-package.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/pomp-package.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -1,8 +1,9 @@
 \name{pomp-package}
+\title{Inference for partially observed Markov processes}
 \docType{package}
+\alias{The pomp package}
 \alias{pomp-package}
 \alias{pomp package}
-\title{Inference for partially observed Markov processes}
 \description{
   The \pkg{pomp} package provides facilities for inference on time series data using partially-observed Markov process (\acronym{POMP}) models.
   These models are also known as state-space models or nonlinear stochastic dynamical systems.
@@ -70,4 +71,5 @@
   \code{\link{pmcmc}}
 }
 \keyword{models}
+\keyword{datasets}
 \keyword{ts}

Modified: pkg/pomp/man/pomp.Rd
===================================================================
--- pkg/pomp/man/pomp.Rd	2015-02-27 02:58:03 UTC (rev 1109)
+++ pkg/pomp/man/pomp.Rd	2015-02-27 02:58:10 UTC (rev 1110)
@@ -1,4 +1,6 @@
-\name{pomp}
+\name{pomp constructor}
+\title{Constructor of the basic POMP object}
+\alias{pomp constructor}
 \alias{pomp}
 \alias{pomp,data.frame-method}
 \alias{data.frame-pomp}
@@ -9,7 +11,6 @@
 \alias{pomp,pomp-method}
 \alias{pomp-pomp}
 \alias{pomp-class}
-\title{Partially-observed Markov process object constructor.}
 \description{
   This function constructs a \code{pomp} object,
   encoding a partially-observed Markov process model together with a uni- or multivariate time series.
@@ -128,7 +129,7 @@
     optional; function drawing a sample from a prior distribution on parameters.
     This can be specified in one of three ways:
     (1) as an \R function of prototype \preformatted{rprior(params,\dots)} that makes a draw from the prior distribution given \code{params},
-    (2) as the name of a native (compiled) routine with prototype \dQuote{pomp_rprior} as defined in the header file \file{pomp.h}, or
+    (2) as the name of a native (compiled) routine with prototype \code{pomp_rprior} as defined in the header file \file{pomp.h}, or
     (To view the header file, execute \preformatted{file.show(system.file("include/pomp.h",package="pomp"))} in an \R session.)
     (3) as a snippet of C code (via \code{\link{Csnippet}}).
     As above, the latter is typically preferable.
@@ -137,7 +138,7 @@
     optional; function evaluating the prior distribution.
     This can be specified in one of three ways:
     (1) as an \R function of prototype \preformatted{dprior(params,log=FALSE,\dots)} that evaluates the prior probability density,
-    (2) as the name of a native (compiled) routine with prototype \dQuote{pomp_dprior} as defined in the header file \file{pomp.h}, or
+    (2) as the name of a native (compiled) routine with prototype \code{pomp_dprior} as defined in the header file \file{pomp.h}, or
[TRUNCATED]

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


More information about the pomp-commits mailing list