[Pomp-commits] r1107 - pkg/pomp/man www/content www/vignettes
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Feb 27 03:57:52 CET 2015
Author: kingaa
Date: 2015-02-27 03:57:51 +0100 (Fri, 27 Feb 2015)
New Revision: 1107
Added:
pkg/pomp/man/design.Rd
Removed:
pkg/pomp/man/abc-methods.Rd
pkg/pomp/man/mif-methods.Rd
pkg/pomp/man/pfilter-methods.Rd
pkg/pomp/man/profile-design.Rd
pkg/pomp/man/slice-design.Rd
pkg/pomp/man/sobol.Rd
Modified:
pkg/pomp/man/abc.Rd
pkg/pomp/man/builder.Rd
pkg/pomp/man/gompertz.Rd
pkg/pomp/man/lowlevel.Rd
pkg/pomp/man/mif.Rd
pkg/pomp/man/ou2.Rd
pkg/pomp/man/pfilter.Rd
pkg/pomp/man/plugins.Rd
pkg/pomp/man/pomp-methods.Rd
pkg/pomp/man/pomp-package.Rd
pkg/pomp/man/pomp.Rd
pkg/pomp/man/proposals.Rd
pkg/pomp/man/ricker.Rd
pkg/pomp/man/rw2.Rd
pkg/pomp/man/simulate-pomp.Rd
pkg/pomp/man/sir.Rd
www/content/NEWS.html
www/vignettes/advanced_topics_in_pomp.pdf
www/vignettes/bsmc-ricker-flat-prior.rda
www/vignettes/bsmc-ricker-normal-prior.rda
www/vignettes/gompertz-multi-mif.rda
www/vignettes/gompertz-performance.rda
www/vignettes/gompertz-trajmatch.rda
www/vignettes/intro_to_pomp.R
www/vignettes/intro_to_pomp.Rnw
www/vignettes/intro_to_pomp.pdf
www/vignettes/nlf-fit-from-truth.rda
www/vignettes/nlf-fits.rda
www/vignettes/plugin-C-code.rda
www/vignettes/plugin-R-code.rda
www/vignettes/pomp.pdf
www/vignettes/ricker-first-probe.rda
www/vignettes/ricker-mif.rda
www/vignettes/ricker-probe-match.rda
www/vignettes/ricker-probe.rda
www/vignettes/vectorized-C-code.rda
www/vignettes/vectorized-R-code.rda
Log:
- many edits to help pages
- update vignettes
Deleted: pkg/pomp/man/abc-methods.Rd
===================================================================
--- pkg/pomp/man/abc-methods.Rd 2015-02-27 02:57:40 UTC (rev 1106)
+++ pkg/pomp/man/abc-methods.Rd 2015-02-27 02:57:51 UTC (rev 1107)
@@ -1,58 +0,0 @@
-\name{abc-methods}
-\docType{methods}
-\alias{abc-methods}
-\alias{conv.rec,abc-method}
-\alias{conv.rec-abc}
-\alias{conv.rec,abcList-method}
-\alias{conv.rec-abcList}
-\alias{plot-abc}
-\alias{plot,abc-method}
-\alias{plot-abcList}
-\alias{plot,abcList-method}
-\alias{abcList-class}
-\alias{c-abc}
-\alias{c,abc-method}
-\alias{c-abcList}
-\alias{c,abcList-method}
-\alias{[-abcList}
-\alias{[,abcList-method}
-\title{Methods of the "abc" class}
-\description{Methods of the "abc" class.}
-\usage{
-\S4method{conv.rec}{abc}(object, pars, \dots)
-\S4method{conv.rec}{abcList}(object, \dots)
-\S4method{plot}{abc}(x, y, pars, scatter = FALSE, \dots)
-\S4method{plot}{abcList}(x, y, \dots)
-\S4method{c}{abc}(x, \dots, recursive = FALSE)
-\S4method{c}{abcList}(x, \dots, recursive = FALSE)
-}
-\arguments{
- \item{object, x}{The \code{abc} object.}
- \item{pars}{Names of parameters.}
- \item{y, recursive}{Ignored.}
- \item{scatter}{
- optional logical;
- If \code{TRUE}, draw scatterplots.
- If \code{FALSE}, draw traceplots.
- }
- \item{\dots}{
- Further arguments (either ignored or passed to underlying functions).
- }
-}
-\section{Methods}{
- \describe{
- \item{conv.rec}{
- \code{conv.rec(object, pars)} returns the columns of the convergence-record matrix corresponding to the names in \code{pars}.
- By default, all rows are returned.
- }
- \item{c}{
- Concatenates \code{abc} objects into an \code{abcList}.
- }
- \item{plot}{
- Diagnostic plots.
- }
- }
-}
-\author{Edward L. Ionides \email{ionides at umich dot edu}, Aaron A. King \email{kingaa at umich dot edu}}
-\seealso{\code{\link{abc}}, \code{\link{pomp}}}
-\keyword{ts}
Modified: pkg/pomp/man/abc.Rd
===================================================================
--- pkg/pomp/man/abc.Rd 2015-02-27 02:57:40 UTC (rev 1106)
+++ pkg/pomp/man/abc.Rd 2015-02-27 02:57:51 UTC (rev 1107)
@@ -1,6 +1,8 @@
-\name{abc}
+\title{Estimation by approximate Bayesian computation (ABC)}
+\name{Approximate Bayesian computation}
\docType{methods}
\alias{abc}
+\alias{ABC}
\alias{abc-abc}
\alias{abc,probed.pomp-method}
\alias{abc-probed.pomp}
@@ -11,7 +13,22 @@
\alias{continue,abc-method}
\alias{continue-abc}
\alias{abc-class}
-\title{The ABC algorithm}
+\alias{abc-methods}
+\alias{conv.rec,abc-method}
+\alias{conv.rec-abc}
+\alias{conv.rec,abcList-method}
+\alias{conv.rec-abcList}
+\alias{plot-abc}
+\alias{plot,abc-method}
+\alias{plot-abcList}
+\alias{plot,abcList-method}
+\alias{abcList-class}
+\alias{c-abc}
+\alias{c,abc-method}
+\alias{c-abcList}
+\alias{c,abcList-method}
+\alias{[-abcList}
+\alias{[,abcList-method}
\description{
The approximate Bayesian computation (ABC) algorithm for estimating the parameters of a partially-observed Markov process.
}
@@ -25,6 +42,10 @@
probes, scale, epsilon,
verbose = getOption("verbose"), \dots)
\S4method{continue}{abc}(object, Nabc = 1, \dots)
+\S4method{conv.rec}{abc}(object, pars, \dots)
+\S4method{conv.rec}{abcList}(object, \dots)
+\S4method{plot}{abc}(x, y, pars, scatter = FALSE, \dots)
+\S4method{plot}{abcList}(x, y, \dots)
}
\arguments{
\item{object}{
@@ -44,7 +65,6 @@
Several functions that construct appropriate proposal function are provided:
see \link{MCMC proposal functions} for more information.
}
- \item{pars}{Deprecated and ignored. Will be removed in a future release.}
\item{rw.sd}{
Deprecated. Will be removed in a future release.
Specifying \code{rw.sd} is equivalent to setting \code{proposal=mvn.diag.rw(rw.sd)}.
@@ -62,33 +82,48 @@
\item{verbose}{
logical; if TRUE, print progress reports.
}
+ \item{pars}{Names of parameters.}
+ \item{scatter}{
+ optional logical;
+ If \code{TRUE}, draw scatterplots.
+ If \code{FALSE}, draw traceplots.
+ }
+ \item{x}{\code{abc} object.}
+ \item{y}{Ignored.}
\item{\dots}{
Additional arguments.
These are currently ignored.
}
}
-\value{
- An object of class \code{abc}.
- This class inherits from class \code{\link[=probed.pomp-class]{probed.pomp}} and contains the following additional slots:
- \describe{
- \item{pars, Nabc, dprior, hyperparams, scale, epsilon}{
- These slots hold the values of the corresponding arguments of the call to \code{abc}.
- }
- }
+\section{Running ABC}{
+ \code{abc} returns an object of class \code{abc}.
+ One or more \code{abc} objects can be joined to form an \code{abcList} object.
}
-\section{Re-running ABC Iterations}{
+\section{Re-running ABC iterations}{
To re-run a sequence of ABC iterations, one can use the \code{abc} method on a \code{abc} object.
By default, the same parameters used for the original ABC run are re-used (except for \code{tol}, \code{max.fail}, and \code{verbose}, the defaults of which are shown above).
If one does specify additional arguments, these will override the defaults.
}
-\section{Continuing ABC Iterations}{
+\section{Continuing ABC iterations}{
One can continue a series of ABC iterations from where one left off using the \code{continue} method.
A call to \code{abc} to perform \code{Nabc=m} iterations followed by a call to \code{continue} to perform \code{Nabc=n} iterations will produce precisely the same effect as a single call to \code{abc} to perform \code{Nabc=m+n} iterations.
By default, all the algorithmic parameters are the same as used in the original call to \code{abc}.
Additional arguments will override the defaults.
}
-\section{Details}{
- TO APPEAR.
+\section{Methods}{
+ Methods that can be used to manipulate, display, or extract information from an \code{abc} object:
+ \describe{
+ \item{conv.rec}{
+ \code{conv.rec(object, pars)} returns the columns of the convergence-record matrix corresponding to the names in \code{pars}.
+ By default, all rows are returned.
+ }
+ \item{c}{
+ Concatenates \code{abc} objects into an \code{abcList}.
+ }
+ \item{plot}{
+ Diagnostic plots.
+ }
+ }
}
\references{
T. Toni and M. P. H. Stumpf,
@@ -101,7 +136,6 @@
}
\author{Edward L. Ionides \email{ionides at umich dot edu}, Aaron A. King \email{kingaa at umich dot edu}}
\seealso{
- \link{abc-methods}, \code{\link{pomp}}, \code{\link{probe}}.
- See the \dQuote{intro_to_pomp} vignette for an example
+ \code{\link{pomp}}, \code{\link{probe}}, and the tutorials on the \href{http://pomp.r-forge.r-project.org}{package website}.
}
\keyword{ts}
Modified: pkg/pomp/man/builder.Rd
===================================================================
--- pkg/pomp/man/builder.Rd 2015-02-27 02:57:40 UTC (rev 1106)
+++ pkg/pomp/man/builder.Rd 2015-02-27 02:57:51 UTC (rev 1107)
@@ -2,7 +2,9 @@
\alias{pompBuilder}
\title{Write, compile, and build a pomp object using native codes}
\description{
- \code{pompBuilder} is a facility for producing compiled \code{pomp} objects.
+ \code{pompBuilder} is a tool for producing compiled \code{pomp} objects.
+ It was an early attempt to facilitate the use of compiled codes but has been replaced by the more flexible use of \code{\link{Csnippet}}s in the regular \code{pomp} constructor function.
+ It is not being actively maintained and users are encouraged to migrate to using \code{\link{Csnippet}}s.
}
\usage{
pompBuilder(data, times, t0, name, statenames, paramnames,
@@ -79,9 +81,8 @@
This will not typically be the case in out-of-the-box Windows installations.
}
\seealso{
- \code{\link{pomp}} and the demos.
+ \code{\link{pomp}}, \code{\link{Csnippet}}
}
\author{Aaron A. King \email{kingaa at umich dot edu}}
-\examples{
- ## see the demos
-}
+\keyword{programming}
+\keyword{internal}
Added: pkg/pomp/man/design.Rd
===================================================================
--- pkg/pomp/man/design.Rd (rev 0)
+++ pkg/pomp/man/design.Rd 2015-02-27 02:57:51 UTC (rev 1107)
@@ -0,0 +1,77 @@
+\name{design}
+\title{Design matrices for pomp calculations}
+\alias{profileDesign}
+\alias{sobolDesign}
+\alias{sobol}
+\alias{sliceDesign}
+\description{
+ These functions are useful for generating designs for the exploration of parameter space.
+ \code{sobolDesign} generate a Latin hypercube design using the Sobol' low-discrepancy sequence.
+ \code{profileDesign} generates a data-frame where each row can be used as the starting point for a profile likelihood calculation.
+ \code{sliceDesign} generates points along slices through a specified point.
+}
+\usage{
+sobolDesign(lower, upper, nseq)
+profileDesign(\dots, lower, upper, nprof,
+ stringsAsFactors = default.stringsAsFactors())
+sliceDesign(center, \dots)
+}
+\arguments{
+ \item{lower, upper}{
+ named numeric vectors giving the lower and upper bounds of the ranges, respectively.
+ }
+ \item{\dots}{
+ In \code{profileDesign}, additional arguments specify the parameters over which to profile and the values of these parameters.
+
+ In \code{sliceDesign}, additional numeric vector arguments specify the locations of points along the slices.
+ }
+ \item{nseq}{
+ Total number of points requested.
+ }
+ \item{nprof}{
+ The number of points per profile point.
+ }
+ \item{stringsAsFactors}{
+ should character vectors be converted to factors?
+ }
+ \item{center}{
+ \code{center} is a named numeric vector specifying the point through which the slice(s) is (are) to be taken.
+ }
+}
+\value{
+ \code{sobolDesign}
+
+ \code{profileDesign} returns a data frame with \code{nprof} points per profile point.
+ The other parameters in \code{vars} are sampled using \code{sobol}.
+}
+\examples{
+## Sobol' low-discrepancy design
+plot(sobolDesign(lower=c(a=0,b=100),upper=c(b=200,a=1),100))
+
+## A one-parameter profile design:
+x <- profileDesign(p=1:10,lower=c(a=0,b=0),upper=c(a=1,b=5),nprof=20)
+dim(x)
+plot(x)
+
+## A two-parameter profile design:
+x <- profileDesign(p=1:10,q=3:5,lower=c(a=0,b=0),upper=c(b=5,a=1),nprof=20)
+dim(x)
+plot(x)
+
+## A single 11-point slice through the point c(A=3,B=8,C=0) along the B direction.
+x <- sliceDesign(center=c(A=3,B=8,C=0),B=seq(0,10,by=1))
+dim(x)
+plot(x)
+
+## Two slices through the same point along the A and C directions.
+x <- sliceDesign(c(A=3,B=8,C=0),A=seq(0,5,by=1),C=seq(0,5,length=11))
+dim(x)
+plot(x)
+}
+\references{
+ W. H. Press, S. A. Teukolsky, W. T. Vetterling, \& B. P. Flannery,
+ Numerical Recipes in C,
+ Cambridge University Press, 1992
+}
+\author{Aaron A. King \email{kingaa at umich dot edu}}
+\keyword{design}
Modified: pkg/pomp/man/gompertz.Rd
===================================================================
--- pkg/pomp/man/gompertz.Rd 2015-02-27 02:57:40 UTC (rev 1106)
+++ pkg/pomp/man/gompertz.Rd 2015-02-27 02:57:51 UTC (rev 1107)
@@ -18,6 +18,6 @@
coef(gompertz,transform=TRUE)
}
\seealso{
- the \href{http://pomp.r-forge.r-project.org/vignettes/intro_to_pomp.pdf}{\dQuote{Introduction to \pkg{pomp}}} tutorial.
+ \code{pomp}, \code{ricker}, and the tutorials at \url{http://pomp.r-forge.r-project.org}.
}
\keyword{datasets}
Modified: pkg/pomp/man/lowlevel.Rd
===================================================================
--- pkg/pomp/man/lowlevel.Rd 2015-02-27 02:57:40 UTC (rev 1106)
+++ pkg/pomp/man/lowlevel.Rd 2015-02-27 02:57:51 UTC (rev 1107)
@@ -1,5 +1,6 @@
\name{Low-level-interface}
\docType{methods}
+\title{pomp low-level interface}
\alias{pomp low-level interface}
\alias{rprocess}
\alias{rprocess,pomp-method}
@@ -28,9 +29,14 @@
\alias{trajectory}
\alias{trajectory,pomp-method}
\alias{trajectory-pomp}
-\title{The low-level interface to pomp objects}
+\alias{pompLoad}
+\alias{pompLoad-pomp}
+\alias{pompLoad,pomp-method}
+\alias{pompUnload}
+\alias{pompUnload-pomp}
+\alias{pompUnload,pomp-method}
\description{
- A \code{pomp} object implements a partially observed Markov process (POMP) model.
+ A \code{pomp} object implements a partially observed Markov process (\acronym{POMP}) model.
Basic operations on this model (with shorthand terms) include:
\enumerate{
\item simulation of the state process given parameters (rprocess)
@@ -44,7 +50,7 @@
\item computation of a trajetory of the deterministic skeleton given parameters (trajectory)
}
\pkg{pomp} provides S4 methods that implement each of these basic operations.
- These operations can be combined to implement computations and statistical inference methods that depend only on a model's POMP structure.
+ These operations can be combined to implement computations and statistical inference methods that depend only on a model's \acronym{POMP} structure.
For convenience, parameter transformations may also be enclosed in a \code{pomp} object.
This page documents these elements.
@@ -59,6 +65,8 @@
\S4method{init.state}{pomp}(object, params, t0, \dots)
\S4method{skeleton}{pomp}(object, x, t, params, \dots)
\S4method{trajectory}{pomp}(object, params, times, t0, as.data.frame = FALSE, \dots)
+\S4method{pompLoad}{pomp}(object, \dots)
+\S4method{pompUnload}{pomp}(object, \dots)
}
\arguments{
\item{object}{an object of class \code{pomp}.}
@@ -102,8 +110,8 @@
In all other cases, additional arguments are ignored.
}
}
-\section{rprocess: simulating the process model}{
- \code{rprocess} runs simulations of the the process-model portion of partially-observed Markov process.
+\section{rprocess}{
+ \code{rprocess} simulates the process-model portion of partially-observed Markov process.
When \code{rprocess} is called, the first entry of \code{times} is taken to be the initial time
(i.e., that corresponding to \code{xstart}).
@@ -111,12 +119,12 @@
\code{rprocess} returns a rank-3 array with rownames.
Suppose \code{x} is the array returned.
- Then \code{dim(x)=c(nvars,nrep,ntimes-offset)}, where \code{nvars} is the number of state variables (=\code{nrow(xstart)}), \code{nrep} is the number of independent realizations simulated (=\code{ncol(xstart)}), and \code{ntimes} is the length of the vector \code{times}.
+ Then \preformatted{dim(x)=c(nvars,nrep,ntimes-offset),} where \code{nvars} is the number of state variables (=\code{nrow(xstart)}), \code{nrep} is the number of independent realizations simulated (=\code{ncol(xstart)}), and \code{ntimes} is the length of the vector \code{times}.
\code{x[,j,k]} is the value of the state process in the \code{j}-th realization at time \code{times[k+offset]}.
- The rownames of \code{x} must correspond to those of \code{xstart}.
+ The rownames of \code{x} must correspond to those of \code{xstart}.
}
-\section{dprocess: evaluating the probability density of a sequence of state transitions}{
- \code{dprocess} evaluates the probability density of a set of consecutive state transitions.
+\section{dprocess}{
+ \code{dprocess} evaluates the probability density of a sequence of consecutive state transitions.
\code{dprocess} returns a matrix of dimensions \code{nrep} x \code{ntimes-1}.
If \code{d} is the returned matrix, \code{d[j,k]} is the likelihood of the transition from state \code{x[,j,k-1]} at time \code{times[k-1]} to state \code{x[,j,k]} at time \code{times[k]}.
@@ -145,7 +153,7 @@
In the case of a continuous-time system, the skeleton is a vectorfield.
NB: \code{skeleton} just evaluates the deterministic skeleton;
it does not iterate or integrate.
-
+
\code{skeleton} returns an array of dimensions \code{nvar} x \code{nrep} x \code{ntimes}.
If \code{f} is the returned matrix, \code{f[i,j,k]} is the i-th component of the deterministic skeleton at time \code{times[k]} given the state \code{x[,j,k]} and parameters \code{params[,j]}.
}
@@ -165,8 +173,27 @@
\section{Parameter transformations}{
User-defined parameter transformations enclosed in the \code{pomp} object can be accessed via \code{\link{partrans}}.
}
+\section{\code{pompLoad}, \code{pompUnload}}{
+ \code{pompLoad} and \code{pompUnload} cause compiled codes associated with \code{object} to be dynamically linked or unlinked, respectively.
+ When \code{Csnippet}s are used in the construction of a \code{pomp} object, the resulting shared-object library is dynamically loaded (linked) before each use, and unloaded afterward.
+ These functions are provided because in some instances, greater control may be desired.
+ These functions have no effect on shared-object libraries linked by the user.
+}
\examples{
pompExample(ricker)
+
+p <- parmat(c(r=42,phi=10,sigma=0.3,N.0=7,e.0=0),10)
+t <- c(1:10,20,30)
+t0 <- 0
+x0 <- init.state(ricker,params=p,t0=t0)
+x <- rprocess(ricker,xstart=x0,times=c(t0,t),params=p,offset=1)
+y <- rmeasure(ricker,params=p,x=x,times=t)
+ll <- dmeasure(ricker,y=y[,3,,drop=FALSE],x=x,times=t,params=p,log=TRUE)
+apply(ll,1,sum)
+f <- skeleton(ricker,x=x,t=t,params=p)
+z <- trajectory(ricker,params=p,times=t,t0=t0)
+
+## short arguments are recycled:
p <- c(r=42,phi=10,sigma=0.3,N.0=7,e.0=0)
t <- c(1:10,20,30)
t0 <- 0
Deleted: pkg/pomp/man/mif-methods.Rd
===================================================================
--- pkg/pomp/man/mif-methods.Rd 2015-02-27 02:57:40 UTC (rev 1106)
+++ pkg/pomp/man/mif-methods.Rd 2015-02-27 02:57:51 UTC (rev 1107)
@@ -1,73 +0,0 @@
-\name{mif-methods}
-\docType{methods}
-\alias{mif-methods}
-\alias{logLik,mif-method}
-\alias{logLik-mif}
-\alias{conv.rec}
-\alias{conv.rec,mif-method}
-\alias{conv.rec-mif}
-\alias{conv.rec,mifList-method}
-\alias{conv.rec-mifList}
-\alias{plot-mif}
-\alias{plot,mif-method}
-\alias{plot-mifList}
-\alias{plot,mifList-method}
-\alias{mifList-class}
-\alias{c-mif}
-\alias{c,mif-method}
-\alias{c-mifList}
-\alias{c,mifList-method}
-\alias{[-mifList}
-\alias{[,mifList-method}
-\alias{compare.mif}
-\title{Methods of the "mif" class}
-\description{Methods of the \code{mif} class.}
-\usage{
-\S4method{logLik}{mif}(object, \dots)
-\S4method{conv.rec}{mif}(object, pars, transform = FALSE, \dots)
-\S4method{conv.rec}{mifList}(object, \dots)
-\S4method{plot}{mif}(x, y, \dots)
-\S4method{plot}{mifList}(x, y, \dots)
-\S4method{c}{mif}(x, \dots, recursive = FALSE)
-\S4method{c}{mifList}(x, \dots, recursive = FALSE)
-compare.mif(z)
-}
-\arguments{
- \item{object}{The \code{mif} object.}
- \item{pars}{Names of parameters.}
- \item{x}{The \code{mif} object.}
- \item{y, recursive}{Ignored.}
- \item{z}{A \code{mif} object or list of \code{mif} objects.}
- \item{transform}{
- optional logical;
- should the parameter transformations be applied?
- See \code{\link[=coef-pomp]{coef}} for details.
- }
- \item{\dots}{
- Further arguments (either ignored or passed to underlying functions).
- }
-}
-\section{Methods}{
- \describe{
- \item{conv.rec}{
- \code{conv.rec(object, pars = NULL)} returns the columns of the convergence-record matrix corresponding to the names in \code{pars}.
- By default, all rows are returned.
- }
- \item{logLik}{
- Returns the value in the \code{loglik} slot.
- }
- \item{c}{
- Concatenates \code{mif} objects into an \code{mifList}.
- }
- \item{plot}{
- Plots a series of diagnostic plots.
- }
- \item{compare.mif}{
- Deprecated: use \code{plot} instead.
- }
- }
-}
-\author{Aaron A. King \email{kingaa at umich dot edu}}
-\seealso{\code{\link{mif}}, \code{\link{pomp}}, \code{\link{pfilter}}}
-\keyword{models}
-\keyword{ts}
Modified: pkg/pomp/man/mif.Rd
===================================================================
--- pkg/pomp/man/mif.Rd 2015-02-27 02:57:40 UTC (rev 1106)
+++ pkg/pomp/man/mif.Rd 2015-02-27 02:57:51 UTC (rev 1107)
@@ -1,4 +1,5 @@
-\name{mif}
+\name{Iterated filtering}
+\title{Maximum likelihood by iterated filtering}
\docType{methods}
\alias{mif}
\alias{mif,mif-method}
@@ -11,12 +12,31 @@
\alias{continue,mif-method}
\alias{continue-mif}
\alias{mif-class}
-\title{Iterated filtering}
+\alias{mif-methods}
+\alias{logLik,mif-method}
+\alias{logLik-mif}
+\alias{conv.rec}
+\alias{conv.rec,mif-method}
+\alias{conv.rec-mif}
+\alias{conv.rec,mifList-method}
+\alias{conv.rec-mifList}
+\alias{plot-mif}
+\alias{plot,mif-method}
+\alias{plot-mifList}
+\alias{plot,mifList-method}
+\alias{mifList-class}
+\alias{c-mif}
+\alias{c,mif-method}
+\alias{c-mifList}
+\alias{c,mifList-method}
+\alias{[-mifList}
+\alias{[,mifList-method}
+\alias{compare.mif}
\description{
Iterated filtering algorithms for estimating the parameters of a partially-observed Markov process.
}
\usage{
-\S4method{mif}{pomp}(object, Nmif = 1, start, pars, ivps = character(0),
+\S4method{mif}{pomp}(object, Nmif = 1, start, ivps = character(0),
particles, rw.sd, Np, ic.lag, var.factor,
cooling.type, cooling.fraction, cooling.factor,
method = c("mif","unweighted","fp","mif2"),
@@ -28,6 +48,9 @@
cooling.type, cooling.fraction,
method, tol, transform, \dots)
\S4method{continue}{mif}(object, Nmif = 1, \dots)
+\S4method{logLik}{mif}(object, \dots)
+\S4method{conv.rec}{mif}(object, pars, transform = FALSE, \dots)
+\S4method{conv.rec}{mifList}(object, \dots)
}
\arguments{
\item{object}{
@@ -40,15 +63,10 @@
named numerical vector;
the starting guess of the parameters.
}
- \item{pars}{
- optional character vector naming the ordinary parameters to be estimated.
- Every parameter named in \code{pars} must have a positive random-walk standard deviation specified in \code{rw.sd}.
- Leaving \code{pars} unspecified is equivalent to setting it equal to the names of all parameters with a positive value of \code{rw.sd} that are not \code{ivps}.
- }
\item{ivps}{
optional character vector naming the initial-value parameters (IVPs) to be estimated.
Every parameter named in \code{ivps} must have a positive random-walk standard deviation specified in \code{rw.sd}.
- If \code{pars} is empty, i.e., only IVPs are to be estimated, see below \dQuote{"Using MIF to estimate initial-value parameters only"}.
+ If there are no non-IVP parameters with positive \code{rw.sd}, i.e., only IVPs are to be estimated, see below \dQuote{"Using \code{mif} to estimate initial-value parameters only"}.
}
\item{particles}{
Function of prototype \code{particles(Np,center,sd,...)} which sets up the starting particle matrix by drawing a sample of size \code{Np} from the starting particle distribution centered at \code{center} and of width \code{sd}.
@@ -81,28 +99,32 @@
The \code{mif} update for initial-value parameters consists of replacing them by their filtering mean at time \code{times[ic.lag]}, where \code{times=time(object)}.
It makes no sense to set \code{ic.lag>length(times)};
if it is so set, \code{ic.lag} is set to \code{length(times)} with a warning.
+
For \code{method="mif2"}, the default is \code{ic.lag=length(times)}.
}
\item{var.factor}{
a positive number;
the scaling coefficient relating the width of the starting particle distribution to \code{rw.sd}.
- In particular, the width of the distribution of particles at the start of the first MIF iteration will be \code{random.walk.sd*var.factor}.
+ In particular, the width of the distribution of particles at the start of the first \code{mif} iteration will be \code{random.walk.sd*var.factor}.
}
\item{cooling.type, cooling.fraction, cooling.factor}{
specifications for the cooling schedule, i.e., the manner in which the intensity of the parameter perturbations is reduced with successive filtering iterations.
\code{cooling.type} specifies the nature of the cooling schedule.
- When \code{cooling.type="geometric"}, on the n-th MIF iteration, the relative perturbation intensity is \code{cooling.fraction^(n/50)}.
- When \code{cooling.type="hyperbolic"}, on the n-th MIF iteration, the relative perturbation intensity is \code{(s+1)/(s+n)}, where \code{(s+1)/(s+50)=cooling.fraction}.
- \code{cooling.fraction} is the relative magnitude of the parameter perturbations after 50 MIF iterations.
+
+ When \code{cooling.type="geometric"}, on the n-th \code{mif} iteration, the relative perturbation intensity is \code{cooling.fraction^(n/50)}.
+
+ When \code{cooling.type="hyperbolic"}, on the n-th \code{mif} iteration, the relative perturbation intensity is \code{(s+1)/(s+n)}, where \code{(s+1)/(s+50)=cooling.fraction}.
+ \code{cooling.fraction} is the relative magnitude of the parameter perturbations after 50 \code{mif} iterations.
\code{cooling.factor} is now deprecated:
- to achieve the old behavior, use \code{cooling.type="geometric"} and \code{cooling.fraction=(cooling.factor)^50}.
+ to achieve the old behavior, use \code{cooling.type="geometric"} and \preformatted{cooling.fraction=(cooling.factor)^50.}
}
\item{method}{
\code{method} sets the update rule used in the algorithm.
\code{method="mif"} uses the iterated filtering update rule (Ionides 2006, 2011);
\code{method="unweighted"} updates the parameter to the unweighted average of the filtering means of the parameters at each time;
\code{method="fp"} updates the parameter to the filtering mean at the end of the time series.
-% \code{method="mif2"}
+ \code{method="mif2"} implements an incomplete version of the iterated Bayes map method of Ionides (2015).
+ The latter method is, by every indication, both more efficient and more stable.
}
\item{tol}{
See the description under \code{\link{pfilter}}.
@@ -120,25 +142,46 @@
\item{\dots}{
additional arguments that override the defaults.
}
+ \item{pars}{names of parameters.}
+ \item{x}{a \code{mif} object.}
}
-\section{Re-running MIF Iterations}{
- To re-run a sequence of MIF iterations, one can use the \code{mif} method on a \code{mif} object.
- By default, the same parameters used for the original MIF run are re-used (except for \code{weighted}, \code{tol}, \code{max.fail}, and \code{verbose}, the defaults of which are shown above).
+\section{Re-running \code{mif} Iterations}{
+ To re-run a sequence of \code{mif} iterations, one can use the \code{mif} method on a \code{mif} object.
+ By default, the same parameters used for the original \code{mif} run are re-used (except for \code{weighted}, \code{tol}, \code{max.fail}, and \code{verbose}, the defaults of which are shown above).
If one does specify additional arguments, these will override the defaults.
}
-\section{Continuing MIF Iterations}{
- One can resume a series of MIF iterations from where one left off using the \code{continue} method.
+\section{Continuing \code{mif} Iterations}{
+ One can resume a series of \code{mif} iterations from where one left off using the \code{continue} method.
A call to \code{mif} to perform \code{Nmif=m} iterations followed by a call to \code{continue} to perform \code{Nmif=n} iterations will produce precisely the same effect as a single call to \code{mif} to perform \code{Nmif=m+n} iterations.
By default, all the algorithmic parameters are the same as used in the original call to \code{mif}.
Additional arguments will override the defaults.
}
-\section{Using MIF to estimate initial-value parameters only}{
- One can use MIF's fixed-lag smoothing to estimate only initial value parameters (IVPs).
+\section{Using \code{mif} to estimate initial-value parameters only}{
+ One can use \code{mif}'s fixed-lag smoothing to estimate only initial value parameters (IVPs).
In this case, \code{pars} is left empty and the IVPs to be estimated are named in \code{ivps}.
- If \code{theta} is the current parameter vector, then at each MIF iteration, \code{Np} particles are drawn from a distribution centered at \code{theta} and with width proportional to \code{var.factor*rw.sd}, a particle filtering operation is performed, and \code{theta} is replaced by the filtering mean at \code{time(object)[ic.lag]}.
+ If \code{theta} is the current parameter vector, then at each \code{mif} iteration, \code{Np} particles are drawn from a distribution centered at \code{theta} and with width proportional to \code{var.factor*rw.sd}, a particle filtering operation is performed, and \code{theta} is replaced by the filtering mean at \code{time(object)[ic.lag]}.
Note the implication that, when \code{mif} is used in this way on a time series any longer than \code{ic.lag}, unnecessary work is done.
If the time series in \code{object} is longer than \code{ic.lag}, consider replacing \code{object} with \code{window(object,end=ic.lag)}.
}
+\section{Methods}{
+ Methods that can be used to manipulate, display, or extract information from a \code{mif} object:
+ \describe{
+ \item{conv.rec}{
+ \code{conv.rec(object, pars = NULL)} returns the columns of the convergence-record matrix corresponding to the names in \code{pars}.
+ By default, all rows are returned.
+ }
+ \item{logLik}{
+ Returns the value in the \code{loglik} slot.
+ NB: this is \emph{not} the same as the likelihood of the model at the MLE!
+ }
+ \item{c}{
+ Concatenates \code{mif} objects into an \code{mifList}.
+ }
+ \item{plot}{
+ Plots a series of diagnostic plots when applied to a \code{mif} or \code{mifList} object.
+ }
+ }
+}
\section{Details}{
If \code{particles} is not specified, the default behavior is to draw the particles from a multivariate normal distribution.
\strong{It is the user's responsibility to ensure that, if the optional \code{particles} argument is given, that the \code{particles} function satisfies the following conditions:}
@@ -166,13 +209,16 @@
Iterated filtering,
Annals of Statistics, 39:1776--1802, 2011.
+ E. L. Ionides, D. Nguyen, Y. Atchad{\\'e}, S. Stoev, and A. A. King.
+ Inference for dynamic and latent variable models via iterated, perturbed Bayes maps.
+ Proc. Natl. Acad. Sci. U.S.A., 112:719--724, 2015.
+
A. A. King, E. L. Ionides, M. Pascual, and M. J. Bouma,
Inapparent infections and cholera dynamics,
Nature, 454:877--880, 2008.
}
\author{Aaron A. King \email{kingaa at umich dot edu}}
\seealso{
- \code{\link{mif-methods}}, \code{\link{pomp}}, \code{\link{pfilter}}.
- See the \dQuote{intro_to_pomp} vignette for examples.
+ \code{\link{pomp}}, \code{\link{pfilter}}
}
\keyword{ts}
Modified: pkg/pomp/man/ou2.Rd
===================================================================
--- pkg/pomp/man/ou2.Rd 2015-02-27 02:57:40 UTC (rev 1106)
+++ pkg/pomp/man/ou2.Rd 2015-02-27 02:57:51 UTC (rev 1107)
@@ -12,7 +12,6 @@
The observation process is \eqn{Y(t) = (y_1(t),y_2(t))}, where \eqn{y_i(t) \sim \mathrm{normal}(x_i(t),\tau)}.
The functions \code{rprocess}, \code{dprocess}, \code{rmeasure}, \code{dmeasure}, and \code{skeleton} are implemented using compiled C code for computational speed:
see the source code for details.
- This object is demonstrated in the vignette "Advanced topics in pomp".
}
\examples{
pompExample(ou2)
@@ -23,5 +22,5 @@
pf <- pfilter(ou2,Np=1000)
logLik(pf)
}
-\seealso{\code{\link{pomp}} and the vignettes}
-\keyword{datasets}
+\seealso{\code{\link{pomp}}}
+\keyword{ts}
Deleted: pkg/pomp/man/pfilter-methods.Rd
===================================================================
--- pkg/pomp/man/pfilter-methods.Rd 2015-02-27 02:57:40 UTC (rev 1106)
+++ pkg/pomp/man/pfilter-methods.Rd 2015-02-27 02:57:51 UTC (rev 1107)
@@ -1,62 +0,0 @@
-\name{pfilter-methods}
-\alias{logLik,pfilterd.pomp-method}
-\alias{logLik-pfilterd.pomp}
-\alias{$,pfilterd.pomp-method}
-\alias{$-pfilterd.pomp}
-\alias{pred.mean}
-\alias{pred.mean,pfilterd.pomp-method}
-\alias{pred.mean-pfilterd.pomp}
-\alias{pred.var}
-\alias{pred.var,pfilterd.pomp-method}
-\alias{pred.var-pfilterd.pomp}
-\alias{filter.mean}
-\alias{filter.mean,pfilterd.pomp-method}
-\alias{filter.mean-pfilterd.pomp}
-\alias{eff.sample.size}
-\alias{eff.sample.size,pfilterd.pomp-method}
-\alias{eff.sample.size-pfilterd.pomp}
-\alias{cond.logLik}
-\alias{cond.logLik,pfilterd.pomp-method}
-\alias{cond.logLik-pfilterd.pomp}
-\alias{as,pfilterd.pomp-method}
-\alias{as.data.frame.pfilterd.pomp}
-\alias{coerce,pfilterd.pomp,data.frame-method}
-\title{Methods of the "pfilterd.pomp" class}
-\description{Methods of the "pfilterd.pomp" class.}
-\usage{
-\S4method{logLik}{pfilterd.pomp}(object, \dots)
-\S4method{pred.mean}{pfilterd.pomp}(object, pars, \dots)
-\S4method{pred.var}{pfilterd.pomp}(object, pars, \dots)
-\S4method{filter.mean}{pfilterd.pomp}(object, pars, \dots)
-\S4method{eff.sample.size}{pfilterd.pomp}(object, \dots)
-\S4method{cond.logLik}{pfilterd.pomp}(object, \dots)
-\S4method{as}{pfilterd.pomp}(object, class)
-\S4method{coerce}{pfilterd.pomp,data.frame}(from, to = "data.frame", strict = TRUE)
-\S3method{as.data.frame}{pfilterd.pomp}(x, row.names, optional, \dots)
-}
-\arguments{
- \item{object, x}{
- An object of class \code{pfilterd.pomp} or inheriting class \code{pfilterd.pomp}.
- }
- \item{pars}{Names of parameters.}
- \item{class}{
- character;
- name of the class to which \code{object} should be coerced.
- }
- \item{from, to}{
- the classes between which coercion should be performed.
- }
- \item{strict}{
- ignored.
- }
- \item{row.names, optional}{
- ignored.
- }
- \item{\dots}{
- Additional arguments unused at present.
- }
-}
-\author{Aaron A. King \email{kingaa at umich dot edu}}
-\seealso{\code{\link{pfilter}}, \link{pomp-class}}
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/pomp -r 1107
More information about the pomp-commits
mailing list