[Pomp-commits] r1092 - in www: content vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Feb 23 15:05:48 CET 2015


Author: kingaa
Date: 2015-02-23 15:05:48 +0100 (Mon, 23 Feb 2015)
New Revision: 1092

Modified:
   www/content/NEWS.html
   www/vignettes/advanced_topics_in_pomp.R
   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-pfilter-guess.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-block-boot.rda
   www/vignettes/nlf-boot.rda
   www/vignettes/nlf-fit-from-truth.rda
   www/vignettes/nlf-fits.rda
   www/vignettes/nlf-lag-tests.rda
   www/vignettes/nlf-multi-short.rda
   www/vignettes/plugin-C-code.rda
   www/vignettes/plugin-R-code.rda
   www/vignettes/pomp.pdf
   www/vignettes/ricker-comparison.rda
   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:
- bring vignettes up to date

Modified: www/content/NEWS.html
===================================================================
--- www/content/NEWS.html	2015-02-22 22:49:40 UTC (rev 1091)
+++ www/content/NEWS.html	2015-02-23 14:05:48 UTC (rev 1092)
@@ -8,6 +8,82 @@
 
 <h2>News for package ‘pomp’</h2>
 
+<h3>Changes in <span class="pkg">pomp</span> version 0.60-1</h3>
+
+
+<ul>
+<li> <p><code>pmcmc</code> and <code>abc</code> can now use arbitrary symmetric proposal distributions via the <code>proposal</code> argument.
+For the moment, these are constrained to be symmetric.
+Two new functions, <code>mvn.diag.rw</code> and <code>mvn.rw</code> generate suitable proposal functions.
+The first generates a multivariate normal random-walk proposal with diagonal variance-covariance matrix; this duplicates the old behavior of both <code>abc</code> and <code>pmcmc</code>.
+The second, <code>mvn.rw</code>, corresponds to a multivariate normal random-walk proposal with arbitrary variance-covariance matrix.
+</p>
+</li>
+<li><p> In <code>pmcmc</code> and <code>abc</code>, the arguments <code>pars</code> and <code>rw.sd</code> are now unneeded and have been deprecated.
+Use of <code>rw.sd</code> will generate a warning and result in behavior equivalent to choosing <code>proposal=mvn.diag.rw(rw.sd)</code>.
+Use of <code>pars</code> will be ignored, with a warning.
+</p>
+</li>
+<li><p> In <code>nlf</code>, the <code>transform.params</code> argument is now deprecated;
+use instead the <code>transform</code> argument, as in the other inference methods.
+</p>
+</li></ul>
+
+
+
+<h3>Changes in <span class="pkg">pomp</span> version 0.59-1</h3>
+
+
+<ul>
+<li><p> A bug in <code>spect.match</code> has been fixed.
+Thanks to Karsten Hempel for finding it and contributing the fix.
+</p>
+</li></ul>
+
+
+
+<h3>Changes in <span class="pkg">pomp</span> version 0.58-1</h3>
+
+
+<ul>
+<li><p> Compiler messages are now suppressed by default when <code>Csnippet</code>s are used in construction of a <code>pomp</code> object.
+These can be enabled by setting <code>options(verbose=TRUE)</code>.
+</p>
+</li></ul>
+
+
+
+<h3>Changes in <span class="pkg">pomp</span> version 0.58-1</h3>
+
+
+<ul>
+<li><p> A <code>pomp</code> object created with <code>Csnippet</code>s or <code>pompBuilder</code> will now remember its associated shared-object file, which can be unloaded and reloaded using the new <code>pompUnload</code> and <code>pompLoad</code> methods.
+</p>
+</li></ul>
+
+
+
+<h3>Changes in <span class="pkg">pomp</span> version 0.57-1</h3>
+
+
+<ul>
+<li> <p><code>simulate</code> has a new argument, <code>include.data</code>, that when used in conjuncion with <code>as.data.frame=TRUE</code> will include the actual data in the resulting data frame along with the simulations.
+</p>
+</li></ul>
+
+
+
+<h3>Changes in <span class="pkg">pomp</span> version 0.56-1</h3>
+
+
+<ul>
+<li><p> Revamped the <code>pompExample</code> function.
+A search path for example directories is now stored in global option "pomp.examples".
+</p>
+</li></ul>
+
+
+
 <h3>Changes in <span class="pkg">pomp</span> version 0.55-1</h3>
 
 

