[Pomp-commits] r519 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jun 30 23:43:29 CEST 2011


Author: kingaa
Date: 2011-06-30 23:43:29 +0200 (Thu, 30 Jun 2011)
New Revision: 519

Modified:
   pkg/R/pfilter.R
Log:

- an error is generated in 'pfilter' if 'dmeasure' returns any non-finite value (not just NA, as before)


Modified: pkg/R/pfilter.R
===================================================================
--- pkg/R/pfilter.R	2011-06-30 15:27:17 UTC (rev 518)
+++ pkg/R/pfilter.R	2011-06-30 21:43:29 UTC (rev 519)
@@ -209,8 +209,8 @@
                    )
     if (inherits(weights,'try-error'))
       stop(sQuote("pfilter")," error: error in calculation of weights",call.=FALSE)
-    if (any(is.na(weights))) {
-      stop(sQuote("pfilter")," error: ",sQuote("dmeasure")," returns NA",call.=FALSE)
+    if (any(!is.finite(weights))) {
+      stop(sQuote("pfilter")," error: ",sQuote("dmeasure")," returns non-finite value",call.=FALSE)
     }
 
     ## prediction mean, prediction variance, filtering mean, effective sample size, log-likelihood



More information about the pomp-commits mailing list