[Pomp-commits] r810 - in pkg/pomp: . R inst man tests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Jan 10 02:08:32 CET 2013
Author: kingaa
Date: 2013-01-10 02:08:32 +0100 (Thu, 10 Jan 2013)
New Revision: 810
Modified:
pkg/pomp/DESCRIPTION
pkg/pomp/R/mif.R
pkg/pomp/R/pfilter.R
pkg/pomp/inst/NEWS
pkg/pomp/man/mif.Rd
pkg/pomp/man/pfilter.Rd
pkg/pomp/tests/ou2-mif2.Rout.save
Log:
- change the default value of 'max.fail' in 'pfilter' and 'mif' to Inf
Modified: pkg/pomp/DESCRIPTION
===================================================================
--- pkg/pomp/DESCRIPTION 2013-01-10 00:23:21 UTC (rev 809)
+++ pkg/pomp/DESCRIPTION 2013-01-10 01:08:32 UTC (rev 810)
@@ -2,7 +2,7 @@
Type: Package
Title: Statistical inference for partially observed Markov processes
Version: 0.44-1
-Date: 2013-01-09
+Date: 2013-01-10
Author: Aaron A. King, Edward L. Ionides, Carles Breto, Steve Ellner, Bruce Kendall, Helen Wearing, Matthew J. Ferrari, Michael Lavine, Daniel C. Reuman
Maintainer: Aaron A. King <kingaa at umich.edu>
URL: http://pomp.r-forge.r-project.org
Modified: pkg/pomp/R/mif.R
===================================================================
--- pkg/pomp/R/mif.R 2013-01-10 00:23:21 UTC (rev 809)
+++ pkg/pomp/R/mif.R 2013-01-10 01:08:32 UTC (rev 810)
@@ -356,9 +356,10 @@
Np, ic.lag, var.factor, cooling.factor,
cooling.fraction,
method = c("mif","unweighted","fp","mif2"),
- tol = 1e-17, max.fail = 0,
+ tol = 1e-17, max.fail = Inf,
verbose = getOption("verbose"),
- transform = FALSE, ...) {
+ transform = FALSE,
+ ...) {
transform <- as.logical(transform)
method <- match.arg(method)
@@ -418,9 +419,7 @@
setMethod(
"mif",
signature=signature(object="pfilterd.pomp"),
- function (object, Nmif = 1,
- Np, tol, max.fail = 0,
- verbose = getOption("verbose"),
+ function (object, Nmif = 1, Np, tol,
...) {
if (missing(Np)) Np <- object at Np
@@ -431,8 +430,6 @@
Nmif=Nmif,
Np=Np,
tol=tol,
- max.fail=max.fail,
- verbose=verbose,
...
)
}
@@ -448,9 +445,9 @@
Np, ic.lag, var.factor, cooling.factor,
cooling.fraction,
method,
- tol, max.fail = 0,
- verbose = getOption("verbose"),
- transform, ...) {
+ tol,
+ transform,
+ ...) {
if (missing(Nmif)) Nmif <- object at Nmif
if (missing(start)) start <- coef(object)
@@ -484,8 +481,6 @@
ic.lag=ic.lag,
method=method,
tol=tol,
- max.fail=max.fail,
- verbose=verbose,
transform=transform,
...
)
@@ -496,8 +491,6 @@
'continue',
signature=signature(object='mif'),
function (object, Nmif = 1,
- max.fail = 0,
- verbose = getOption("verbose"),
...) {
ndone <- object at Nmif
@@ -505,8 +498,6 @@
obj <- mif(
object=object,
Nmif=Nmif,
- max.fail=max.fail,
- verbose=verbose,
.ndone=ndone,
paramMatrix=object at paramMatrix,
...
Modified: pkg/pomp/R/pfilter.R
===================================================================
--- pkg/pomp/R/pfilter.R 2013-01-10 00:23:21 UTC (rev 809)
+++ pkg/pomp/R/pfilter.R 2013-01-10 01:08:32 UTC (rev 810)
@@ -45,7 +45,7 @@
mif2 <- as.logical(.mif2)
transform <- as.logical(.transform)
-
+
if (missing(seed)) seed <- NULL
if (!is.null(seed)) {
if (!exists(".Random.seed",where=.GlobalEnv)) { # need to initialize the RNG
@@ -345,7 +345,7 @@
signature=signature(object="pomp"),
function (object, params, Np,
tol = 1e-17,
- max.fail = 0,
+ max.fail = Inf,
pred.mean = FALSE,
pred.var = FALSE,
filter.mean = FALSE,
Modified: pkg/pomp/inst/NEWS
===================================================================
--- pkg/pomp/inst/NEWS 2013-01-10 00:23:21 UTC (rev 809)
+++ pkg/pomp/inst/NEWS 2013-01-10 01:08:32 UTC (rev 810)
@@ -2,6 +2,10 @@
0.44-1
o New 'mif2' option for 'mif'.
+ o 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.
+
o 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")'.
Modified: pkg/pomp/man/mif.Rd
===================================================================
--- pkg/pomp/man/mif.Rd 2013-01-10 00:23:21 UTC (rev 809)
+++ pkg/pomp/man/mif.Rd 2013-01-10 01:08:32 UTC (rev 810)
@@ -19,16 +19,13 @@
\S4method{mif}{pomp}(object, Nmif = 1, start, pars, ivps = character(0),
particles, rw.sd, Np, ic.lag, var.factor, cooling.factor,
cooling.fraction, method = c("mif","unweighted","fp","mif2"),
- tol = 1e-17, max.fail = 0,
+ tol = 1e-17, max.fail = Inf,
verbose = getOption("verbose"), transform = FALSE, \dots)
-\S4method{mif}{pfilterd.pomp}(object, Nmif = 1, Np, tol, max.fail = 0,
- verbose = getOption("verbose"), \dots)
+\S4method{mif}{pfilterd.pomp}(object, Nmif = 1, Np, tol, \dots)
\S4method{mif}{mif}(object, Nmif, start, pars, ivps,
particles, rw.sd, Np, ic.lag, var.factor, cooling.factor, cooling.fraction,
- method, tol, max.fail = 0,
- verbose = getOption("verbose"), transform, \dots)
-\S4method{continue}{mif}(object, Nmif = 1, max.fail = 0,
- verbose = getOption("verbose"), \dots)
+ method, tol, transform, \dots)
+\S4method{continue}{mif}(object, Nmif = 1, \dots)
}
\arguments{
\item{object}{
@@ -103,12 +100,10 @@
\code{method="mif2"} [EXPLAIN]
}
\item{tol}{
- numeric scalar; particles with log likelihood below \code{tol} are considered to be \dQuote{lost}.
- A filtering failure occurs when, at some time point, all particles are lost.
+ See the description under \code{\link{pfilter}}.
}
\item{max.fail}{
- integer; maximum number of filtering failures permitted.
- If the number of failures exceeds this number, execution will terminate with an error.
+ See the description under \code{\link{pfilter}}.
}
\item{verbose}{
logical; if TRUE, print progress reports.
Modified: pkg/pomp/man/pfilter.Rd
===================================================================
--- pkg/pomp/man/pfilter.Rd 2013-01-10 00:23:21 UTC (rev 809)
+++ pkg/pomp/man/pfilter.Rd 2013-01-10 01:08:32 UTC (rev 810)
@@ -12,7 +12,7 @@
}
\usage{
\S4method{pfilter}{pomp}(object, params, Np, tol = 1e-17,
- max.fail = 0, pred.mean = FALSE, pred.var = FALSE,
+ max.fail = Inf, pred.mean = FALSE, pred.var = FALSE,
filter.mean = FALSE, save.states = FALSE,
save.params = FALSE, seed = NULL,
verbose = getOption("verbose"), \dots)
@@ -46,6 +46,7 @@
\item{max.fail}{
integer; the maximum number of filtering failures allowed.
If the number of filtering failures exceeds this number, execution will terminate with an error.
+ By default, \code{max.fail} is set to infinity, so no error can be triggered.
}
\item{pred.mean}{
logical; if \code{TRUE}, the prediction means are calculated for the state variables and parameters.
Modified: pkg/pomp/tests/ou2-mif2.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-mif2.Rout.save 2013-01-10 00:23:21 UTC (rev 809)
+++ pkg/pomp/tests/ou2-mif2.Rout.save 2013-01-10 01:08:32 UTC (rev 810)
@@ -21,7 +21,7 @@
Loading required package: subplex
Loading required package: deSolve
>
-> pompExample("ou2")
+> pompExample(ou2)
newly created pomp objects:
ou2
>
More information about the pomp-commits
mailing list