Modified: www/vignettes/advanced_topics_in_pomp.R
===================================================================
--- www/vignettes/advanced_topics_in_pomp.R	2015-02-22 22:49:40 UTC (rev 1091)
+++ www/vignettes/advanced_topics_in_pomp.R	2015-02-23 14:05:48 UTC (rev 1092)
@@ -1,4 +1,3 @@
-
 ## ----include=FALSE-------------------------------------------------------
 opts_chunk$set(
                echo=TRUE,results='markup',
@@ -18,12 +17,10 @@
                )
 
 
-
 ## ----include=FALSE-------------------------------------------------------
   library(pomp)
   set.seed(5384959)
 
-
 ## ----pomp-builder-measmod,eval=T-----------------------------------------
 ## negative binomial measurement model
 ## E[cases|incid] = rho*incid
@@ -36,7 +33,6 @@
   lik = dnbinom_mu(cases,theta,rho*incid,give_log);
 '
 
-
 ## ----pomp-builder-stepfn,eval=T------------------------------------------
 ## SIR process model with extra-demographic stochasticity
 ## and seasonal transmission
@@ -76,7 +72,6 @@
   if (beta_sd > 0.0) W += (dW-dt)/beta_sd; // increment has mean = 0, variance = dt
 '
 
-
 ## ----pomp-builder-skel,eval=T--------------------------------------------
 skel <- '
   int nrate = 6;
@@ -112,7 +107,6 @@
   DW = 0;
 '
 
-
 ## ----pomp-builder-partrans,eval=T----------------------------------------
 ## parameter transformations
 ## note we use barycentric coordinates for the initial conditions
@@ -144,7 +138,6 @@
   to_log_barycentric(&TS_0,&S_0,3);
 "
 
-
 ## ----pomp-builder-covar,eval=T-------------------------------------------
 covartab <- data.frame(
                        time=seq(from=-1/52,to=10+1/52,by=1/26)
@@ -164,7 +157,6 @@
                   )
 
 
-
 ## ----pomp-builder,eval=F-------------------------------------------------
 ## pompBuilder(
 ##             name="SIR",
@@ -200,7 +192,6 @@
 ##             }
 ##             ) -> sir
 
-
 ## ----pomp-builder-eval,echo=F,eval=T,results='hide'----------------------
 if (Sys.getenv("POMP_BUILD_VIGNETTES")=="yes") {
   require(pomp)
@@ -239,7 +230,6 @@
             ) -> sir
 }
 
-
 ## ----sir-sim,eval=T------------------------------------------------------
 coef(sir) <- c(
                gamma=26,mu=0.02,iota=0.01,
@@ -253,11 +243,9 @@
 sir <- simulate(sir,seed=3493885L)
 traj <- trajectory(sir,hmax=1/52)
 
-
 ## ----sir-plot,fig=T,echo=F-----------------------------------------------
 plot(sir)
 
-
 ## ------------------------------------------------------------------------
 pompExample(ou2)
 true.p <- coef(ou2)
@@ -267,20 +255,17 @@
 new.p["x1.0",] <- 1:3
 init.state(ou2,params=new.p)
 
-
 ## ------------------------------------------------------------------------
 x <- rprocess(ou2,xstart=x0,times=time(ou2,t0=T),params=true.p)
 dim(x)
 x[,,1:5]
 
-
 ## ------------------------------------------------------------------------
 x <- x[,,-1,drop=F]
 y <- rmeasure(ou2,x=x,times=time(ou2),params=true.p)
 dim(y)
 y[,,1:5]
 
-
 ## ------------------------------------------------------------------------
 fp <- dprocess(ou2,x=x,times=time(ou2),params=true.p)
 dim(fp)
@@ -291,19 +276,15 @@
 dim(fm)
 fm[,36:40]
 
-
 ## ----all-examples,eval=F-------------------------------------------------
 ## pompExample()
 
-
 ## ----example-sources,eval=F----------------------------------------------
 ## list.files(system.file("examples",package="pomp"))
 
-
 ## ----demos,eval=F--------------------------------------------------------
 ## demo(package='pomp')
 
-
 ## ----plugin-R-code,echo=T,eval=T-----------------------------------------
 pompExample(ou2)
 ou2.dat <- as.data.frame(ou2)
@@ -343,7 +324,6 @@
   save(etime.Rplug,n.Rplug,file=binary.file,compress='xz')
 }
 
-
 ## ----vectorized-R-code,eval=F--------------------------------------------
 ## ou2.Rvect.rprocess <- function (xstart, times, params, ...) {
 ##   nrep <- ncol(xstart)                  # number of realizations
