[Pomp-commits] r1177 - pkg/pomp/tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jun 4 15:06:28 CEST 2015


Author: kingaa
Date: 2015-06-04 15:06:28 +0200 (Thu, 04 Jun 2015)
New Revision: 1177

Modified:
   pkg/pomp/tests/ou2-mif2.Rout.save
Log:
- update test

Modified: pkg/pomp/tests/ou2-mif2.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-mif2.Rout.save	2015-06-04 13:06:26 UTC (rev 1176)
+++ pkg/pomp/tests/ou2-mif2.Rout.save	2015-06-04 13:06:28 UTC (rev 1177)
@@ -60,7 +60,7 @@
 +              max.fail=100,
 +              method="mif",
 +              tol=1e-8
-+              )  
++              )
 Warning message:
 mif warning: argument 'pars' is redundant and deprecated.  It will be removed in a future release. 
 > 
@@ -98,7 +98,7 @@
 +              cooling.fraction=0.95^50,
 +              max.fail=100,
 +              method="mif"
-+              )  
++              )
 Warning message:
 mif warning: argument 'pars' is redundant and deprecated.  It will be removed in a future release. 
 > mif2b <- continue(mif2b,Nmif=50)
@@ -115,7 +115,7 @@
 +              cooling.fraction=0.05,
 +              max.fail=100,
 +              method="mif2"
-+              )  
++              )
 Warning message:
 mif warning: argument 'pars' is redundant and deprecated.  It will be removed in a future release. 
 > mif2c <- continue(mif2c,Nmif=50)
@@ -134,10 +134,42 @@
 Error in validObject(.Object) : 
   invalid class "mifList" object: error in 'c': to be combined, 'mif' objects must equal numbers of iterations
 > 
+> guess2 <- guess1 <- coef(ou2)
+> guess1[c('x1.0','x2.0','alpha.2','alpha.3')] <- 0.5*guess1[c('x1.0','x2.0','alpha.2','alpha.3')]
+> guess2[c('x1.0','x2.0','alpha.2','alpha.3')] <- 1.5*guess1[c('x1.0','x2.0','alpha.2','alpha.3')]
+> 
+> m1 <- pomp:::mif2(ou2,Nmif=100,start=guess1,Np=1000,
++                   rw.sd=pomp:::mif2.sd(
++                     x1.0=pomp:::ivphypcool(0.5,0.05),
++                     x2.0=pomp:::ivphypcool(0.5,0.05),
++                     alpha.2=pomp:::hypcool(0.1,0.05,ntimes=100),
++                     alpha.3=pomp:::hypcool(0.1,0.05,ntimes=100)))
+> 
+> m2 <- pomp:::mif2(ou2,Nmif=100,start=guess2,Np=1000,
++                   rw.sd=pomp:::mif2.sd(
++                     x1.0=pomp:::ivphypcool(0.5,0.05),
++                     x2.0=pomp:::ivphypcool(0.5,0.05),
++                     alpha.2=pomp:::hypcool(0.1,0.05,ntimes=100),
++                     alpha.3=pomp:::hypcool(0.1,0.05,ntimes=100)))
+> 
+> plot(c(m1,m2))
+> 
+> rbind(mle1=c(coef(m1),loglik=logLik(pfilter(m1,Np=1000))),
++       mle2=c(coef(m2),loglik=logLik(pfilter(m1,Np=1000))),
++       truth=c(coef(ou2),loglik=logLik(pfilter(m1,Np=1000))))
+      alpha.1    alpha.2  alpha.3 alpha.4 sigma.1 sigma.2 sigma.3 tau      x1.0
+mle1      0.8 -0.4342775 0.341218     0.9       3    -0.5       2   1 -2.445886
+mle2      0.8 -0.5406991 0.326855     0.9       3    -0.5       2   1 -4.132440
+truth     0.8 -0.5000000 0.300000     0.9       3    -0.5       2   1 -3.000000
+          x2.0    loglik
+mle1  1.897252 -481.8861
+mle2  2.828333 -485.8904
+truth 4.000000 -482.0197
+> 
 > dev.off()
 null device 
           1 
 > 
 > proc.time()
    user  system elapsed 
- 46.974   0.116  47.441 
+ 68.784   0.092  69.269 



More information about the pomp-commits mailing list