[Pomp-commits] r1159 - pkg/pomp pkg/pomp/R pkg/pomp/inst pkg/pomp/inst/examples pkg/pomp/man pkg/pomp/src pkg/pomp/tests www/content www/vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu May 28 16:55:45 CEST 2015


Author: kingaa
Date: 2015-05-28 16:55:44 +0200 (Thu, 28 May 2015)
New Revision: 1159

Modified:
   pkg/pomp/DESCRIPTION
   pkg/pomp/R/builder.R
   pkg/pomp/R/pomp-class.R
   pkg/pomp/R/pomp-methods.R
   pkg/pomp/R/pomp.R
   pkg/pomp/inst/NEWS
   pkg/pomp/inst/NEWS.Rd
   pkg/pomp/inst/examples/bbs.R
   pkg/pomp/inst/examples/blowflies.R
   pkg/pomp/inst/examples/dacca.R
   pkg/pomp/inst/examples/euler.sir.R
   pkg/pomp/inst/examples/gillespie.sir.R
   pkg/pomp/inst/examples/gompertz.R
   pkg/pomp/inst/examples/ricker.R
   pkg/pomp/man/builder.Rd
   pkg/pomp/man/pomp-methods.Rd
   pkg/pomp/man/pomp.Rd
   pkg/pomp/src/partrans.c
   pkg/pomp/tests/getting_started.R
   pkg/pomp/tests/getting_started.Rout.save
   pkg/pomp/tests/partrans.R
   pkg/pomp/tests/partrans.Rout.save
   pkg/pomp/tests/rw2.Rout.save
   pkg/pomp/tests/sir.Rout.save
   www/content/NEWS.html
   www/vignettes/getting_started.R
   www/vignettes/getting_started.Rmd
   www/vignettes/pomp.pdf
   www/vignettes/pompjss.R
   www/vignettes/pompjss.Rnw
   www/vignettes/pompjss.pdf
Log:
- the unfortunately named 'pomp' arguments 'parameter.inv.transform' and 'parameter.transform' have been deprecated in favor of the more mnemonic 'toEstimationScale' and 'fromEstimationScale'

Modified: pkg/pomp/DESCRIPTION
===================================================================
--- pkg/pomp/DESCRIPTION	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/DESCRIPTION	2015-05-28 14:55:44 UTC (rev 1159)
@@ -1,8 +1,8 @@
 Package: pomp
 Type: Package
 Title: Statistical Inference for Partially Observed Markov Processes