@@ -378,11 +358,9 @@
 ##   x
 ## }
 
-
 ## ----vectorized-R-pomp,eval=F--------------------------------------------
 ## ou2.Rvect <- pomp(ou2.Rplug,rprocess=ou2.Rvect.rprocess)
 
-
 ## ----theta,eval=F--------------------------------------------------------
 ## theta <- c(
 ##            x1.0=-3, x2.0=4,
@@ -447,15 +425,12 @@
 save(etime.Rvect,n.Rvect,file=binary.file,compress='xz')
 }
 
-
 ## ----view-ou2-source,eval=F----------------------------------------------
 ## file.show(file=system.file("examples/ou2.c",package="pomp"))
 
-
 ## ----view-pomp.h,eval=F,results='hide'-----------------------------------
 ## file.show(file=system.file("include/pomp.h",package="pomp"))
 
-
 ## ----plugin-C-code,eval=F------------------------------------------------
 ## ou2.Cplug <- pomp(
 ##                   ou2.Rplug,
@@ -498,11 +473,9 @@
 save(n.Cplug,etime.Cplug,speedup,file=binary.file,compress='xz')
 }
 
-
 ## ----eval=F,results='hide'-----------------------------------------------
 ## file.show(file=system.file("examples/ou2.c",package="pomp"))
 
-
 ## ----vectorized-C-code---------------------------------------------------
 ou2.Cvect.rprocess <- function (xstart, times, params, ...) {
   nvar <- nrow(xstart)
@@ -522,7 +495,6 @@
         )
 }
 
-
 ## ----vectorized-C-code-pomp----------------------------------------------
 ou2.Cvect <- pomp(
                   ou2.Rplug,
@@ -555,4 +527,3 @@
 save(n.Cvect,etime.Cvect,speedup,file=binary.file,compress='xz')
 }
 
-

Modified: www/vignettes/advanced_topics_in_pomp.pdf
===================================================================
(Binary files differ)

Modified: www/vignettes/bsmc-ricker-flat-prior.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/bsmc-ricker-normal-prior.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/gompertz-multi-mif.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/gompertz-performance.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/gompertz-pfilter-guess.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/gompertz-trajmatch.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/intro_to_pomp.R
===================================================================
--- www/vignettes/intro_to_pomp.R	2015-02-22 22:49:40 UTC (rev 1091)
+++ www/vignettes/intro_to_pomp.R	2015-02-23 14:05:48 UTC (rev 1092)
@@ -1,4 +1,3 @@
-
 ## ----include=FALSE-------------------------------------------------------
 opts_chunk$set(
                echo=TRUE,results='markup',
@@ -18,11 +17,9 @@
                )
 
 
-
 ## ----set-opts,echo=F,results='hide'--------------------------------------
 set.seed(5384959L)
 
-
 ## ----gompertz-proc-sim-def-----------------------------------------------
 require(pomp)
 
@@ -42,7 +39,6 @@
 }
 
 
-
 ## ----gompertz-meas-sim-def-----------------------------------------------
 gompertz.meas.sim <- function (x, t, params, ...) {
   ## unpack the parameters:
@@ -55,7 +51,6 @@
 }
 
 
-
 ## ----first-pomp-construction,eval=F--------------------------------------
 ## gompertz <- pomp(
 ##                  data=data.frame(
@@ -72,11 +67,9 @@
 ##                  )
 ## 
 
-
 ## ----set-params----------------------------------------------------------
 theta <- c(r=0.1,K=1,sigma=0.1,tau=0.1,X.0=1)
 
-
 ## ----gompertz-first-simulation,eval=F------------------------------------
 ## gompertz <- simulate(gompertz,params=theta)
 
@@ -95,11 +88,9 @@
                  )
 coef(gompertz) <- theta
 
-
 ## ----gompertz-plot,echo=F------------------------------------------------
 plot(gompertz,variables=c("Y"))
 
-
 ## ----second-pomp-construction--------------------------------------------
 gompertz.meas.dens <- function (y, x, t, params, log, ...) {
   ## unpack the parameters:
@@ -118,7 +109,6 @@
                  dmeasure=gompertz.meas.dens
                  )
 
-
 ## ----gompertz-pfilter-truth,eval=F---------------------------------------
 ## pf <- pfilter(gompertz,params=theta,Np=1000)
 ## loglik.truth <- logLik(pf)
@@ -130,15 +120,12 @@
 loglik.truth <- logLik(pf)
 loglik.truth
 
