diff --git a/DESCRIPTION b/DESCRIPTION index 5b3c68e0..9f76751c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: pomp Type: Package Title: Statistical Inference for Partially Observed Markov Processes -Version: 6.0.2.0 -Date: 2024-12-12 +Version: 6.0.2.2 +Date: 2024-12-15 Authors@R: c(person(given=c("Aaron","A."),family="King",role=c("aut","cre"),email="kingaa@umich.edu",comment=c(ORCID="0000-0001-6159-3207")), person(given=c("Edward","L."),family="Ionides",role="aut",comment=c(ORCID="0000-0002-4190-0174")) , person(given="Carles",family="Bretó",role="aut",comment=c(ORCID="0000-0003-4695-4902")), diff --git a/R/objfun.R b/R/objfun.R index 885580ee..3e9d7fdb 100644 --- a/R/objfun.R +++ b/R/objfun.R @@ -100,7 +100,7 @@ setMethod( setMethod( "simulate", signature=signature(object="objfun"), - definition=function (object, seed = NULL, ...) { + definition=function (object, seed = NULL,...) { simulate(as(object,"pomp"),seed=seed,...) } ) @@ -110,7 +110,7 @@ setMethod( setMethod( "probe", signature=signature(data="objfun"), - definition=function (data, seed = NULL, ...) { + definition=function (data, ..., seed = NULL) { probe(as(data,"pomp"),seed=seed,...) } ) @@ -130,7 +130,7 @@ setMethod( setMethod( "spect", signature=signature(data="objfun"), - definition=function (data, seed = NULL, ...) { + definition=function (data, ..., seed = NULL) { spect(as(data,"pomp"),seed=seed,...) } ) @@ -143,7 +143,8 @@ setMethod( definition = function (object, ...) { object@env$.gnsi <- TRUE pompLoad_internal(object@env$object,...) - }) + } +) ##' @rdname load ##' @export @@ -153,4 +154,5 @@ setMethod( definition = function (object, ...) { object@env$.gnsi <- TRUE pompUnload_internal(object@env$object,...) - }) + } +) diff --git a/R/pfilter.R b/R/pfilter.R index eb7451bd..f089951c 100644 --- a/R/pfilter.R +++ b/R/pfilter.R @@ -125,8 +125,8 @@ setMethod( signature=signature(data="data.frame"), definition=function ( data, - Np, ..., + Np, params, rinit, rprocess, dmeasure, pred.mean = FALSE, pred.var = FALSE, @@ -201,8 +201,9 @@ setMethod( "pfilter", signature=signature(data="pfilterd_pomp"), function ( - data, Np, + data, ..., + Np, verbose = getOption("verbose", FALSE) ) { @@ -214,8 +215,7 @@ setMethod( ) pfilter_internal <- function ( - object, Np, - ..., + object, ..., Np, pred.mean = FALSE, pred.var = FALSE, filter.mean = FALSE, filter.traj = FALSE, cooling, cooling.m, save.states = c("no", "filter", "prediction", diff --git a/R/pmcmc.R b/R/pmcmc.R index b47a9d91..8de9d161 100644 --- a/R/pmcmc.R +++ b/R/pmcmc.R @@ -222,7 +222,11 @@ setMethod( setMethod( "continue", signature=signature(object="pmcmcd_pomp"), - function (object, Nmcmc = 1, ...) { + function ( + object, + ..., + Nmcmc = 1 + ) { ndone <- object@Nmcmc accepts <- object@accepts diff --git a/R/wpfilter.R b/R/wpfilter.R index 77c2f51d..f146a264 100644 --- a/R/wpfilter.R +++ b/R/wpfilter.R @@ -83,8 +83,8 @@ setMethod( signature=signature(data="data.frame"), definition=function ( data, - Np, ..., + Np, params, rinit, rprocess, dmeasure, trigger = 1, target = 0.5, verbose = getOption("verbose", FALSE) @@ -116,8 +116,8 @@ setMethod( signature=signature(data="pomp"), definition=function ( data, - Np, ..., + Np, trigger = 1, target = 0.5, verbose = getOption("verbose", FALSE) ) { diff --git a/inst/NEWS b/inst/NEWS index f646d9a0..b8d79efb 100644 --- a/inst/NEWS +++ b/inst/NEWS @@ -1,5 +1,10 @@ _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 _6._0._2: + + • The ‘save.states’ option to ‘pfilter’ has changed. See + ‘?pfilter’ and ‘?saved_states’ for details. + _C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _6._0._1: • In calls to ‘pomp’ elementary and inference algorithms, it is diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd index 82516010..68efdfac 100644 --- a/inst/NEWS.Rd +++ b/inst/NEWS.Rd @@ -1,5 +1,11 @@ \name{NEWS} \title{News for package `pomp'} +\section{Changes in \pkg{pomp} version 6.0.2}{ + \itemize{ + \item The \code{save.states} option to \code{pfilter} has changed. + See \code{?pfilter} and \code{?saved_states} for details. + } +} \section{Changes in \pkg{pomp} version 6.0.1}{ \itemize{ \item In calls to \pkg{pomp} elementary and inference algorithms, it is now necessary to pass all arguments by name. diff --git a/man/continue.Rd b/man/continue.Rd index 588b3555..1672b93e 100644 --- a/man/continue.Rd +++ b/man/continue.Rd @@ -11,7 +11,7 @@ \usage{ \S4method{continue}{abcd_pomp}(object, ..., Nabc = 1) -\S4method{continue}{pmcmcd_pomp}(object, Nmcmc = 1, ...) +\S4method{continue}{pmcmcd_pomp}(object, ..., Nmcmc = 1) \S4method{continue}{mif2d_pomp}(object, ..., Nmif = 1) } diff --git a/man/pfilter.Rd b/man/pfilter.Rd index 48fb75fb..73b4b1b8 100644 --- a/man/pfilter.Rd +++ b/man/pfilter.Rd @@ -12,8 +12,8 @@ \usage{ \S4method{pfilter}{data.frame}( data, - Np, ..., + Np, params, rinit, rprocess, @@ -40,7 +40,7 @@ verbose = getOption("verbose", FALSE) ) -\S4method{pfilter}{pfilterd_pomp}(data, Np, ..., verbose = getOption("verbose", FALSE)) +\S4method{pfilter}{pfilterd_pomp}(data, ..., Np, verbose = getOption("verbose", FALSE)) \S4method{pfilter}{objfun}(data, ...) } @@ -50,6 +50,9 @@ or an object of class \sQuote{pomp}, i.e., the output of another \pkg{pomp} calculation. Internally, \code{data} will be coerced to an array with storage-mode \code{double}.} +\item{...}{additional arguments are passed to \code{\link{pomp}}. +This allows one to set, unset, or modify \link[=basic_components]{basic model components} within a call to this function.} + \item{Np}{the number of particles to use. This may be specified as a single positive integer, in which case the same number of particles will be used at each timestep. Alternatively, if one wishes the number of particles to vary across timesteps, one may specify \code{Np} either as a vector of positive integers of length \preformatted{length(time(object,t0=TRUE))} or as a function taking a positive integer argument. @@ -59,9 +62,6 @@ In the latter case, \code{Np(k)} must be a single positive integer, representing and so on, while when \code{T=length(time(object))}, \code{Np(T)} is the number of particles to sample at the end of the time-series.} -\item{...}{additional arguments are passed to \code{\link{pomp}}. -This allows one to set, unset, or modify \link[=basic_components]{basic model components} within a call to this function.} - \item{params}{optional; named numeric vector of parameters. This will be coerced internally to storage mode \code{double}.} diff --git a/man/probe.Rd b/man/probe.Rd index cc538545..aeeb1b09 100644 --- a/man/probe.Rd +++ b/man/probe.Rd @@ -45,7 +45,7 @@ \S4method{probe}{probe_match_objfun}(data, ..., seed, verbose = getOption("verbose", FALSE)) -\S4method{probe}{objfun}(data, seed = NULL, ...) +\S4method{probe}{objfun}(data, ..., seed = NULL) } \arguments{ \item{data}{either a data frame holding the time series data, diff --git a/man/spect.Rd b/man/spect.Rd index 64476f7f..54c67e4b 100644 --- a/man/spect.Rd +++ b/man/spect.Rd @@ -54,7 +54,7 @@ \S4method{spect}{spect_match_objfun}(data, ..., seed, verbose = getOption("verbose", FALSE)) -\S4method{spect}{objfun}(data, seed = NULL, ...) +\S4method{spect}{objfun}(data, ..., seed = NULL) } \arguments{ \item{data}{either a data frame holding the time series data, diff --git a/man/wpfilter.Rd b/man/wpfilter.Rd index 91efb149..6268577f 100644 --- a/man/wpfilter.Rd +++ b/man/wpfilter.Rd @@ -11,8 +11,8 @@ \usage{ \S4method{wpfilter}{data.frame}( data, - Np, ..., + Np, params, rinit, rprocess, @@ -24,8 +24,8 @@ \S4method{wpfilter}{pomp}( data, - Np, ..., + Np, trigger = 1, target = 0.5, verbose = getOption("verbose", FALSE) @@ -39,6 +39,9 @@ or an object of class \sQuote{pomp}, i.e., the output of another \pkg{pomp} calculation. Internally, \code{data} will be coerced to an array with storage-mode \code{double}.} +\item{...}{additional arguments are passed to \code{\link{pomp}}. +This allows one to set, unset, or modify \link[=basic_components]{basic model components} within a call to this function.} + \item{Np}{the number of particles to use. This may be specified as a single positive integer, in which case the same number of particles will be used at each timestep. Alternatively, if one wishes the number of particles to vary across timesteps, one may specify \code{Np} either as a vector of positive integers of length \preformatted{length(time(object,t0=TRUE))} or as a function taking a positive integer argument. @@ -48,9 +51,6 @@ In the latter case, \code{Np(k)} must be a single positive integer, representing and so on, while when \code{T=length(time(object))}, \code{Np(T)} is the number of particles to sample at the end of the time-series.} -\item{...}{additional arguments are passed to \code{\link{pomp}}. -This allows one to set, unset, or modify \link[=basic_components]{basic model components} within a call to this function.} - \item{params}{optional; named numeric vector of parameters. This will be coerced internally to storage mode \code{double}.}