[Pomp-commits] r53 - in pkg: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jan 16 18:03:27 CET 2009


Author: kingaa
Date: 2009-01-16 18:03:27 +0100 (Fri, 16 Jan 2009)
New Revision: 53

Modified:
   pkg/R/pfilter.R
   pkg/man/pfilter.Rd
Log:
add 'verbose' option to 'pfilter'

Modified: pkg/R/pfilter.R
===================================================================
--- pkg/R/pfilter.R	2008-08-25 21:27:38 UTC (rev 52)
+++ pkg/R/pfilter.R	2009-01-16 17:03:27 UTC (rev 53)
@@ -8,7 +8,8 @@
                     pred.mean = FALSE,
                     pred.var = FALSE,
                     filter.mean = FALSE,
-                    .rw.sd, ...) {
+                    .rw.sd,
+                    verbose = FALSE, ...) {
             if (missing(params)) {
               if (length(object at params)>0) {
                 params <- object at params
@@ -206,6 +207,10 @@
                 pred.v[rw.names,nt] <- pred.v[rw.names,nt]+sigma^2
                 params[rw.names,] <- params[rw.names,]+rnorm(n=Np*length(sigma),mean=0,sd=sigma)
               }
+
+              if (verbose)
+                cat("step",nt,"of",ntimes,"finished\n")
+
             }
 
             list(

Modified: pkg/man/pfilter.Rd
===================================================================
--- pkg/man/pfilter.Rd	2008-08-25 21:27:38 UTC (rev 52)
+++ pkg/man/pfilter.Rd	2009-01-16 17:03:27 UTC (rev 53)
@@ -12,7 +12,7 @@
 pfilter(object, \dots)
 \S4method{pfilter}{pomp}(object, params, Np, tol = 1e-17,
     warn = TRUE, max.fail = 0, pred.mean = FALSE, pred.var = FALSE,
-    filter.mean = FALSE, .rw.sd, \dots)
+    filter.mean = FALSE, .rw.sd, verbose = FALSE, \dots)
 \S4method{pfilter}{mif}(object, params, Np, tol = 1e-17, warn = TRUE,
     max.fail = 0, pred.mean = FALSE, pred.var = FALSE,
     filter.mean = FALSE, \dots)
@@ -56,6 +56,9 @@
     For internal use with the MIF algorithm.
     If \code{TRUE}, the specified random walk SD is used.
   }
+  \item{verbose}{
+    If \code{TRUE}, progress information is reported as \code{pfilter} works.
+  }
   \item{\dots}{
     Additional arguments unused at present.
   }



More information about the pomp-commits mailing list