-
 ## ----gompertz-pfilter-truth-alt1,eval=F----------------------------------
 ## pf <- pfilter(gompertz,params=coef(gompertz),Np=1000)
 
-
 ## ----gompertz-pfilter-truth-alt2,eval=F----------------------------------
 ## pf <- pfilter(gompertz,Np=1000)
 
-
 ## ----gompertz-pfilter-guess,eval=F---------------------------------------
 ## theta.true <- coef(gompertz)
 ## theta.guess <- theta.true
@@ -160,7 +147,6 @@
 save(theta.true,theta.guess,loglik.guess,file=binary.file,compress='xz')
 }  
 
-
 ## ----kalman-filter-def---------------------------------------------------
 kalman.filter <- function (Y, X0, r, K, sigma, tau) {
   ntimes <- length(Y)
@@ -192,7 +178,6 @@
        )
 }
 
-
 ## ----kalman-filter-run---------------------------------------------------
 y <- obs(gompertz)
 x0 <- init.state(gompertz)
@@ -205,45 +190,36 @@
 ## ----kalman-likelihood-correction,echo=F---------------------------------
 loglik.kalman <- kf$loglik
 
-
 ## ----eval=F--------------------------------------------------------------
 ## as(gompertz,"data.frame")
 
-
 ## ----eval=F--------------------------------------------------------------
 ## obs(gompertz)
 ## obs(gompertz,"Y")
 ## time(gompertz)
 
-
 ## ----eval=F--------------------------------------------------------------
 ## time(gompertz) <- 1:10
 
-
 ## ----eval=F--------------------------------------------------------------
 ## timezero(gompertz)
 ## timezero(gompertz) <- -10
 
-
 ## ----eval=F--------------------------------------------------------------
 ## time(gompertz,t0=TRUE)
 ## time(gompertz,t0=T) <- seq(from=0,to=10,by=1)
 
-
 ## ----eval=F--------------------------------------------------------------
 ## window(gompertz,start=3,end=20)
 
-
 ## ----eval=F--------------------------------------------------------------
 ## coef(gompertz)
 ## coef(gompertz,c("sigma","tau")) <- c(1,0)
 
-
 ## ----eval=F--------------------------------------------------------------
 ## states(gompertz)
 ## states(gompertz,"X")
 
-
 ## ----snippet-gomp-pomp,results='hide'------------------------------------
 gomp2 <- pomp(
               data=subset(as(gompertz,"data.frame"),select=c(time,Y)),
@@ -269,7 +245,6 @@
               )
 
 
-
 ## ----gompertz-perform,eval=F,echo=T--------------------------------------
 ## tic <- Sys.time()
 ## sim1 <- simulate(gompertz,nsim=1000,seed=5676868L,obs=TRUE)
@@ -327,15 +302,12 @@
 save(g1sim,g2sim,g1pf,g2pf,file=binary.file,compress='xz')
 }  
 
-
 ## ----eval=F--------------------------------------------------------------
 ## demo(gompertz)
 
-
 ## ----eval=F--------------------------------------------------------------
 ## system.file("examples",package="pomp")
 
-
 ## ----loggomp-pomp-construction,eval=T------------------------------------
 gompertz <- pomp(
                  gompertz,
@@ -347,28 +319,22 @@
                  }
                  )
 
-
 ## ----eval=T--------------------------------------------------------------
 coef(gompertz) <- c(r=0.1,K=1,tau=0.1,sigma=0.1,X.0=1)
 
-
 ## ----eval=T--------------------------------------------------------------
 coef(gompertz)
 
-
 ## ----eval=T--------------------------------------------------------------
 coef(gompertz,transform=TRUE) <- c(r=log(0.1),K=0,tau=log(0.1),
                 sigma=log(0.1),X.0=0)
 
-
 ## ----eval=T--------------------------------------------------------------
 coef(gompertz,transform=TRUE)
 
-
 ## ----eval=T--------------------------------------------------------------
 coef(gompertz)
 
-
 ## ----par-trans-inverse-test,results='markup'-----------------------------
 # use parameter.inv.transform:
 theta <- coef(gompertz,transform=TRUE)  
@@ -380,7 +346,6 @@
 all.equal(coef(gompertz),coef(g2))
 
 
-
 ## ----echo=F,results='hide'-----------------------------------------------
 pompExample(gompertz)
 theta <- coef(gompertz)
@@ -418,7 +383,6 @@
 ##   list(mif=m1,ll=ll)
 ## }
 
