[Pomp-commits] r975 - in pkg/pomp: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jun 17 14:46:29 CEST 2014


Author: kingaa
Date: 2014-06-17 14:46:29 +0200 (Tue, 17 Jun 2014)
New Revision: 975

Modified:
   pkg/pomp/R/pmcmc.R
   pkg/pomp/man/pmcmc.Rd
Log:
- remove 'transform' option from 'pmcmc'

Modified: pkg/pomp/R/pmcmc.R
===================================================================
--- pkg/pomp/R/pmcmc.R	2014-06-13 11:37:29 UTC (rev 974)
+++ pkg/pomp/R/pmcmc.R	2014-06-17 12:46:29 UTC (rev 975)
@@ -4,7 +4,6 @@
          contains='pfilterd.pomp',
          slots=c(
            pars = 'character',
-           transform = 'logical',
            Nmcmc = 'integer',
            random.walk.sd = 'numeric',
            conv.rec = 'matrix',
@@ -16,14 +15,13 @@
                             start, pars,
                             rw.sd, Np,
                             tol, max.fail,
-                            verbose, transform,
+                            verbose,
                             .ndone = 0L,
                             .prev.pfp = NULL, .prev.log.prior = NULL,
                             .getnativesymbolinfo = TRUE) {
 
   object <- as(object,"pomp")
   gnsi <- as.logical(.getnativesymbolinfo)
-  transform <- as.logical(transform)
   .ndone <- as.integer(.ndone)
 
   if (missing(start))
@@ -154,8 +152,8 @@
                                 filter.mean=TRUE,
                                 save.states=FALSE,
                                 save.params=FALSE,
-                                verbose=verbose,
                                 .transform=FALSE,
+                                verbose=verbose,
                                 .getnativesymbolinfo=gnsi
                                 ),
                silent=FALSE
@@ -174,11 +172,7 @@
   for (n in seq_len(Nmcmc)) { # main loop
 
     theta.prop <- theta
-    if (transform)
-      theta <- partrans(object,theta.prop,dir='inverse',.getnativesymbolinfo=gnsi)
     theta.prop[pars] <- rnorm(n=length(pars),mean=theta.prop[pars],sd=rw.sd)
-    if (transform)
-      theta <- partrans(object,theta.prop,dir='forward',.getnativesymbolinfo=gnsi)
 
     ## run the particle filter on the proposed new parameter values
     pfp.prop <- try(
@@ -193,8 +187,8 @@
                                      filter.mean=TRUE,
                                      save.states=FALSE,
                                      save.params=FALSE,
-                                     verbose=verbose,
                                      .transform=FALSE,
+                                     verbose=verbose,
                                      .getnativesymbolinfo=gnsi
                                      ),
                     silent=FALSE
@@ -223,7 +217,6 @@
       "pmcmc",
       pfp,
       params=theta,
-      transform=transform,
       Nmcmc=Nmcmc,
       pars=pars,
       random.walk.sd=rw.sd,
@@ -241,10 +234,9 @@
                     start, pars, rw.sd, Np,
                     tol = 1e-17, max.fail = 0,
                     verbose = getOption("verbose"),
-                    transform = FALSE,
                     ...) {
             
-            if (missing(start)) start <- coef(object,transform=transform)
+            if (missing(start)) start <- coef(object)
             if (missing(rw.sd))
               stop("pmcmc error: ",sQuote("rw.sd")," must be specified",call.=FALSE)
             if (missing(pars)) pars <- names(rw.sd)[rw.sd>0]
@@ -261,7 +253,6 @@
                            tol=tol,
                            max.fail=max.fail,
                            verbose=verbose,
-                           transform=transform,
                            ...
                            )
           }
@@ -292,7 +283,6 @@
                     start, pars, rw.sd,
                     Np, tol, max.fail = 0,
                     verbose = getOption("verbose"),
-                    transform,
                     ...) {
 
             if (missing(Nmcmc)) Nmcmc <- object at Nmcmc
@@ -301,7 +291,6 @@
             if (missing(rw.sd)) rw.sd <- object at random.walk.sd
             if (missing(Np)) Np <- object at Np
             if (missing(tol)) tol <- object at tol
-            if (missing(transform)) transform <- object at transform
 
             pmcmc(
                   object=as(object,"pomp"),
@@ -313,7 +302,6 @@
                   tol=tol,
                   max.fail=max.fail,
                   verbose=verbose,
-                  transform=transform,
                   ...
                   )
           }

Modified: pkg/pomp/man/pmcmc.Rd
===================================================================
--- pkg/pomp/man/pmcmc.Rd	2014-06-13 11:37:29 UTC (rev 974)
+++ pkg/pomp/man/pmcmc.Rd	2014-06-17 12:46:29 UTC (rev 975)
@@ -15,13 +15,11 @@
   The Particle MCMC algorithm for estimating the parameters of a partially-observed Markov process.
 }
 \usage{
-\S4method{pmcmc}{pomp}(object, Nmcmc = 1, start, pars,
-    rw.sd, Np, tol = 1e-17, max.fail = 0,
-    verbose = getOption("verbose"), transform = FALSE, \dots)
+\S4method{pmcmc}{pomp}(object, Nmcmc = 1, start, pars, rw.sd, Np,
+    tol = 1e-17, max.fail = 0, verbose = getOption("verbose"), \dots)
 \S4method{pmcmc}{pfilterd.pomp}(object, Nmcmc = 1, Np, tol, \dots)
-\S4method{pmcmc}{pmcmc}(object, Nmcmc, start, pars,
-    rw.sd, Np, tol, max.fail = 0,
-    verbose = getOption("verbose"), transform, \dots)
+\S4method{pmcmc}{pmcmc}(object, Nmcmc, start, pars, rw.sd, Np,
+    tol, max.fail = 0, verbose = getOption("verbose"), \dots)
 \S4method{continue}{pmcmc}(object, Nmcmc = 1, \dots)
 }
 \arguments{
@@ -62,10 +60,6 @@
   \item{verbose}{
     logical; if TRUE, print progress reports.
   }
-  \item{transform}{
-    logical;
-    if \code{TRUE}, optimization is performed on the transformed scale.
-  }
   \item{\dots}{
     Additional arguments.
     These are currently ignored.



More information about the pomp-commits mailing list