-Version: 0.64-1
-Date: 2015-05-22
+Version: 0.65-1
+Date: 2015-05-28
 Authors at R: c(person(given=c("Aaron","A."),family="King",
 		role=c("aut","cre"),email="kingaa at umich.edu"),
 	  person(given=c("Edward","L."),family="Ionides",role=c("aut")),

Modified: pkg/pomp/R/builder.R
===================================================================
--- pkg/pomp/R/builder.R	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/R/builder.R	2015-05-28 14:55:44 UTC (rev 1159)
@@ -1,7 +1,7 @@
 pompCBuilder <- function (name = NULL, dir = NULL,
                           statenames, paramnames, covarnames, obsnames,
                           rmeasure, dmeasure, step.fn, skeleton,
-                          parameter.transform, parameter.inv.transform,
+                          fromEstimationScale, toEstimationScale,
                           rprior, dprior, globals,
                           verbose = getOption("verbose",FALSE))
 {
@@ -65,19 +65,19 @@
   registry <- c("load_stack_incr","load_stack_decr")
 
   ## parameter transformation function
-  if (!missing(parameter.transform)) {
+  if (!missing(fromEstimationScale)) {
     registry <- c(registry,"par_trans")
-    cat(file=out,render(header$parameter.transform,name=name))
-    cat(file=out,callable.decl(parameter.transform))
-    cat(file=out,parameter.transform,footer$parameter.transform)
+    cat(file=out,render(header$fromEstimationScale,name=name))
+    cat(file=out,callable.decl(fromEstimationScale))
+    cat(file=out,fromEstimationScale,footer$fromEstimationScale)
   }
 
   ## inverse parameter transformation function
-  if (!missing(parameter.inv.transform)) {
+  if (!missing(toEstimationScale)) {
     registry <- c(registry,"par_untrans")
-    cat(file=out,render(header$parameter.inv.transform,name=name))
-    cat(file=out,callable.decl(parameter.inv.transform))
-    cat(file=out,parameter.inv.transform,footer$parameter.inv.transform)
+    cat(file=out,render(header$toEstimationScale,name=name))
+    cat(file=out,callable.decl(toEstimationScale))
+    cat(file=out,toEstimationScale,footer$toEstimationScale)
   }
 
   ## rmeasure function
@@ -224,7 +224,7 @@
                          rmeasure, dmeasure, step.fn, step.fn.delta.t,
                          skeleton, skeleton.type = c("map","vectorfield"),
                          skelmap.delta.t = 1,
-                         parameter.transform, parameter.inv.transform,
+                         fromEstimationScale, toEstimationScale,
                          rprior, dprior,
                          globals, ..., save = FALSE) {
 
@@ -245,8 +245,8 @@
   if (missing(statenames)) stop(sQuote("statenames")," must be supplied");
   if (missing(paramnames)) stop(sQuote("paramnames")," must be supplied");
 
-  mpt <- missing(parameter.transform)
-  mpit <- missing(parameter.inv.transform)
+  mpt <- missing(fromEstimationScale)
+  mpit <- missing(toEstimationScale)
   if (xor(mpt,mpit))
     stop("if you supply one transformation function, you must supply its inverse")
 
@@ -260,8 +260,8 @@
                dmeasure=dmeasure,
                step.fn=step.fn,
                skeleton=skeleton,
-               parameter.transform=parameter.transform,
-               parameter.inv.transform=parameter.inv.transform,
+               fromEstimationScale=fromEstimationScale,
+               toEstimationScale=toEstimationScale,
                rprior=rprior,
                dprior=dprior,
                globals=globals,
@@ -284,8 +284,8 @@
        skeleton=render(fnames$skeleton,name=name),
        skeleton.type=skeleton.type,
        skelmap.delta.t=skelmap.delta.t,
-       parameter.transform=render(fnames$parameter.transform,name=name),
-       parameter.inv.transform=render(fnames$parameter.inv.transform,name=name),
+       fromEstimationScale=render(fnames$fromEstimationScale,name=name),
+       toEstimationScale=render(fnames$toEstimationScale,name=name),
        rprior=render(fnames$rprior,name=name),
        dprior=render(fnames$dprior,name=name),
        PACKAGE=name,
@@ -316,8 +316,8 @@
                dmeasure= "\nvoid __pomp_dmeasure (double *__lik, const double *__y, const double *__x, const double *__p, int give_log, const int *__obsindex, const int *__stateindex, const int *__parindex, const int *__covindex, int __ncovars, const double *__covars, double t)\n{\n",
                step.fn="\nvoid __pomp_stepfn (double *__x, const double *__p, const int *__stateindex, const int *__parindex, const int *__covindex, int __covdim, const double *__covars, double t, double dt)\n{\n",
                skeleton="\nvoid __pomp_skelfn (double *__f, const double *__x, const double *__p, const int *__stateindex, const int *__parindex, const int *__covindex, int __ncovars, const double *__covars, double t)\n{\n",
-               parameter.transform="\nvoid __pomp_par_trans (double *__pt, const double *__p, const int *__parindex)\n{\n",
-               parameter.inv.transform="\nvoid __pomp_par_untrans (double *__pt, const double *__p, const int *__parindex)\n{\n",
+               fromEstimationScale="\nvoid __pomp_par_trans (double *__pt, const double *__p, const int *__parindex)\n{\n",
+               toEstimationScale="\nvoid __pomp_par_untrans (double *__pt, const double *__p, const int *__parindex)\n{\n",
                rprior="\nvoid __pomp_rprior (double *__p, const int *__parindex)\n{\n",
                dprior="\nvoid __pomp_dprior (double *__lik, const double *__p, int give_log, const int *__parindex)\n{\n"
                )
@@ -327,8 +327,8 @@
                dmeasure= "__pomp_dmeasure",
                step.fn="__pomp_stepfn",
                skeleton="__pomp_skelfn",
-               parameter.transform="__pomp_par_trans",
-               parameter.inv.transform="__pomp_par_untrans",
+               fromEstimationScale="__pomp_par_trans",
+               toEstimationScale="__pomp_par_untrans",
                rprior="__pomp_rprior",
                dprior="__pomp_dprior"
                )
@@ -347,8 +347,8 @@
                dmeasure="\n}\n\n",
                step.fn="\n}\n\n",
                skeleton="\n}\n\n",
-               parameter.transform="\n}\n\n",
-               parameter.inv.transform="\n}\n\n",
+               fromEstimationScale="\n}\n\n",
+               toEstimationScale="\n}\n\n",
                rprior="\n}\n\n",
                dprior="\n}\n\n",
                globals="\n",

Modified: pkg/pomp/R/pomp-class.R
===================================================================
--- pkg/pomp/R/pomp-class.R	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/R/pomp-class.R	2015-05-28 14:55:44 UTC (rev 1159)
@@ -32,8 +32,8 @@
            tcovar = 'numeric',
            zeronames = 'character',
            has.trans = 'logical',
-           par.trans = 'pomp.fun',
-           par.untrans = 'pomp.fun',
+           from.trans = 'pomp.fun',
+           to.trans = 'pomp.fun',
            solibfile = 'list',
            userdata = 'list'
            ),
@@ -57,8 +57,8 @@
            tcovar=numeric(0),
            zeronames=character(0),
            has.trans=FALSE,
-           par.trans=pomp.fun(),
-           par.untrans=pomp.fun(),
+           from.trans=pomp.fun(),
+           to.trans=pomp.fun(),
            solibfile=list(),
            userdata=list()
            ),