-
 ## ----gompertz-post-mif,eval=F,echo=F-------------------------------------
 ## theta.true <- coef(gompertz)
 ## loglik.true <- replicate(n=10,logLik(pfilter(gompertz,Np=10000)))
@@ -429,7 +393,6 @@
 ## theta.mif <- theta.mif[best,]
 ## loglik.mif <- loglik.mif[best,]
 
-
 ## ----gompertz-multi-mif-eval,echo=F,results='hide'-----------------------
 binary.file <- "gompertz-multi-mif.rda"
 if (file.exists(binary.file)) {
@@ -500,7 +463,6 @@
       truth=c(signif(theta.true[estpars],3),loglik=round(loglik.true,2))
       ) -> results.table
 
-
 ## ----eval=F--------------------------------------------------------------
 ## theta.true <- coef(gompertz)
 ## loglik.true <- replicate(n=10,logLik(pfilter(gompertz,Np=10000)))
@@ -511,7 +473,6 @@
 ## theta.mif <- theta.mif[best,]
 ## loglik.mif <- loglik.mif[best,]
 
-
 ## ----multi-mif-plot,echo=F,eval=F----------------------------------------
 ## op <- par(mfrow=c(4,1),mar=c(3,3,0,0),mgp=c(2,1,0),bty='l')
 ## loglik <- sapply(mf,function(x)conv.rec(x$mif,"loglik"))
@@ -524,7 +485,6 @@
 ## matplot(log.tau,type='l',lty=1,xlab="MIF iteration",ylab=expression(log~tau))
 ## par(op)
 
-
 ## ----mif-plot,echo=F-----------------------------------------------------
 op <- par(mfrow=c(4,1),mar=c(3,3,0,0),mgp=c(2,1,0),bty='l')
 loglik <- sapply(mf,function(x)conv.rec(x$mif,"loglik"))
@@ -537,11 +497,9 @@
 matplot(log.tau,type='l',lty=1,xlab="MIF iteration",ylab=expression(log~tau))
 par(op)
 
-
 ## ----first-mif-results-table,echo=F--------------------------------------
 print(results.table)
 
-
 ## ----gompertz-skeleton-def,echo=T----------------------------------------
 gompertz.skel <- function (x, t, params, ...) {
   r <- params["r"]
@@ -552,7 +510,6 @@
   return(xnew)
 }
 
-
 ## ----gomp3-pomp----------------------------------------------------------
 gomp3 <- simulate(
                   pomp(
@@ -566,7 +523,6 @@
                   seed=88737400L
                   )
 
-
 ## ----gompertz-trajmatch-calc,eval=F--------------------------------------
 ## tm <- traj.match(
 ##                  gomp3,
@@ -595,14 +551,12 @@
   save(tm,file=binary.file,compress="xz")
 }
 
-
 ## ----trajmatch-plot,echo=F,eval=T,fig.height=4,fig.width=6---------------
 op <- par(mfrow=c(1,1),mar=c(3,3,0,0),mgp=c(2,1,0),bty='l')
 plot(time(tm),obs(tm,"Y"),xlab="time",ylab=expression(X,Y),type='o')
 lines(time(tm),states(tm,"X"),lwd=2)
 par(op)
 
-
 ## ----ricker-map-defn-----------------------------------------------------
 ricker.sim <- function (x, t, params, delta.t, ...) {
   e <- rnorm(n=1,mean=0,sd=params["sigma"]) 
@@ -615,14 +569,12 @@
            )
 }
 
-
 ## ----ricker-sim-C-def----------------------------------------------------
 ricker.sim <- Csnippet('
   e = rnorm(0,sigma);
   N = r*N*exp(-N+e);
 ')
 
-
 ## ----ricker-pomp,results='hide'------------------------------------------
 ricker <- pomp(
                data=data.frame(time=seq(0,50,by=1),y=NA),
@@ -644,11 +596,9 @@
                )
 ricker <- simulate(ricker,seed=73691676L)
 
-
 ## ----get-ricker,echo=T,eval=T,results='hide'-----------------------------
 pompExample(ricker)
 
-
 ## ----probe-list----------------------------------------------------------
 plist <- list(
               probe.marginal("y",ref=obs(ricker),transform=sqrt),
@@ -657,7 +607,6 @@
                          transform=sqrt)
               )
 
-
 ## ----first-probe,eval=F,echo=T-------------------------------------------
 ## pb.truth <- probe(ricker,probes=plist,nsim=1000,seed=1066L)
 ## guess <- c(r=20,sigma=1,phi=20,N.0=7,e.0=0)
