[Pomp-commits] r919 - in pkg/pomp: . R demo inst man src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Apr 15 19:59:09 CEST 2014


Author: kingaa
Date: 2014-04-15 19:59:09 +0200 (Tue, 15 Apr 2014)
New Revision: 919

Modified:
   pkg/pomp/DESCRIPTION
   pkg/pomp/R/builder.R
   pkg/pomp/demo/sir.R
   pkg/pomp/inst/NEWS
   pkg/pomp/inst/NEWS.Rd
   pkg/pomp/man/builder.Rd
   pkg/pomp/src/pfilter.c
Log:
- add 'globals' argument to 'pompBuilder' (thanks to Carl Pearson)
- format NEWS file


Modified: pkg/pomp/DESCRIPTION
===================================================================
--- pkg/pomp/DESCRIPTION	2014-04-10 13:56:14 UTC (rev 918)
+++ pkg/pomp/DESCRIPTION	2014-04-15 17:59:09 UTC (rev 919)
@@ -1,8 +1,8 @@
 Package: pomp
 Type: Package
 Title: Statistical inference for partially observed Markov processes
-Version: 0.49-4
-Date: 2014-04-07
+Version: 0.49-5
+Date: 2014-04-15
 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")),
@@ -32,7 +32,7 @@
 	 dprior-pomp.R rprior-pomp.R
 	 simulate-pomp.R trajectory-pomp.R plot-pomp.R 
 	 pfilter.R pfilter-methods.R minim.R traj-match.R bsmc.R
-	 mif.R mif-methods.R compare-mif.R 
+	 mif.R mif-methods.R compare-mif.R
  	 pmcmc.R pmcmc-methods.R compare-pmcmc.R
  	 nlf-funcs.R nlf-guts.R nlf-objfun.R nlf.R 
 	 probe.R probe-match.R basic-probes.R spect.R spect-match.R

Modified: pkg/pomp/R/builder.R
===================================================================
--- pkg/pomp/R/builder.R	2014-04-10 13:56:14 UTC (rev 918)
+++ pkg/pomp/R/builder.R	2014-04-15 17:59:09 UTC (rev 919)
@@ -22,9 +22,10 @@
 pompBuilder <- function (data, times, t0, name,
                          statenames, paramnames, tcovar, covar,
                          rmeasure, dmeasure, step.fn, step.fn.delta.t,
-                         skeleton, skeleton.type, skelmap.delta.t = 1,
+                         skeleton, skeleton.type = c("map","vectorfield"),
+                         skelmap.delta.t = 1,
                          parameter.transform, parameter.inv.transform,
-                         ..., link = TRUE, save = FALSE) {
+                         globals, ..., link = TRUE, save = FALSE) {
   if (!is.data.frame(data)) stop(sQuote("data")," must be a data-frame")
   obsnames <- names(data)
   obsnames <- setdiff(obsnames,times)
@@ -37,6 +38,7 @@
     tcovar <- numeric(0)
     covarnames <- character(0)
   }
