[Pomp-commits] r1025 - in pkg/pompExamples: inst/examples man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Dec 17 20:12:31 CET 2014


Author: kingaa
Date: 2014-12-17 20:12:31 +0100 (Wed, 17 Dec 2014)
New Revision: 1025

Added:
   pkg/pompExamples/man/parus.Rd
Modified:
   pkg/pompExamples/inst/examples/parus.R
   pkg/pompExamples/man/pertussis.Rd
Log:
- improve documentation

Modified: pkg/pompExamples/inst/examples/parus.R
===================================================================
--- pkg/pompExamples/inst/examples/parus.R	2014-12-17 19:12:26 UTC (rev 1024)
+++ pkg/pompExamples/inst/examples/parus.R	2014-12-17 19:12:31 UTC (rev 1025)
@@ -1,14 +1,7 @@
-#' Annual *Parus major* counts in Wytham Wood, Oxfordshire, England.
-#' 
-#' @param proc  the process model (Gompertz or Ricker are currently supported)
-#' @param meas  the measurement model
-#' (lognormal, negative binomial, and Poisson are currently supported)
-#' @references McCleery, R. & Perrins, C. (1991)
-#' Effects of predation on the numbers of Great Tits, Parus major.
-#' In: Bird Population Studies, 
-#' edited by Perrins, C.M., Lebreton, J.-D. & Hirons, G.J.M. 
-#' Oxford. Univ. Press. pp. 129--147.
-#' @author Aaron A. King \email{kingaa@@umich.edu}
+# Annual *Parus major* counts in Wytham Wood, Oxfordshire, England.
+# 
+# 'proc' specifies the process model (Gompertz or Ricker currently supported)
+# 'meas' specifies the measurement model (lognormal, negbin, or Poisson)
 
 require(pomp)
 
@@ -108,6 +101,6 @@
        )
 }
 
-parus <- parus.example(proc=proc,meas=meas)
+parus <- parus.example(proc,meas)
 
 c("parus")

Added: pkg/pompExamples/man/parus.Rd
===================================================================
--- pkg/pompExamples/man/parus.Rd	                        (rev 0)
+++ pkg/pompExamples/man/parus.Rd	2014-12-17 19:12:31 UTC (rev 1025)
@@ -0,0 +1,41 @@
+\name{parus}
+\docType{data}
+\alias{parus}
+\title{POMPs for time series of Parus major population counts from Wytham Wood}
+\description{
+  \code{pompExample(parus,proc,meas)} constructs a \code{pomp} object containing one of several population-dynamics models and abundance data from Parus major in Wytham Wood.
+
+  The model has one state variables, \eqn{N_t}, the true abundance.
+  There is one observable, \eqn{\mathrm{pop}_t}.
+}
+\section{State process}{
+  If \code{proc="Gompertz"}, the state process is the stochastic Gompertz model
+  \deqn{N_{t} = K^{1-S}\,N_{t-1}^S\,\epsilon_t,}
+  where \eqn{S=e^r} and \eqn{\epsilon_t\sim\mathrm{Lognormal}(0,\sigma)} i.i.d.
+
+  If \code{proc="Ricker"}, the state process is the stochastic Ricker model
+  \deqn{N_{t} = N_{t-1}\,\exp\left(r\,\left(1-\frac{N_{t-1}}{K}\right)\right)\,\epsilon_t,}
+  where, again, \eqn{\epsilon_t\sim\mathrm{Lognormal}(0,\sigma)} i.i.d.
+}  
+\section{Measurement process}{
+  There are three alternative measurement models.
+
+  If \code{meas="Poisson"}, the measurement process is
+  \deqn{\mathrm{pop}_{t} \sim \mathrm{Poisson}(N_t).}
+
+  If \code{meas="negbin"}, the measurement process is
+  \deqn{\mathrm{pop}_{t} \sim \mathrm{Negbin}(N_t,\theta),}
+  i.e., \eqn{\mathrm{pop}_t} has mean \eqn{N_t} and variance \eqn{N_t+\frac{N_t^2}{\theta}}.
+
+  If \code{meas="lognormal"}, the measurement process is
+  \deqn{\mathrm{pop}_{t} \sim \mathrm{Lognormal}(\log(N_t),\theta).}
+}
+\examples{
+pompExample(parus,proc="Ricker",meas="negbin")
+plot(parus)
+plot(simulate(parus))
+
+pompExample(parus,proc="Gompertz",meas="lognormal")
+plot(simulate(parus))
+}
+\keyword{models,datasets}

Modified: pkg/pompExamples/man/pertussis.Rd
===================================================================
--- pkg/pompExamples/man/pertussis.Rd	2014-12-17 19:12:26 UTC (rev 1024)
+++ pkg/pompExamples/man/pertussis.Rd	2014-12-17 19:12:31 UTC (rev 1025)
@@ -21,4 +21,4 @@
 plot(pertussis.sim("full.big"))
 }
 \seealso{the \dQuote{pertussis-model} vignette}
-\keyword{datasets}
+\keyword{models}



More information about the pomp-commits mailing list