@@ -674,14 +623,12 @@
   save(pb.truth,pb.guess,guess,file=binary.file,compress='xz')
 }
 
-
 ## ----first-probe-plot,eval=F---------------------------------------------
 ## summary(pb.truth)
 ## summary(pb.guess)
 ## plot(pb.truth)
 ## plot(pb.guess)
 
-
 ## ----ricker-probe-plot,echo=F,results='hide'-----------------------------
 binary.file <- "ricker-probe.rda"
 if (file.exists(binary.file)) {
@@ -701,7 +648,6 @@
 }
 plot(pb)
 
-
 ## ----ricker-probe-match-calc,eval=F--------------------------------------
 ## pm <- probe.match(
 ##                   pb.guess,
@@ -715,7 +661,6 @@
 ##                   )
 ## summary(pm)
 
-
 ## ----ricker-probe.match-eval,echo=F,eval=T,results='hide'----------------
 binary.file <- "ricker-probe-match.rda"
 if (file.exists(binary.file)) {
@@ -735,7 +680,6 @@
   save(pm,file=binary.file,compress="xz")
 }
 
-
 ## ----ricker-mif-calc,eval=F----------------------------------------------
 ## mf <- mif(
 ##           ricker,
@@ -752,7 +696,6 @@
 ##           )
 ## mf <- continue(mf,Nmif=500,max.fail=20)
 
-
 ## ----ricker-mif-eval,echo=F,eval=T,results='hide'------------------------
 binary.file <- "ricker-mif.rda"
 if (file.exists(binary.file)) {
@@ -775,7 +718,6 @@
   save(mf,file=binary.file,compress="xz")
 }
 
-
 ## ----ricker-comparison,eval=F,echo=T-------------------------------------
 ## pf.truth <- pfilter(ricker,Np=1000,max.fail=50,seed=1066L)
 ## pf.guess <- pfilter(ricker,params=guess,Np=1000,max.fail=50,seed=1066L)
@@ -817,18 +759,16 @@
 ## ----ricker-comparison-show----------------------------------------------
 print(res,digits=3)
 
-
 ## ----first-nlf,eval=T,results='hide'-------------------------------------
 pompExample(gompertz)
 out <- nlf(
            gompertz,
            start=c(r=1,K=2,sigma=0.5,tau=0.5,X.0=1),
-           transform.params=TRUE,
+           transform=TRUE,
            est=c("K","r"),
            lags=c(1,2)
            )
 
-
 ## ----nlf-gompertz-starts,eval=F------------------------------------------
 ## # pick 5 random starting parameter values
 ## starts <- replicate(n=5,
@@ -841,7 +781,6 @@
 ##                     simplify=FALSE
 ##                     )
 
-
 ## ----nlf-gompertz-fits,eval=F--------------------------------------------
 ## out <- list()
 ## ## Do the fitting.
@@ -851,7 +790,7 @@
 ##                   gompertz,
 ##                   start=starts[[j]],
 ##                   transform.data=log,
-##                   transform.params=TRUE,
+##                   transform=TRUE,
 ##                   est=c("K","r"),
 ##                   lags=c(1,2),
 ##                   seed=7639873L,
@@ -886,7 +825,7 @@
                     gompertz,
                     start=starts[[j]],
                     transform.data=log,
-                    transform.params=TRUE,
+                    transform=TRUE,
                     est=c("K","r"),
                     lags=c(1,2),
                     seed=7639873L,
@@ -900,16 +839,13 @@
   save(starts,out,fits,file=binary.file,compress="xz")
 }
 
-
 ## ----eval=T--------------------------------------------------------------
 fits
 
-
 ## ----nlf-my-pomp,eval=T--------------------------------------------------
 long.gomp <- simulate(gompertz,times=1:1000)
 theta <- coef(long.gomp)
 
-
 ## ----nlf-lag-test-log.r,eval=F-------------------------------------------
 ## lags <- list(1,2,c(1,2),c(2,3))
 ## r.vals <- theta["r"]*exp(seq(-0.69,0.69,length=25))
@@ -990,7 +926,6 @@
   save(theta,lags,r.vals,K.vals,fvals,fvals2,file=binary.file,compress="xz")
 }
 
-
 ## ----nlf-gompertz-plot,fig.height=4,fig.width=6,echo=F-------------------
 fvals <- scale(fvals,center=apply(fvals,2,max),scale=FALSE) 
 fvals2 <- scale(fvals2,center=apply(fvals2,2,max),scale=FALSE)