Modified: pkg/pomp/R/pomp-methods.R
===================================================================
--- pkg/pomp/R/pomp-methods.R	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/R/pomp-methods.R	2015-05-28 14:55:44 UTC (rev 1159)
@@ -25,18 +25,20 @@
 as.data.frame.pomp <- function (x, row.names, optional, ...) as(x,"data.frame")
 
 ## parameter transformations
-partrans.internal <- function (object, params, dir = c("forward","inverse"),
+partrans.internal <- function (object, params,
+                               dir = c("fromEstimationScale","toEstimationScale",
+                                 "forward","inverse"),
                                .getnativesymbolinfo = TRUE, ...) {
   if (!object at has.trans) return(params)
   pompLoad(object)
-  dir <- switch(match.arg(dir),forward=1L,inverse=-1L)
+  dir <- switch(match.arg(dir),fromEstimationScale=1L,toEstimationScale=-1L,forward=1L,inverse=-1L)
   rv <- .Call(do_partrans,object,params,dir,.getnativesymbolinfo)
   pompUnload(object)
   rv
 }
 
 setMethod("partrans","pomp",
-          function (object, params, dir = c("forward","inverse"), ...) 
+          function (object, params, dir = c("fromEstimationScale","toEstimationScale", "forward","inverse"),...)
           partrans.internal(object=object,params=params,dir=dir,...)
           )
 
@@ -168,7 +170,7 @@
           function (object, pars, transform = FALSE, ...) {
             if (length(object at params)>0) {
               if (transform) 
-                params <- partrans(object,params=object at params,dir="inverse")
+                params <- partrans(object,params=object at params,dir="toEstimationScale")
               else
                 params <- object at params
               if (missing(pars))
@@ -198,7 +200,7 @@
             if (missing(pars)) {          ## replace the whole params slot with 'value'
               if (length(value)>0) {
                 if (transform) 
-                  value <- partrans(object,params=value,dir="forward")
+                  value <- partrans(object,params=value,dir="fromEstimationScale")
                 pars <- names(value)
                 if (is.null(pars)) {
                   if (transform)
@@ -220,7 +222,7 @@
                 names(val) <- pars
                 val[] <- value
                 if (transform)
-                  value <- partrans(object,params=val,dir="forward")
+                  value <- partrans(object,params=val,dir="fromEstimationScale")
                 object at params <- value
               } else { ## pre-existing params slot
                 params <- coef(object,transform=transform)
@@ -240,7 +242,7 @@
                 }
                 params[pars] <- val
                 if (transform)
-                  params <- partrans(object,params=params,dir="forward")
+                  params <- partrans(object,params=params,dir="fromEstimationScale")
                 object at params <- params
               }
             }
@@ -296,10 +298,10 @@
             }
             cat("initializer = \n")
             show(object at initializer)
-            cat("parameter transform function = \n")
-            show(object at par.trans)
-            cat("parameter inverse transform function = \n")
-            show(object at par.untrans)
+            cat("parameter transformation (to estimation scale) = \n")
+            show(object at to.trans)
+            cat("parameter transformation (from estimation scale) = \n")
+            show(object at from.trans)
             if (length(coef(object))>0) {
               cat("parameter(s):\n")
               print(coef(object))

Modified: pkg/pomp/R/pomp.R
===================================================================
--- pkg/pomp/R/pomp.R	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/R/pomp.R	2015-05-28 14:55:44 UTC (rev 1159)
@@ -8,7 +8,8 @@
                               params, covar, tcovar,
                               obsnames, statenames, paramnames, covarnames,
                               zeronames, PACKAGE,
-                              parameter.transform, parameter.inv.transform,
+                              fromEstimationScale, toEstimationScale,
+                              parameter.transform = NULL, parameter.inv.transform = NULL,
                               globals, userdata, ...,
                               .solibfile, .filename, .filedir,
                               verbose = getOption("verbose",FALSE)) {
@@ -39,9 +40,39 @@
   if (missing(dmeasure)) dmeasure <- NULL
   if (missing(rprior)) rprior <- NULL
   if (missing(dprior)) dprior <- NULL
-  if (missing(parameter.transform)) parameter.transform <- NULL
-  if (missing(parameter.inv.transform)) parameter.inv.transform <- NULL
+  if (missing(fromEstimationScale)) fromEstimationScale <- NULL
+  if (missing(toEstimationScale)) toEstimationScale <- NULL
   
+  ## deal with deprecated arguments
+  if (!is.null(parameter.transform)) {
+    warning("the ",sQuote("parameter.transform")," argument of ",
+            sQuote("pomp")," is deprecated, ",
+            "and will be removed in a future release.\n",
+            "Use ",sQuote("fromEstimationScale")," instead.",call.=FALSE)
+    if (!is.null(fromEstimationScale) && !is(fromEstimationScale,"pomp.fun")) {
+      warning("both ",sQuote("fromEstimationScale")," and ",
+              sQuote("parameter.transform")," have been specified in a call to ",
+              sQuote("pomp"),".\n",
+              "The latter will be ignored.",call.=FALSE)
+    } else {
+      fromEstimationScale <- parameter.transform
+    }
+  }
+  if (!is.null(parameter.inv.transform)) {
+    warning("the ",sQuote("parameter.inv.transform")," argument of ",
+            sQuote("pomp")," is deprecated, ",
+            "and will be removed in a future release.\n",
+            "Use ",sQuote("toEstimationScale")," instead.",call.=FALSE)
+    if (!is.null(toEstimationScale) && !is(toEstimationScale,"pomp.fun")) {
+      warning("both ",sQuote("toEstimationScale")," and ",
+              sQuote("parameter.inv.transform")," have been specified in a call to ",
+              sQuote("pomp"),".\n",
+              "The latter will be ignored.",call.=FALSE)
+    } else {
+      toEstimationScale <- parameter.inv.transform
+    }
+  }
+
   ## defaults for names of states, parameters, and accumulator variables
   if (missing(statenames)) statenames <- character(0)
   if (missing(paramnames)) paramnames <- character(0)
@@ -60,7 +91,7 @@
   storage.mode(data) <- 'double'
   if (missing(obsnames) || length(obsnames)==0) obsnames <- rownames(data)
   obsnames <- as.character(obsnames)
-    
+  
   ## check times
   if (!is.numeric(times) || !all(diff(times)>0))
     stop("pomp error: ",sQuote("times")," must be an increasing numeric vector")
@@ -132,10 +163,10 @@
     snips <- c(snips,rprior=rprior at text)
   if (is(dprior,"Csnippet"))
     snips <- c(snips,dprior=dprior at text)
-  if (is(parameter.transform,"Csnippet"))
-    snips <- c(snips,parameter.transform=parameter.transform at text)
-  if (is(parameter.inv.transform,"Csnippet"))
-    snips <- c(snips,parameter.inv.transform=parameter.inv.transform at text)
+  if (is(fromEstimationScale,"Csnippet"))
+    snips <- c(snips,fromEstimationScale=fromEstimationScale at text)
+  if (is(toEstimationScale,"Csnippet"))
+    snips <- c(snips,toEstimationScale=toEstimationScale at text)
   if (length(snips)>0) {
     libname <- try(
                    do.call(
@@ -288,44 +319,44 @@
   }
   
   ## handle parameter transformations
-  mpt <- is.null(parameter.transform)
-  mpit <- is.null(parameter.inv.transform)
+  mpt <- is.null(fromEstimationScale)
+  mpit <- is.null(toEstimationScale)
   if (xor(mpt,mpit)) {
-    stop("if one of ",sQuote("parameter.transform"),", ",
-         sQuote("parameter.inv.transform"),
+    stop("if one of ",sQuote("fromEstimationScale"),", ",
+         sQuote("toEstimationScale"),
          " is supplied, then so must the other")
   }
   has.trans <- !mpt
   if (has.trans) {
-    par.trans <- pomp.fun(
-                          f=parameter.transform,
-                          PACKAGE=PACKAGE,
-                          proto=quote(par.trans(params,...)),
-                          slotname="parameter.transform",
-                          libname=libname,
-                          statenames=statenames,
-                          paramnames=paramnames,
-                          obsnames=obsnames,
-                          covarnames=covarnames
-                          )
-    par.untrans <- pomp.fun(
-                            f=parameter.inv.transform,
-                            PACKAGE=PACKAGE,
-                            proto=quote(par.untrans(params,...)),
-                            slotname="parameter.inv.transform",
-                            libname=libname,
-                            statenames=statenames,
-                            paramnames=paramnames,
-                            obsnames=obsnames,
-                            covarnames=covarnames
-                            )
+    from.trans <- pomp.fun(
+                           f=fromEstimationScale,
+                           PACKAGE=PACKAGE,
+                           proto=quote(from.trans(params,...)),
+                           slotname="fromEstimationScale",
+                           libname=libname,
+                           statenames=statenames,
+                           paramnames=paramnames,
+                           obsnames=obsnames,
+                           covarnames=covarnames
+                           )
+    to.trans <- pomp.fun(
+                         f=toEstimationScale,
+                         PACKAGE=PACKAGE,
+                         proto=quote(to.trans(params,...)),
+                         slotname="toEstimationScale",
+                         libname=libname,
+                         statenames=statenames,
+                         paramnames=paramnames,
+                         obsnames=obsnames,
+                         covarnames=covarnames
+                         )
   } else {
-    par.trans <- pomp.fun()
-    par.untrans <- pomp.fun()
+    from.trans <- pomp.fun()
+    to.trans <- pomp.fun()
   }
   if (has.trans &&
-      par.trans at mode==pompfunmode$undef &&
-      par.untrans at mode==pompfunmode$undef
+      from.trans at mode==pompfunmode$undef &&
+      to.trans at mode==pompfunmode$undef
       ) has.trans <- FALSE
 
   if (nrow(covar)>0) {
@@ -381,8 +412,8 @@
       tcovar = tcovar,
       zeronames = zeronames,
       has.trans = has.trans,
-      par.trans = par.trans,
-      par.untrans = par.untrans,
+      from.trans = from.trans,
+      to.trans = to.trans,
       solibfile = .solibfile,
       userdata = userdata
       )
@@ -477,7 +508,7 @@
             initializer, rprior, dprior,
             params, covar, tcovar,
             obsnames, statenames, paramnames, covarnames, zeronames,
-            PACKAGE, parameter.transform, parameter.inv.transform,
+            PACKAGE, fromEstimationScale, toEstimationScale,
             globals) {
             
             data <- t(sapply(data,as.numeric))
@@ -519,8 +550,8 @@
                              covarnames=covarnames,
                              zeronames=zeronames,
                              PACKAGE=PACKAGE,
-                             parameter.transform=parameter.transform,
-                             parameter.inv.transform=parameter.inv.transform,
+                             fromEstimationScale=fromEstimationScale,
+                             toEstimationScale=toEstimationScale,
                              globals=globals,
                              ...
                              )
@@ -536,7 +567,7 @@
             skelmap.delta.t = 1,
             initializer, rprior, dprior, params, covar, tcovar,
             obsnames, statenames, paramnames, covarnames, zeronames,
-            PACKAGE, parameter.transform, parameter.inv.transform,
+            PACKAGE, fromEstimationScale, toEstimationScale,
             globals) {
             
             pomp.constructor(
@@ -563,8 +594,8 @@
                              covarnames=covarnames,
                              zeronames=zeronames,
                              PACKAGE=PACKAGE,
-                             parameter.transform=parameter.transform,
-                             parameter.inv.transform=parameter.inv.transform,
+                             fromEstimationScale=fromEstimationScale,
+                             toEstimationScale=toEstimationScale,
                              globals=globals,
                              ...
                              )
@@ -581,7 +612,7 @@
                     skelmap.delta.t = 1,
                     initializer, rprior, dprior, params, covar, tcovar,
                     obsnames, statenames, paramnames, covarnames, zeronames,
-                    PACKAGE, parameter.transform, parameter.inv.transform,
+                    PACKAGE, fromEstimationScale, toEstimationScale,
                     globals) {
 
             pomp.constructor(
@@ -608,8 +639,8 @@
                              covarnames=covarnames,
                              zeronames=zeronames,
                              PACKAGE=PACKAGE,
-                             parameter.transform=parameter.transform,
-                             parameter.inv.transform=parameter.inv.transform,
+                             fromEstimationScale=fromEstimationScale,
+                             toEstimationScale=toEstimationScale,
                              globals=globals,
                              ...
                              )
@@ -624,7 +655,7 @@
             skeleton, skeleton.type, skelmap.delta.t,
             initializer, rprior, dprior, params, covar, tcovar,
             obsnames, statenames, paramnames, covarnames, zeronames,
-            PACKAGE, parameter.transform, parameter.inv.transform,
+            PACKAGE, fromEstimationScale, toEstimationScale,
             globals) {
             
             if (missing(times)) times <- data at times
@@ -660,23 +691,23 @@
             if (missing(skeleton.type)) skeleton.type <- data at skeleton.type
             if (missing(skeleton)) skeleton <- data at skeleton
             if (missing(skelmap.delta.t)) skelmap.delta.t <- data at skelmap.delta.t
-            if (missing(parameter.transform)) {
-              if (missing(parameter.inv.transform)) {
-                par.trans <- data at par.trans
-                par.untrans <- data at par.untrans
+            if (missing(fromEstimationScale)) {
+              if (missing(toEstimationScale)) {
+                from.trans <- data at from.trans
+                to.trans <- data at to.trans
               } else {
-                stop("pomp error: if ",sQuote("parameter.inv.transform"),
+                stop("pomp error: if ",sQuote("toEstimationScale"),
                      " is supplied, then " ,
-                     sQuote("parameter.transform")," must also be supplied")
+                     sQuote("fromEstimationScale")," must also be supplied")
               }
             } else {
-              if (missing(parameter.inv.transform)) {
-                stop("pomp error: if ",sQuote("parameter.transform"),
+              if (missing(toEstimationScale)) {
+                stop("pomp error: if ",sQuote("fromEstimationScale"),
                      " is supplied, then " ,
-                     sQuote("parameter.inv.transform")," must also be supplied")
+                     sQuote("toEstimationScale")," must also be supplied")
               } else {
-                par.trans <- parameter.transform
-                par.untrans <- parameter.inv.transform
+                from.trans <- fromEstimationScale
+                to.trans <- toEstimationScale
               }
             }
 
@@ -708,8 +739,8 @@
                              covarnames=covarnames,
                              zeronames=zeronames,
                              PACKAGE=PACKAGE,
-                             parameter.transform=par.trans,
-                             parameter.inv.transform=par.untrans,
+                             fromEstimationScale=from.trans,
+                             toEstimationScale=to.trans,
                              params=params,
                              globals=globals,
                              .solibfile=data at solibfile,

Modified: pkg/pomp/inst/NEWS
===================================================================
--- pkg/pomp/inst/NEWS	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/inst/NEWS	2015-05-28 14:55:44 UTC (rev 1159)
@@ -1,5 +1,14 @@
 _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 _0._6_5-_1:
+
+        • The unfortunately named ‘pomp’ arguments
+          ‘parameter.transform’ and ‘parameter.inv.transform’ have been
+          deprecated in favor of the more mnemonic ‘toEstimationScale’
+          and ‘fromEstimationScale’.  Using the old arguments will
+          result in the same behavior as previously, but a warning will
+          be generated.
+
 _C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._6_4-_1:
 
         • The ‘mif’ option ‘cooling.fraction’ has been replaced by the

Modified: pkg/pomp/inst/NEWS.Rd
===================================================================
--- pkg/pomp/inst/NEWS.Rd	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/inst/NEWS.Rd	2015-05-28 14:55:44 UTC (rev 1159)
@@ -1,5 +1,11 @@
 \name{NEWS}
 \title{News for package `pomp'}
+\section{Changes in \pkg{pomp} version 0.65-1}{
+  \itemize{
+    \item The unfortunately named \code{pomp} arguments \code{parameter.transform} and \code{parameter.inv.transform} have been deprecated in favor of the more mnemonic \code{toEstimationScale} and \code{fromEstimationScale}.
+    Using the old arguments will result in the same behavior as previously, but a warning will be generated.
+  }
+}
 \section{Changes in \pkg{pomp} version 0.64-1}{
   \itemize{
     \item The \code{mif} option \code{cooling.fraction} has been replaced by the more descriptive \code{cooling.fraction.50}.

Modified: pkg/pomp/inst/examples/bbs.R
===================================================================
--- pkg/pomp/inst/examples/bbs.R	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/inst/examples/bbs.R	2015-05-28 14:55:44 UTC (rev 1159)
@@ -57,12 +57,12 @@
        "S.0","I.0","R.0"
        ),
      logitvar="rho",
-     parameter.inv.transform=function (params, logvar, logitvar, ...) {
+     toEstimationScale=function (params, logvar, logitvar, ...) {
        params[logvar] <- log(params[logvar])
        params[logitvar] <- qlogis(params[logitvar])
        params
      },
-     parameter.transform=function (params, logvar, logitvar, ...) {
+     fromEstimationScale=function (params, logvar, logitvar, ...) {
        params[logvar] <- exp(params[logvar])
        params[logitvar] <- plogis(params[logitvar])
        params

Modified: pkg/pomp/inst/examples/blowflies.R
===================================================================
--- pkg/pomp/inst/examples/blowflies.R	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/inst/examples/blowflies.R	2015-05-28 14:55:44 UTC (rev 1159)
@@ -892,10 +892,10 @@
        approx(x=day,y=y,xout=seq(from=0,to=14,by=1),rule=2)$y
        ),
 #     y.init=c(948, 948, 942, 930, 911, 885, 858, 833.7, 801, 748.3, 676, 589.8, 504, 434.9, 397),
-     parameter.inv.transform=function(params,...) {
+     toEstimationScale=function(params,...) {
        log(params)
      },
-     parameter.transform=function(params,...) {
+     fromEstimationScale=function(params,...) {
        exp(params)
      },
      initializer=function (params, t0, y.init, ...) {

Modified: pkg/pomp/inst/examples/dacca.R
===================================================================
--- pkg/pomp/inst/examples/dacca.R	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/inst/examples/dacca.R	2015-05-28 14:55:44 UTC (rev 1159)
@@ -128,8 +128,8 @@
      all.state.names=c("S","I","Rs",paste("R",1:nrstage,sep=''),"M","W","count"),
      comp.names=c("S","I","Rs",paste("R",1:nrstage,sep='')),
      comp.ic.names=c("S.0","I.0","Rs.0",paste("R",1:nrstage,".0",sep='')),
-     parameter.transform="_cholmodel_trans",
-     parameter.inv.transform="_cholmodel_untrans",
+     fromEstimationScale="_cholmodel_trans",
+     toEstimationScale="_cholmodel_untrans",
      initializer = function (params, t0, covars, nrstage, comp.ic.names, comp.names, all.state.names, ...) {
        states <- numeric(length(all.state.names))
        names(states) <- all.state.names

Modified: pkg/pomp/inst/examples/euler.sir.R
===================================================================
--- pkg/pomp/inst/examples/euler.sir.R	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/inst/examples/euler.sir.R	2015-05-28 14:55:44 UTC (rev 1159)
@@ -243,8 +243,8 @@
      zeronames=c("cases"),
      comp.names=c("S","I","R"),
      ic.names=c("S.0","I.0","R.0"),
-     parameter.transform="_sir_par_trans",
-     parameter.inv.transform="_sir_par_untrans",
+     fromEstimationScale="_sir_par_trans",
+     toEstimationScale="_sir_par_untrans",
      nbasis=3L,
      degree=3L,
      period=1.0,

Modified: pkg/pomp/inst/examples/gillespie.sir.R
===================================================================
--- pkg/pomp/inst/examples/gillespie.sir.R	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/inst/examples/gillespie.sir.R	2015-05-28 14:55:44 UTC (rev 1159)
@@ -570,8 +570,8 @@
      zeronames=c("cases"),
      comp.names=c("S","I","R"),
      ic.names=c("S.0","I.0","R.0"),
-     parameter.transform="_sir_par_trans",
-     parameter.inv.transform="_sir_par_untrans",
+     fromEstimationScale="_sir_par_trans",
+     toEstimationScale="_sir_par_untrans",
      nbasis=3L,
      degree=3L,
      period=1.0,

Modified: pkg/pomp/inst/examples/gompertz.R
===================================================================
--- pkg/pomp/inst/examples/gompertz.R	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/inst/examples/gompertz.R	2015-05-28 14:55:44 UTC (rev 1159)
@@ -119,10 +119,10 @@
      paramnames=c("r","K","sigma","tau"),
      statenames=c("X"),
      obsnames=c("Y"),
-     parameter.transform=function(params,...){
+     fromEstimationScale=function(params,...){
        exp(params)
      },
-     parameter.inv.transform=function(params,...){
+     toEstimationScale=function(params,...){
        log(params)
      }
      ) -> gompertz

Modified: pkg/pomp/inst/examples/ricker.R
===================================================================
--- pkg/pomp/inst/examples/ricker.R	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/inst/examples/ricker.R	2015-05-28 14:55:44 UTC (rev 1159)
@@ -69,11 +69,11 @@
      paramnames=c("r","sigma","phi"),
      statenames=c("N","e"),
      obsnames=c("y"),
-     parameter.inv.transform=function(params,...) {
+     toEstimationScale=function(params,...) {
        params[c("r","sigma","phi","N.0")] <- log(params[c("r","sigma","phi","N.0")])
        params
      },
-     parameter.transform=function(params,...) {
+     fromEstimationScale=function(params,...) {
        params[c("r","sigma","phi","N.0")] <- exp(params[c("r","sigma","phi","N.0")])
        params
      },

Modified: pkg/pomp/man/builder.Rd
===================================================================
--- pkg/pomp/man/builder.Rd	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/man/builder.Rd	2015-05-28 14:55:44 UTC (rev 1159)
@@ -12,7 +12,7 @@
             rmeasure, dmeasure, step.fn, step.fn.delta.t,
             skeleton, skeleton.type = c("map","vectorfield"),
             skelmap.delta.t = 1,
-            parameter.transform, parameter.inv.transform,
+            fromEstimationScale, toEstimationScale,
             rprior, dprior, globals, \dots, save = FALSE)
 }
 \arguments{
@@ -44,10 +44,10 @@
     As in \code{\link{pomp}}, \code{skeleton.type} indicates whether the skeleton is a map (discrete-time) or vectorfield (continuous-time).
     If the former, \code{skelmap.delta.t} is the time-step of the map.
   }
-  \item{parameter.transform, parameter.inv.transform}{
+  \item{fromEstimationScale, toEstimationScale}{
     optional C codes that implement parameter transformations.
-    \code{parameter.transform} maps parameters from the estimation scale to the natural scale;
-    \code{parameter.inv.transformation} maps them from the natural scale to the estimation scale.
+    \code{toEstimationScale} maps parameters from the model scale to the estimation scale.
+    \code{fromEstimationScale} maps them from the estimation scale to the model scale;
   }
   \item{rprior, dprior}{
     C codes implementing the prior distribution

Modified: pkg/pomp/man/pomp-methods.Rd
===================================================================
--- pkg/pomp/man/pomp-methods.Rd	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/man/pomp-methods.Rd	2015-05-28 14:55:44 UTC (rev 1159)
@@ -47,7 +47,8 @@
 \S4method{coef}{pomp}(object, pars, transform = FALSE, \dots)
 \S4method{coef}{pomp}(object, pars, transform = FALSE, \dots) <- value
 \S4method{obs}{pomp}(object, vars, \dots)
-\S4method{partrans}{pomp}(object, params, dir = c("forward","inverse"), \dots)
+\S4method{partrans}{pomp}(object, params, dir = c("fromEstimationScale",
+      "toEstimationScale","forward","inverse"), \dots)
 \S4method{plot}{pomp}(x, y, variables, panel = lines,
       nc = NULL, yax.flip = FALSE,
       mar = c(0, 5.1, 0, if (yax.flip) 5.1 else 2.1),

Modified: pkg/pomp/man/pomp.Rd
===================================================================
--- pkg/pomp/man/pomp.Rd	2015-05-24 17:24:31 UTC (rev 1158)
+++ pkg/pomp/man/pomp.Rd	2015-05-28 14:55:44 UTC (rev 1159)
@@ -24,24 +24,24 @@
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/pomp -r 1159


More information about the pomp-commits mailing list