+  skeleton.type <- match.arg(skeleton.type)
   pompCBuilder(
                name=name,
                statenames=statenames,
@@ -49,6 +51,7 @@
                skeleton=skeleton,
                parameter.transform=parameter.transform,
                parameter.inv.transform=parameter.inv.transform,
+               globals=globals,
                save=save
                )
   if (link) {
@@ -114,9 +117,9 @@
 
 decl <- list(
              periodic_bspline_basis_eval="\tvoid (*periodic_bspline_basis_eval)(double,double,int,int,double*);\nperiodic_bspline_basis_eval = (void (*)(double,double,int,int,double*)) R_GetCCallable(\"pomp\",\"periodic_bspline_basis_eval\");\n",
-             get_pomp_userdata="\tconst SEXP (*get_pomp_userdata)(const char *);\npomp_get_userdata = (const SEXP (*)(const char*)) R_GetCCallable(\"pomp\",\"get_pomp_userdata\");\n",
-             get_pomp_userdata_int="\tconst int * (*get_pomp_userdata_int)(const char *);\npomp_get_userdata_int = (const int *(*)(const char*)) R_GetCCallable(\"pomp\",\"get_pomp_userdata_int\");\n",
-             get_pomp_userdata_double="\tconst double * (*get_pomp_userdata_double)(const char *);\npomp_get_userdata_double = (const double *(*)(const char*)) R_GetCCallable(\"pomp\",\"get_pomp_userdata_double\");\n"
+             get_pomp_userdata_int="\tconst int * (*get_pomp_userdata_int)(const char *);\nget_pomp_userdata_int = (const int *(*)(const char*)) R_GetCCallable(\"pomp\",\"get_pomp_userdata_int\");\n",
+             get_pomp_userdata_double="\tconst double * (*get_pomp_userdata_double)(const char *);\nget_pomp_userdata_double = (const double *(*)(const char*)) R_GetCCallable(\"pomp\",\"get_pomp_userdata_double\");\n",
+             `get_pomp_userdata(\\b|[^_])`="\tconst SEXP (*get_pomp_userdata)(const char *);\nget_pomp_userdata = (const SEXP (*)(const char*)) R_GetCCallable(\"pomp\",\"get_pomp_userdata\");\n"
              )
 
 footer <- list(
@@ -128,20 +131,28 @@
                parameter.inv.transform="\n}\n\n"
                )
 
-utility.fns <- list(
-                    )
+utility.fns <- list()
 
+callable.decl <- function (code) {
+  fns <- vapply(names(decl),grepl,logical(1),code,perl=TRUE)
+  do.call(paste0,decl[fns])
+}
 
+missing.fun <- function (name) {
+  paste0("  error(\"'",name,"' not defined\");")
+}
+
 pompCBuilder <- function (name, statenames, paramnames, covarnames, obsnames,
                           rmeasure, dmeasure, step.fn, skeleton,
                           parameter.transform, parameter.inv.transform,
-                          save = FALSE)
+                          globals, save = FALSE)
 {
   if (missing(name)) stop(sQuote("name")," must be supplied");
   if (missing(statenames)) stop(sQuote("statenames")," must be supplied");
   if (missing(paramnames)) stop(sQuote("paramnames")," must be supplied");
   if (missing(obsnames)) stop(sQuote("obsnames")," must be supplied");
   if (missing(covarnames)) stop(sQuote("covarnames")," must be supplied");
+  if (missing(globals)) globals <- ""
 
   mpt <- missing(parameter.transform)
   mpit <- missing(parameter.inv.transform)
@@ -173,6 +184,8 @@
     cat(file=out,f)
   }
 
+  cat(file=out,globals)
+
   ## variable/parameter/observations definitions
   for (v in seq_along(paramnames)) {
     cat(file=out,render(define$var,variable=paramnames[v],ptr='__p',ilist='__parindex',index=v-1))
@@ -197,40 +210,32 @@
   if (has.trans) {
     ## parameter transformation function
     cat(file=out,render(header$parameter.transform,name=name))
-    for (fn in names(decl)) {
-      if (grepl(fn,parameter.transform))
-        cat(file=out,decl[[fn]])
-    }
+    cat(file=out,callable.decl(parameter.transform))
     cat(file=out,parameter.transform,footer$parameter.transform)
     ## inverse parameter transformation function
     cat(file=out,render(header$parameter.inv.transform,name=name))
-    for (fn in names(decl)) {
-      if (grepl(fn,parameter.inv.transform))
-        cat(file=out,decl[[fn]])
-    }
+    cat(file=out,callable.decl(parameter.inv.transform))
     cat(file=out,parameter.inv.transform,footer$parameter.inv.transform)
   }
 
   ## rmeasure function
+  if (missing(rmeasure)) rmeasure <- missing.fun("rmeasure")
   cat(file=out,render(header$rmeasure,name=name),rmeasure,footer$rmeasure)
 
   ## dmeasure function
+  if (missing(dmeasure)) dmeasure <- missing.fun("dmeasure")
   cat(file=out,render(header$dmeasure,name=name),dmeasure,footer$dmeasure)
 
   ## Euler step function
+  if (missing(step.fn)) step.fn <- missing.fun("step.fn")
   cat(file=out,render(header$step.fn,name=name))
-  for (fn in names(decl)) {
-    if (grepl(fn,step.fn))
-      cat(file=out,decl[[fn]])
-  }
+  cat(file=out,callable.decl(step.fn))
   cat(file=out,step.fn,footer$step.fn)
 
   ## skeleton function
+  if (missing(skeleton)) skeleton <- missing.fun("skeleton")
   cat(file=out,render(header$skeleton,name=name))
-  for (fn in names(decl)) {
-    if (grepl(fn,skeleton))
-      cat(file=out,decl[[fn]])
-  }
+  cat(file=out,callable.decl(skeleton))
   cat(file=out,skeleton,footer$skeleton)
 
   ## undefine variables
@@ -266,7 +271,8 @@
   if (rv!=0)
     stop("cannot compile shared-object library ",sQuote(solib))
   else
-    cat("model codes written to",sQuote(modelfile),"\nlink to shared-object library",sQuote(solib),"\n")
+    cat("model codes written to",sQuote(modelfile),
+        "\nlink to shared-object library",sQuote(solib),"\n")
 
   invisible(NULL)
 }