@@ -1021,7 +956,6 @@
 abline(v=theta["K"],col="blue")
 par(op)
 
-
 ## ----nlf-multi-short,eval=F----------------------------------------------
 ## nreps <- 100
 ## ndata <- 60
@@ -1066,15 +1000,13 @@
   save(lags,nreps,ndata,fvals,file=binary.file,compress="xz")
 }
 
-
 ## ----eval=T--------------------------------------------------------------
 apply(fvals,2,function(x)sd(x)/mean(x))
 
-
 ## ----nlf-fit-from-truth,eval=F-------------------------------------------
 ## true.fit <- nlf(
 ##                 gompertz,
-##                 transform.params=TRUE,
+##                 transform=TRUE,
 ##                 est=c("K","r"),
 ##                 lags=2,
 ##                 seed=7639873,
@@ -1090,7 +1022,7 @@
 } else {
   true.fit <- nlf(
                   gompertz,
-                  transform.params=TRUE,
+                  transform=TRUE,
                   est=c("K","r"),
                   lags=2,
                   seed=7639873,
@@ -1101,7 +1033,6 @@
   save(true.fit,file=binary.file,compress="xz")
 }
 
-
 ## ----echo=F--------------------------------------------------------------
 set.seed(32329L)
 
@@ -1116,7 +1047,7 @@
 ##   fit <- nlf(
 ##              gompertz,
 ##              start=coef(gompertz),
-##              transform.params=TRUE,
+##              transform=TRUE,
 ##              est=c("K","r"),
 ##              lags=lags,
 ##              seed=7639873,
@@ -1146,7 +1077,7 @@
     fit <- nlf(
                gompertz,
                start=coef(gompertz),
-               transform.params=TRUE,
+               transform=TRUE,
                est=c("K","r"),
                lags=lags,
                seed=7639873, 
@@ -1166,12 +1097,10 @@
 ## ------------------------------------------------------------------------
 apply(pars,2,sd)
 
-
 ## ----block-bootsamp,eval=F-----------------------------------------------
 ## bootsamp <- replicate(n=nreps,sample(nboot,size=floor(nboot/3),replace=TRUE))
 ## bootsamp <- rbind(bootsamp,bootsamp+1,bootsamp+2)
 
-
 ## ----nlf-block-boot,eval=F,echo=F----------------------------------------
 ## lags <- 2
 ## ndata <- length(obs(gompertz))
@@ -1186,7 +1115,7 @@
 ## for (j in seq_len(nreps)) {
 ##   fit <- nlf(
 ##              gompertz,
-##              transform.params=TRUE,
+##              transform=TRUE,
 ##              est=c("K","r"),
 ##              lags=lags,
 ##              seed=7639873L,
@@ -1201,7 +1130,6 @@
 ## }
 ## colnames(pars) <- c("r","K")
 
-
 ## ----nlf-block-boot-eval,eval=T,echo=F,results='hide'--------------------
 binary.file <- "nlf-block-boot.rda"
 if (file.exists(binary.file)) {
@@ -1220,7 +1148,7 @@
   for (j in seq_len(nreps)) {
     fit <- nlf(
                gompertz,
-               transform.params=TRUE,
+               transform=TRUE,
                est=c("K","r"),
                lags=lags,
                seed=7639873L,
@@ -1237,7 +1165,6 @@
   save(pars,file=binary.file,compress="xz")
 }
 
-
 ## ----bsmc-example-flat-prior-1,echo=T,eval=T,results='hide'--------------
 pompExample(ricker)
 
@@ -1250,7 +1177,6 @@
                }
                )
 
-
 ## ----bsmc-example-flat-prior-3,eval=F------------------------------------
 ##   fit1 <- bsmc2(ricker,Np=10000,transform=TRUE,
 ##                 est=c("r","sigma"),smooth=0.2,
@@ -1277,15 +1203,12 @@
   save(fit1,file=binary.file,compress="xz")
 }
 
-
 ## ----bsmc-example-flat-prior-coef----------------------------------------
 signif(coef(fit1),digits=2)
 
-
 ## ----bsmc-example-flat-prior-plot,fig.height=6,fig.width=6,echo=F--------
 plot(fit1,pars=c("r","sigma"),thin=5000)
 
-
 ## ----bsmc-example-normal-prior,eval=F,echo=T-----------------------------
 ## ricker <- pomp(ricker,
 ##                rprior=function (params, ...) {
@@ -1323,7 +1246,6 @@
 ## ----bsmc-example-normal-prior-show,echo=T,eval=T------------------------
 signif(coef(fit2),digits=2)
 
-
 ## ----sir-step-R----------------------------------------------------------
 require(pomp)
 
@@ -1352,7 +1274,6 @@
   x
 }
 
