[Pomp-commits] r388 - pkg/tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Oct 19 15:21:24 CEST 2010


Author: kingaa
Date: 2010-10-19 15:21:24 +0200 (Tue, 19 Oct 2010)
New Revision: 388

Modified:
   pkg/tests/ou2-probe.R
   pkg/tests/ricker-probe.R
Log:

- tests to go along with new 'probe.ccf' options


Modified: pkg/tests/ou2-probe.R
===================================================================
--- pkg/tests/ou2-probe.R	2010-10-19 13:18:08 UTC (rev 387)
+++ pkg/tests/ou2-probe.R	2010-10-19 13:21:24 UTC (rev 388)
@@ -13,6 +13,7 @@
                   ),
                 nsim=500
                 )
+
 pm.po <- probe(
                ou2,
                params=c(
@@ -87,7 +88,7 @@
             po,
             probes=list(
               probe.acf(var=c("y1"),lags=c(0,1,2),type="cov"),
-              probe.ccf(vars=c("y1","y1"),lags=c(0,1,2))
+              probe.ccf(vars=c("y1","y1"),lags=c(0,1,2),type="cov")
               ),
             nsim=1000,
             seed=1066L
@@ -104,6 +105,15 @@
 plot(pb)
 summary(pb)
 
+pb <- probe(
+            po,
+            probes=probe.ccf(vars=c("y1","y2"),lags=c(-5,-3,1,4,8),type="corr"),
+            nsim=1000,
+            seed=1066L
+            )
+plot(pb)
+summary(pb)
+
 head(as(pb,"data.frame"))
 
 

Modified: pkg/tests/ricker-probe.R
===================================================================
--- pkg/tests/ricker-probe.R	2010-10-19 13:18:08 UTC (rev 387)
+++ pkg/tests/ricker-probe.R	2010-10-19 13:21:24 UTC (rev 388)
@@ -240,7 +240,7 @@
           probes=list(
             mn=probe.mean("y",transform=sqrt,trim=0.1),
             md=function(y)median(as.numeric(y)),
-            wacko=function(y) if (y[1]==69) 1 else c(1,2)
+            wacko=function(y) if (y[1]==68) 1 else c(1,2)
             ),
           nsim=100,
           seed=838775L



More information about the pomp-commits mailing list