@@ -280,7 +286,8 @@
 render <- function (template, ...) {
   vars=list(...)
   n <- sapply(vars,length)
-  if (!all((n==max(n))|(n==1))) stop("incommensurate lengths of replacements")
+  if (!all((n==max(n))|(n==1)))
+    stop("incommensurate lengths of replacements")
   short <- which(n==1)
   n <- max(n)
   for (i in short) vars[[i]] <- rep(vars[[i]],n)

Modified: pkg/pomp/demo/sir.R
===================================================================
--- pkg/pomp/demo/sir.R	2014-04-10 13:56:14 UTC (rev 918)
+++ pkg/pomp/demo/sir.R	2014-04-15 17:59:09 UTC (rev 919)
@@ -11,6 +11,10 @@
   lik = dnbinom_mu(cases,theta,rho*incid,give_log);
 '
 
+globals <- '
+  static int nbasis = 3;
+'
+
 ## SIR process model with extra-demographic stochasticity
 ## and seasonal transmission
 step.fn <- '
@@ -22,7 +26,8 @@
   int k;
 
   // seasonality in transmission
-  beta = beta1*seas1+beta2*seas2+beta3*seas3;
+  for (k = 0, beta = 0.0; k < nbasis; k++)
+     beta += (&beta1)[k]*(&seas1)[k];
 
   // compute the environmental stochasticity
   dW = rgammawn(beta_sd,dt);
@@ -57,7 +62,8 @@
   double dW;			// white noise increment
   int k;
   
-  beta = beta1*seas1+beta2*seas2+beta3*seas3;
+  for (k = 0, beta = 0.0; k < nbasis; k++)
+     beta += (&beta1)[k]*(&seas1)[k];
 
   // compute the transition rates
   rate[0] = mu*popsize;		// birth into susceptible class
@@ -88,12 +94,12 @@
 ## the success of this depends on S0, I0, R0 being in
 ## adjacent memory locations, in that order
 partrans <- "
+  int k;
   Tgamma = exp(gamma);
   Tmu = exp(mu);
   Tiota = exp(iota);
-  Tbeta1 = exp(beta1);
-  Tbeta2 = exp(beta2);
-  Tbeta3 = exp(beta3);
+  for (k = 0; k < nbasis; k++)
+    (&Tbeta1)[k] = exp((&beta1)[k]);
   Tbeta_sd = exp(beta_sd);
   Trho = expit(rho);
   Ttheta = exp(theta);
@@ -101,12 +107,12 @@
 "
 
 paruntrans <- "
+  int k;
   Tgamma = log(gamma);
   Tmu = log(mu);
   Tiota = log(iota);
-  Tbeta1 = log(beta1);
-  Tbeta2 = log(beta2);
-  Tbeta3 = log(beta3);
+  for (k = 0; k < nbasis; k++)
+    (&Tbeta1)[k] = log((&beta1)[k]);
   Tbeta_sd = log(beta_sd);
   Trho = logit(rho);
   Ttheta = log(theta);
@@ -137,6 +143,7 @@
             ),
             times="time",
             t0=1928,
+            globals=globals,
             dmeasure=dmeas,
             rmeasure=rmeas,
             step.fn=step.fn,
@@ -149,7 +156,7 @@
             parameter.inv.transform=paruntrans,
             statenames=c("S","I","R","incid","W"),
             paramnames=c(
-              "gamma","mu","iota","beta1","beta2","beta3","beta.sd",
+              "gamma","mu","iota","beta1","beta.sd",
               "popsize","rho","theta","S.0","I.0","R.0"
               ), 
             zeronames=c("incid","W"),
@@ -161,7 +168,9 @@
               fracs <- params[ic.names]
               x0[comp.names] <- round(params['popsize']*fracs/sum(fracs))
               x0