-
 ## ----sir-step-C----------------------------------------------------------
 sir.step <- '
   double rate[6];		// transition rates
@@ -1380,7 +1301,6 @@
 '
 
 
-
 ## ----sir-pomp-def,eval=T,echo=T,results='hide'---------------------------
 rmeas <- '
   cases = rnbinom_mu(theta,rho*incid);
@@ -1425,17 +1345,14 @@
 
 simulate(sir,seed=1914679908L) -> sir
 
-
 ## ----sir-plot,echo=F-----------------------------------------------------
 plot(sir,var=c("cases","incid","S","I"))
 
-
 ## ----seas-basis----------------------------------------------------------
 tbasis <- seq(-1,21,by=1/52)
 basis <- periodic.bspline.basis(tbasis,nbasis=3,degree=2,period=1,
                                 names="seas%d")
 
-
 ## ----complex-sir-def,echo=T,eval=T,results='hide'------------------------
 seas.sir.step <- '
   double rate[6];		// transition rates
@@ -1472,7 +1389,6 @@
   incid += trans[3];	// incidence is cumulative recoveries
 '
 
-
 ## ----other-codes,results='hide'------------------------------------------
 seas.sir.skel <- '
   double rate[6];		// transition rates
@@ -1572,7 +1488,6 @@
          ) -> complex.sir
 
 
-
 ## ----seas-basis-plot,echo=F,fig.height=4,fig.width=6---------------------
 op <- par(mar=c(5,5,1,5))
 matplot(tbasis,basis,xlim=c(0,2),type='l',lwd=2,bty='u',
@@ -1594,8 +1509,6 @@
 par(op)
 
 
-
 ## ----complex-sir-plot,echo=F---------------------------------------------
 plot(complex.sir)
 
-

Modified: www/vignettes/intro_to_pomp.Rnw
===================================================================
--- www/vignettes/intro_to_pomp.Rnw	2015-02-22 22:49:40 UTC (rev 1091)
+++ www/vignettes/intro_to_pomp.Rnw	2015-02-23 14:05:48 UTC (rev 1092)
@@ -1181,7 +1181,7 @@
 out <- nlf(
            gompertz,
            start=c(r=1,K=2,sigma=0.5,tau=0.5,X.0=1),
-           transform.params=TRUE,
+           transform=TRUE,
            est=c("K","r"),
            lags=c(1,2)
            )
@@ -1214,7 +1214,7 @@
                   gompertz,
                   start=starts[[j]],
                   transform.data=log,
-                  transform.params=TRUE,
+                  transform=TRUE,
                   est=c("K","r"),
                   lags=c(1,2),
                   seed=7639873L,
@@ -1390,7 +1390,7 @@
 <<nlf-fit-from-truth,eval=F>>=
 true.fit <- nlf(
                 gompertz,
-                transform.params=TRUE,
+                transform=TRUE,
                 est=c("K","r"),
                 lags=2,
                 seed=7639873,
@@ -1435,7 +1435,7 @@
   fit <- nlf(
              gompertz,
              start=coef(gompertz),
-             transform.params=TRUE,
+             transform=TRUE,
              est=c("K","r"),
              lags=lags,
              seed=7639873, 
@@ -1488,7 +1488,7 @@
 for (j in seq_len(nreps)) {
   fit <- nlf(
              gompertz,
-             transform.params=TRUE,
+             transform=TRUE,
              est=c("K","r"),
              lags=lags,
              seed=7639873L,

Modified: www/vignettes/intro_to_pomp.pdf
===================================================================
(Binary files differ)

Modified: www/vignettes/nlf-block-boot.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/nlf-boot.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/nlf-fit-from-truth.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/nlf-fits.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/nlf-lag-tests.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/nlf-multi-short.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/plugin-C-code.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/plugin-R-code.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/pomp.pdf
===================================================================
(Binary files differ)

Modified: www/vignettes/ricker-comparison.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/ricker-first-probe.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/ricker-mif.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/ricker-probe-match.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/ricker-probe.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/vectorized-C-code.rda
===================================================================
(Binary files differ)

Modified: www/vignettes/vectorized-R-code.rda
===================================================================
(Binary files differ)



More information about the pomp-commits mailing list