-            }
+            },
+            save=FALSE,
+            link=TRUE
             ) -> po
 
 coef(po) <- c(

Modified: pkg/pomp/inst/NEWS
===================================================================
--- pkg/pomp/inst/NEWS	2014-04-10 13:56:14 UTC (rev 918)
+++ pkg/pomp/inst/NEWS	2014-04-15 17:59:09 UTC (rev 919)
@@ -1,724 +1,731 @@
-_N_e_w_s _f_o_r _P_a_c_k_a_g_e '_p_o_m_p'
+_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._4_9-_1:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._5_0-_1:
 
-        • A new method, 'probe.match.objfun', constructs objective
+        • It is now possible to specify global variables and typedefs
+          using the ‘globals’ argument to ‘pompBuilder’.  See the ‘sir’
+          demo for a demonstration.  Thanks to Carl Pearson for the
+          suggestion.
+
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_9-_1:
+
+        • A new method, ‘probe.match.objfun’, constructs objective
           functions suitable for use in optimizers.
 
-        • 'pomp' now depends on 'nloptr', which provides a suite of
+        • ‘pomp’ now depends on ‘nloptr’, which provides a suite of
           optimization algorithms.  This package can now be used in
           various methods for optimization of an objective function.
 
-        • New inline C functions 'to_log_barycentric' and
-          'from_log_barycentric' are provided in 'pomp.h' to facilitate
+        • New inline C functions ‘to_log_barycentric’ and
+          ‘from_log_barycentric’ are provided in ‘pomp.h’ to facilitate
           log-barycentric transformations.  These have proven very
           useful in dealing with parameters constrained to sum to one
           (e.g., initial conditions of compartmental models).
 
-        • Bug fix in 'periodic.bspline.basis'.
+        • Bug fix in ‘periodic.bspline.basis’.
 
-        • Package vignettes are no longer available via 'vignette()'
+        • Package vignettes are no longer available via ‘vignette()’
           but can be reached from the help index.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_8-_3:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_8-_3:
 
-        • Correct a bug in 'abc' to do with parameter transformation.
+        • Correct a bug in ‘abc’ to do with parameter transformation.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_8-_1:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_8-_1:
 
-        • Create new 'dprior' and 'rprior' slots for 'pomp' objects.
-          These will be used by the Bayesian methods (currently 'abc',
-          'bsmc', and 'pmcmc').  The 'hyperparams' argument to these
+        • Create new ‘dprior’ and ‘rprior’ slots for ‘pomp’ objects.
+          These will be used by the Bayesian methods (currently ‘abc’,
+          ‘bsmc’, and ‘pmcmc’).  The ‘hyperparams’ argument to these
           methods has been removed; hyperparameters are now treated
           just as any others.
 
-        • 'bsmc' can now be called so that the particles are drawn from
-          the prior distribution (as set by the 'rpior' slot).
+        • ‘bsmc’ can now be called so that the particles are drawn from
+          the prior distribution (as set by the ‘rprior’ slot).
 
         • Some of the longer tests will only be run if an environment
           variable is set.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_7-_4:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_7-_4:
 
-        • Revisit 'dacca' bug.  Set negative compartments to zero along
+        • Revisit ‘dacca’ bug.  Set negative compartments to zero along
           with compartments immediately downstream.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_7-_3:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_7-_3:
 
-        • Fix bug that arises only very occasionally in the 'dacca'
+        • Fix bug that arises only very occasionally in the ‘dacca’
           cholera example.
 
-        • Modify 'dacca' model so that rare positivity violations are
+        • Modify ‘dacca’ model so that rare positivity violations are
           punished in a different way.  This modifies the formal model
           slightly.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_7-_2:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_7-_2:
 
-        • By default, 'pompBuilder' now creates all files in the
+        • By default, ‘pompBuilder’ now creates all files in the
           temporary directory.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_7-_1:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_7-_1:
 
-        • 'abc' implements Approximate Bayesian Computation for pomp
+        • ‘abc’ implements Approximate Bayesian Computation for pomp
           models.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_6-_1:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_6-_1:
 
-        • 'pompExample' now has an optional argument, 'envir',
-          determining which environment the pomp object will be loaded
-          into.
+        • ‘pompExample’ now has an optional argument, ‘envir’,
+          determining which environment the ‘pomp’ object will be
+          loaded into.
 
-        • 'logmeanexp' now has an optional argument, 'se', allowing for
+        • ‘logmeanexp’ now has an optional argument, ‘se’, allowing for
           computation of an approximate standard error.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_5-_8:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_5-_8:
 
-        • bug fix in 'gompertz' example.
+        • bug fix in ‘gompertz’ example.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_5-_7:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_5-_7:
 
-        • bug fix in 'pmcmc': Metropolis-Hastings ratio was incorrect
+        • bug fix in ‘pmcmc’: Metropolis-Hastings ratio was incorrect
           except for flat priors!
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_5-_6:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_5-_6:
 
-        • a fix so that 'pompBuilder' will find 'pomp.h' header file on
+        • a fix so that ‘pompBuilder’ will find ‘pomp.h’ header file on
           Windows machines.  Thanks to Dave Hayman for finding the
           problem.
 
-        • new 'logmeanexp' function.
+        • new ‘logmeanexp’ function.
 
         • some reorganization of the source package structure.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_5-_4:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_5-_4:
 
-        • changes in the way 'reulermultinom', 'deulermultinom',
-          'dot_product' are exported to other packages.  Rather than
+        • changes in the way ‘reulermultinom’, ‘deulermultinom’,
+          ‘dot_product’ are exported to other packages.  Rather than
           just being exported as linkables, these are now also defined
-          as static inline functions in the 'pomp.h' header.
+          as static inline functions in the ‘pomp.h’ header.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_5-_3:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_5-_3:
 
-        • fix bug with 'continue' and method 'mif2'
+        • Fix bug with ‘continue’ and method ‘"mif2"’.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_5-_2:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_5-_2:
 
-        • new method to coerce 'pfilterd.pomp' objects to data-frames.
+        • new method to coerce ‘pfilterd.pomp’ objects to data-frames.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_5-_1:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_5-_1:
 
-        • 'profileDesign' can now handle variables of mixed type.
+        • ‘profileDesign’ can now handle variables of mixed type.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_4-_1:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_4-_1:
 
-        • New 'mif2' option for 'mif'.
+        • New ‘"mif2"’ option for ‘mif’.
 
-        • The default behavior for 'mif' and 'pfilter' with respect to
+        • The default behavior for ‘mif’ and ‘pfilter’ with respect to
           filtering failures has been changed.  Before, the default
           behavior has been to stop with an error on the first
-          filtering failure ('max.fail=0').  Now, the default is
-          'max.fail=Inf', i.e., an error is never triggered.
+          filtering failure (‘max.fail=0’).  Now, the default is
+          ‘max.fail=Inf’, i.e., an error is never triggered.
 
         • The implementation of MIF cooling schedules has been changed
           to make it more general.  The cooling schedule is now
-          specified by a 'type' and a 'fraction'.  Currently, supported
-          'cooling.type's include 'geometric' (the old behavior) and
-          'hyperbolic', i.e., a 1/(1+n) schedule.  The
-          'cooling.fraction' argument specifies the cooling at 50
-          iterations.  That is, if s is the intensity of the
+          specified by a ‘type’ and a ‘fraction’.  Currently, supported
+          ‘cooling.type’s include ‘geometric’ (the old behavior) and
+          ‘hyperbolic’, i.e., a 1/(1+n) schedule.  The
+          ‘cooling.fraction’ argument specifies the cooling at 50
+          iterations.  That is, if ‘s’ is the intensity of the
           random-walk perturbation to parameters at the first iteration
-          ('rw.sd'), then the intensity at iteration 50 is
-          s*cooling.fraction.
+          (‘rw.sd’), then the intensity at iteration 50 is
+          ‘s*cooling.fraction’.
 
-        • Remove all data()-loadable pomp objects.  To load the
-          prebuilt example pomp objects from previous versions, use the
-          new 'pompExample' function.  E.g., instead of
-          'data(euler.sir)', do 'pompExample("euler.sir")'.
+        • Remove all ‘data()’-loadable ‘pomp’ objects.  To load the
+          prebuilt example ‘pomp’ objects from previous versions, use
+          the new ‘pompExample’ function.  E.g., instead of
+          ‘data(euler.sir)’, do ‘pompExample("euler.sir")’.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_3-_4:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_3-_4:
 
         • Clean up tests.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_3-_3:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_3-_3:
 
-        • Fix bug in 'pompBuilder' on mac.
+        • Fix bug in ‘pompBuilder’ on mac.
 
-        • Fix bug in 'dmeasure' when log=TRUE.  Bug located by R.
+        • Fix bug in ‘dmeasure’ when ‘log=TRUE’.  Bug located by R.
           Reiner.
 
-        • Add 'eff.sample.size' and 'cond.logLik' methods for
-          'pfilterd.pomp' objects.
+        • Add ‘eff.sample.size’ and ‘cond.logLik’ methods for
+          ‘pfilterd.pomp’ objects.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_3-_1:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_3-_1:
 
-        • Modify 'traj.match.objfun' to allow arbitrary parameters to
+        • Modify ‘traj.match.objfun’ to allow arbitrary parameters to
           be passed to the ODE integrator.
 
-        • Add 'params' argument to 'pomp' so that parameters can be
-          specified at the time the pomp object is created.
+        • Add ‘params’ argument to ‘pomp’ so that parameters can be
+          specified at the time the ‘pomp’ object is created.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_2-_6:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_2-_6:
 
-        • Improve error checking in 'pomp'.
+        • Improve error checking in ‘pomp’.
 
-        • Add support for covariates to 'pompBuilder'.
+        • Add support for covariates to ‘pompBuilder’.
 
         • Add native parameter transformation routines to the demos.
 
-        • Change the warning behavior in 'lookup_table' so that
+        • Change the warning behavior in ‘lookup_table’ so that
           warnings are not generated unless true extrapolation is
           performed (i.e., eliminate the warnings at the boundary).
 
-        • Some small modifications to the 'pomp.h' header file.
+        • Some small modifications to the ‘pomp.h’ header file.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_2-_4:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_2-_4:
 
-        • When 'trajectory' calls 'ode', there is a need to preserve
+        • When ‘trajectory’ calls ‘ode’, there is a need to preserve
           information across calls to the vectorfield-evaluating
           function.  The code has been modified to do this in a cleaner
           way.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_2-_2:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_2-_2:
 
         • Several minor bugs have been fixed.  See the ChangeLog for
           details.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_2-_1:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_2-_1:
 
-        • An EXPERIMENTAL facility for constructing pomp objects out of
-          native C routines is now included (pompBuilder).  This
+        • An EXPERIMENTAL facility for constructing ‘pomp’ objects out
+          of native C routines is now included (pompBuilder).  This
           facility is being actively developed and future changes may
           not be backward compatible.
 
-        • A new facility allowing access to the 'userdata' slot of a
-          pomp object from compiled 'rprocess', 'rmeasure', 'dprocess',
-          'dmeasure', 'skeleton', and 'partrans' codes is now
-          available.  Calls to the new C routines 'get_pomp_userdata',
-          'get_pomp_userdata_int', and 'get_pomp_userdata_double' allow
-          retrieval of these elements.
+        • A new facility allowing access to the ‘userdata’ slot of a
+          ‘pomp’ object from compiled ‘rprocess’, ‘rmeasure’,
+          ‘dprocess’, ‘dmeasure’, ‘skeleton’, and ‘partrans’ codes is
+          now available.  Calls to the new C routines
+          ‘get_pomp_userdata’, ‘get_pomp_userdata_int’, and
+          ‘get_pomp_userdata_double’ allow retrieval of these elements.
 
-        • Some of the data()-loadable examples have been reworked to
+        • Some of the ‘data()’-loadable examples have been reworked to
           make use of the above facility.  The parameterization of
           these examples has changed.  These changes are not backward
-          compatible: codes that depend on the data()-loadable examples
-          may be broken.
+          compatible: codes that depend on the ‘data()’-loadable
+          examples may be broken.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_1-_8:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_1-_8:
 
-        • A demonstration of 'pompBuilder' has been put into the
-          'advanced topics' vignette.
+        • A demonstration of ‘pompBuilder’ has been put into the
+          “advanced topics” vignette.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_1-_7:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_1-_7:
 
-        • A bug in the 'blowflies' example has been fixed.  Thanks to
+        • A bug in the ‘blowflies’ example has been fixed.  Thanks to
           Greg Minshall for discovering it.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_1-_6:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_1-_6:
 
-        • The 'gompertz' example parameter transformations have been
+        • The ‘gompertz’ example parameter transformations have been
           changed.  No longer are the names of the parameter vector
           changed in the transformation.  This change is not
           backward-compatible, but only codes using this example are
           affected.
 
-        • The 'euler.sir' and 'gillespie.sir' examples have been
+        • The ‘euler.sir’ and ‘gillespie.sir’ examples have been
           changed.  The transmission rate beta(t) is now the arithmetic
           sum of the seasonality basis functions.  Before, it was the
-          geometric sum.  R0 is now given by the arithmetic average of
-          the beta parameters divided by (gamma+mu).  This change is
-          not backward-compatible, but only codes using these examples
-          are affected.
+          geometric sum.  R_0 is now given by the arithmetic average of
+          the beta parameters divided by gamma+mu.  This change is not
+          backward-compatible, but only codes using these examples are
+          affected.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_1-_5:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_1-_5:
 
-        • An experimental facility for constructing pomp objects with
+        • An experimental facility for constructing ‘pomp’ objects with
           native C routines is now included.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_1-_4:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_1-_4:
 
-        • The 'blowflies', 'euler.sir', 'gillespie.sir', 'bbs', and
-          'ricker' data()-loadable examples have been changed to make
+        • The ‘blowflies’, ‘euler.sir’, ‘gillespie.sir’, ‘bbs’, and
+          ‘ricker’ ‘data()’-loadable examples have been changed to make
           the parameterization simpler and more natural.  This change
           is not backward-compatible, but only codes using this example
           are affected.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_1-_3:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_1-_3:
 
-        • In 'trajectory', all vectorfield and map evaluation is now
+        • In ‘trajectory’, all vectorfield and map evaluation is now
           done in C for speed.  For continuous-time dynamical systems,
           this gives an approximately 4-fold speedup.
 
         • Demos have been created to show some examples.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_1-_2:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_1-_2:
 
-        • A segfault bug in 'bbs' example has been fixed.
+        • A segfault bug in ‘bbs’ example has been fixed.
 
         • The posterior medians (not means) are now stored in the
-          'params' slot of the 'bsmcd.pomp' object.
+          ‘params’ slot of the ‘bsmcd.pomp’ object.
 
-_C_h_a_n_g_e_s _i_n _p_o_m_p _v_e_r_s_i_o_n _0._4_1-_1:
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._4_1-_1:
 
-        • New arguments in 'mif', 'nlf', 'bsmc', 'pmcmc',
-          'probe-match', and 'traj-match' allow the estimation to be
-          done on a transformed parameter space.  When 'transform=TRUE'
-          in these commands ('transform.params=TRUE' for 'nlf'),
+        • New arguments in ‘mif’, ‘nlf’, ‘bsmc’, ‘pmcmc’,
+          ‘probe-match’, and ‘traj-match’ allow the estimation to be
+          done on a transformed parameter space.  When ‘transform=TRUE’
+          in these commands (‘transform.params=TRUE’ for ‘nlf’),
           estimation is performed on the transformed parameter space.
-          This is described and demonstrated in the 'intro_to_pomp'
+          This is described and demonstrated in the “intro_to_pomp”
           vignette.
 
-        • The data()-loadable examples have been re-implemented to make
-          use of the above-mentioned facility.  Note that this new
+        • The ‘data()’-loadable examples have been re-implemented to
+          make use of the above-mentioned facility.  Note that this new
           functionality makes it unnecessary to "un-transform" model
-          parameters within the user-specified 'rprocess', 'dprocess',
-          'rmeasure', 'dmeasure', 'skeleton', and 'initializer' codes.
+          parameters within the user-specified ‘rprocess’, ‘dprocess’,
+          ‘rmeasure’, ‘dmeasure’, ‘skeleton’, and ‘initializer’ codes.
           This change is not backward-compatible, but only codes using
-          these data()-loadable example are affected.
+          these ‘data()’-loadable example are affected.
 
-        • The Bayesian sequential Monte Carlo command 'bsmc' now
-          returns not a list but an object of class 'bsmcd.pomp'.  An
-          experimental 'plot' method for objects of this class now
+        • The Bayesian sequential Monte Carlo command ‘bsmc’ now
+          returns not a list but an object of class ‘bsmcd.pomp’.  An
+          experimental ‘plot’ method for objects of this class now
           exists.  Also, the parameter posterior means are now stored
-          in the 'params' slot of the 'bsmcd.pomp' object: access them
-          with the 'coef' command as usual.
+          in the ‘params’ slot of the ‘bsmcd.pomp’ object: access them
+          with the ‘coef’ command as usual.
 
         • A new example, using data from an influenza outbreak in a
           British boarding school and an SIR model, has been included.
-          Do 'data(bbs)' to load it.
+          Do ‘data(bbs)’ to load it.
 
[TRUNCATED]

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


More information about the pomp-commits mailing list