[Pomp-commits] r921 - in pkg/pomp: . inst/doc man tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 17 15:13:21 CEST 2014


Author: kingaa
Date: 2014-04-17 15:13:21 +0200 (Thu, 17 Apr 2014)
New Revision: 921

Modified:
   pkg/pomp/DESCRIPTION
   pkg/pomp/inst/doc/manual.pdf
   pkg/pomp/man/example.Rd
   pkg/pomp/man/pomp.Rd
   pkg/pomp/tests/ou2-nlf.R
   pkg/pomp/tests/ou2-nlf.Rout.save
Log:
- tweak ou2-nlf test
- fix error in pomp documentation


Modified: pkg/pomp/DESCRIPTION
===================================================================
--- pkg/pomp/DESCRIPTION	2014-04-15 18:03:43 UTC (rev 920)
+++ pkg/pomp/DESCRIPTION	2014-04-17 13:13:21 UTC (rev 921)
@@ -2,7 +2,7 @@
 Type: Package
 Title: Statistical inference for partially observed Markov processes
 Version: 0.50-1
-Date: 2014-04-15
+Date: 2014-04-17
 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/inst/doc/manual.pdf
===================================================================
(Binary files differ)

Modified: pkg/pomp/man/example.Rd
===================================================================
--- pkg/pomp/man/example.Rd	2014-04-15 18:03:43 UTC (rev 920)
+++ pkg/pomp/man/example.Rd	2014-04-17 13:13:21 UTC (rev 921)
@@ -24,6 +24,7 @@
   pompExample()
   pompExample(euler.sir)
   pompExample("gompertz")
+  file.show(system.file("include/pomp.h",package="pomp"))
 }
 \seealso{
   \code{\link{blowflies}}, \code{\link{dacca}}, \code{\link{gompertz}},

Modified: pkg/pomp/man/pomp.Rd
===================================================================
--- pkg/pomp/man/pomp.Rd	2014-04-15 18:03:43 UTC (rev 920)
+++ pkg/pomp/man/pomp.Rd	2014-04-17 13:13:21 UTC (rev 921)
@@ -69,7 +69,7 @@
     optional; the measurement model simulator.
     This can be specified in one of three ways:
     (1) as a function of prototype \code{rmeasure(x,t,params,\dots)} that makes a draw from the observation process given states \code{x}, time \code{t}, and parameters \code{params}.
-    (2) as the name of a native (compiled) routine with prototype \dQuote{pomp_measure_model_simulator} as defined in the header file \dQuote{examples/pomp.h}.
+    (2) as the name of a native (compiled) routine with prototype \dQuote{pomp_measure_model_simulator} as defined in the header file \dQuote{pomp.h}.
     In the above cases, if the measurement model depends on covariates, the optional argument \code{covars} will be filled with interpolated values at each call.
     (3) using the formula-based \code{measurement.model} facility (see below).
   }
@@ -77,7 +77,7 @@
     optional; the measurement model probability density function.
     This can be specified in one of three ways:
     (1) as a function of prototype \code{dmeasure(y,x,t,params,log,\dots)} that computes the p.d.f. of \code{y} given \code{x}, \code{t}, and \code{params}.
-    (2) as the name of a native (compiled) routine with prototype \dQuote{pomp_measure_model_density} as defined in the header file \dQuote{examples/pomp.h}.
+    (2) as the name of a native (compiled) routine with prototype \dQuote{pomp_measure_model_density} as defined in the header file \dQuote{pomp.h}.
     In the above cases, if the measurement model depends on covariates, the optional argument \code{covars} will be filled with interpolated values at each call.
     (3) using the formula-based \code{measurement.model} facility (see below).
     As might be expected, if \code{log=TRUE}, this function should return the log likelihood.

Modified: pkg/pomp/tests/ou2-nlf.R
===================================================================
--- pkg/pomp/tests/ou2-nlf.R	2014-04-15 18:03:43 UTC (rev 920)
+++ pkg/pomp/tests/ou2-nlf.R	2014-04-17 13:13:21 UTC (rev 921)
@@ -1,6 +1,6 @@
 library(pomp)
 
-set.seed(594861940L)
+set.seed(583615606L)
 
 pompExample(ou2)
 estnames=c("alpha.2","alpha.3","tau")
@@ -17,7 +17,7 @@
           trace=1,
           verbose=TRUE,
           eval.only=TRUE,
-          seed=384886L,
+          seed=426094906L,
           lql.frac = 0.025
           )
 se1 <- rep(NA,length(estnames))
@@ -34,10 +34,9 @@
           maxit=500,
           trace=1,
           verbose=TRUE,
-          seed=384886L,
+          seed=426094906L,
           lql.frac = 0.025
           )
-
 se2 <- m2$se
 
 m3 <- nlf(
@@ -51,7 +50,7 @@
           trace=1,
           verbose=TRUE,
           eval.only=TRUE,
-          seed=384886L,
+          seed=426094906L,
           lql.frac = 0.025
           )
 se3 <- rep(NA,length(estnames))
@@ -67,17 +66,20 @@
           maxit=500,
           trace=1,
           verbose=TRUE,
-          seed=384886L,
+          seed=426094906L,
           lql.frac = 0.025
           )
-
 se4 <- m4$se
 
+options(scipen=-3)
 print(
-      cbind(
-            guess=c(theta.guess[estnames],se=se3,value=m3),
-            truth=c(theta.truth[estnames],se=se1,value=m1),
-            fit.from.guess=c(m4$params[estnames],se=se4,value=m4$value),
-            fit.from.truth=c(m2$params[estnames],se=se2,value=m2$value)
-            )
+      signif(
+             cbind(
+                   guess=c(theta.guess[estnames],se=se3,value=m3),
+                   truth=c(theta.truth[estnames],se=se1,value=m1),
+                   fit.from.guess=c(m4$params[estnames],se=se4,value=m4$value),
+                   fit.from.truth=c(m2$params[estnames],se=se2,value=m2$value)
+                   ),
+             4
+             )
       )

Modified: pkg/pomp/tests/ou2-nlf.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-nlf.Rout.save	2014-04-15 18:03:43 UTC (rev 920)
+++ pkg/pomp/tests/ou2-nlf.Rout.save	2014-04-17 13:13:21 UTC (rev 921)
@@ -1,5 +1,5 @@
 
-R version 3.0.3 (2014-03-06) -- "Warm Puppy"
+R version 3.1.0 (2014-04-10) -- "Spring Dance"
 Copyright (C) 2014 The R Foundation for Statistical Computing
 Platform: x86_64-unknown-linux-gnu (64-bit)
 
@@ -21,7 +21,7 @@
 Loading required package: nloptr
 Loading required package: deSolve
 > 
-> set.seed(594861940L)
+> set.seed(583615606L)
 > 
 > pompExample(ou2)
 newly created pomp object(s):
@@ -40,12 +40,12 @@
 +           trace=1,
 +           verbose=TRUE,
 +           eval.only=TRUE,
-+           seed=384886L,
++           seed=426094906L,
 +           lql.frac = 0.025
 +           )
 > se1 <- rep(NA,length(estnames))
 > print(m1)
-[1] -555.0868
+[1] -551.8268
 > 
 > m2 <- nlf(
 +           object=ou2,
@@ -58,57 +58,65 @@
 +           maxit=500,
 +           trace=1,
 +           verbose=TRUE,
-+           seed=384886L,
++           seed=426094906L,
 +           lql.frac = 0.025
 +           )
   Nelder-Mead direct search function minimizer
-function value for initial parameters = 555.086814
-  Scaled convergence tolerance is 8.27144e-06
+function value for initial parameters = 551.826845
+  Scaled convergence tolerance is 8.22286e-06
 Stepsize computed as 0.100000
-BUILD              4 559.254725 555.086814
-HI-REDUCTION       6 556.109178 555.086814
-HI-REDUCTION       8 555.476443 554.544555
-LO-REDUCTION      10 555.105949 554.544555
-LO-REDUCTION      12 555.086814 554.519288
-LO-REDUCTION      14 554.740190 554.519288
-HI-REDUCTION      16 554.618696 554.519288
-LO-REDUCTION      18 554.548158 554.515101
-HI-REDUCTION      20 554.544555 554.508577
-HI-REDUCTION      22 554.519288 554.497436
-REFLECTION        24 554.515101 554.492388
-LO-REDUCTION      26 554.508577 554.492388
-HI-REDUCTION      28 554.497436 554.492388
-REFLECTION        30 554.494893 554.491176
-REFLECTION        32 554.494183 554.489759
-HI-REDUCTION      34 554.492388 554.489759
-REFLECTION        36 554.491176 554.488524
-HI-REDUCTION      38 554.489976 554.488524
-REFLECTION        40 554.489759 554.486675
-HI-REDUCTION      42 554.488704 554.486675
-REFLECTION        44 554.488524 554.486318
-LO-REDUCTION      46 554.487711 554.486318
-EXTENSION         48 554.486945 554.485619
-LO-REDUCTION      50 554.486675 554.485619
-LO-REDUCTION      52 554.486318 554.485607
-HI-REDUCTION      54 554.485830 554.485607
-REFLECTION        56 554.485734 554.485498
-HI-REDUCTION      58 554.485619 554.485498
-HI-REDUCTION      60 554.485607 554.485495
-LO-REDUCTION      62 554.485535 554.485466
-HI-REDUCTION      64 554.485498 554.485466
-HI-REDUCTION      66 554.485495 554.485466
-HI-REDUCTION      68 554.485479 554.485466
+BUILD              4 555.857055 551.809812
+HI-REDUCTION       6 553.587531 551.809812
+HI-REDUCTION       8 552.896950 551.547043
+LO-REDUCTION      10 551.826845 551.547043
+REFLECTION        12 551.809812 551.525614
+HI-REDUCTION      14 551.582310 551.444555
+HI-REDUCTION      16 551.547043 551.429120
+HI-REDUCTION      18 551.525614 551.417773
+HI-REDUCTION      20 551.444555 551.417773
+HI-REDUCTION      22 551.429120 551.390624
+LO-REDUCTION      24 551.419291 551.390624
+LO-REDUCTION      26 551.417773 551.384044
+LO-REDUCTION      28 551.396651 551.379480
+HI-REDUCTION      30 551.390624 551.379480
+HI-REDUCTION      32 551.384044 551.379480
+HI-REDUCTION      34 551.381372 551.379480
+HI-REDUCTION      36 551.380899 551.378810
+LO-REDUCTION      38 551.379724 551.378261
+REFLECTION        40 551.379480 551.378023
+HI-REDUCTION      42 551.378810 551.378023
+LO-REDUCTION      44 551.378261 551.377746
+HI-REDUCTION      46 551.378120 551.377589
+EXTENSION         48 551.378023 551.376695
+LO-REDUCTION      50 551.377746 551.376695
+LO-REDUCTION      52 551.377589 551.376695
+EXTENSION         54 551.377112 551.375515
+LO-REDUCTION      56 551.376869 551.375515
+LO-REDUCTION      58 551.376695 551.375515
+EXTENSION         60 551.375706 551.374028
+LO-REDUCTION      62 551.375521 551.374028
+EXTENSION         64 551.375515 551.373593
+LO-REDUCTION      66 551.374448 551.373593
+REFLECTION        68 551.374028 551.373497
+HI-REDUCTION      70 551.373639 551.373497
+LO-REDUCTION      72 551.373623 551.373486
+REFLECTION        74 551.373593 551.373446
+HI-REDUCTION      76 551.373497 551.373425
+LO-REDUCTION      78 551.373486 551.373425
+HI-REDUCTION      80 551.373446 551.373419
+HI-REDUCTION      82 551.373429 551.373411
+REFLECTION        84 551.373425 551.373407
+HI-REDUCTION      86 551.373419 551.373407
 Exiting from Nelder Mead minimizer
-    70 function evaluations used
+    88 function evaluations used
 h in NLF =  0.1 
-epsilon in NLF = 0.07715219 0.08600406 1.29893 
-Fitted param  1 -5.928762 -5.928762  up in  'nlf' 
-Fitted param  1 -5.918791  down in  'NLF' 
-Fitted param  2 -5.92007 -5.92007  up in  'nlf' 
-Fitted param  2 -5.933666  down in  'NLF' 
-Fitted param  3 -5.937785 -5.937785  up in  'nlf' 
-Fitted param  3 -5.903043  down in  'NLF' 
-> 
+epsilon in NLF = 0.07430234 0.07131381 1.121473 
+Fitted param  1 -5.893573 -5.893573  up in  'nlf' 
+Fitted param  1 -5.887746  down in  'NLF' 
+Fitted param  2 -5.888468 -5.888468  up in  'nlf' 
+Fitted param  2 -5.890894  down in  'NLF' 
+Fitted param  3 -5.901121 -5.901121  up in  'nlf' 
+Fitted param  3 -5.872183  down in  'NLF' 
 > se2 <- m2$se
 > 
 > m3 <- nlf(
@@ -122,7 +130,7 @@
 +           trace=1,
 +           verbose=TRUE,
 +           eval.only=TRUE,
-+           seed=384886L,
++           seed=426094906L,
 +           lql.frac = 0.025
 +           )
 > se3 <- rep(NA,length(estnames))
@@ -138,88 +146,93 @@
 +           maxit=500,
 +           trace=1,
 +           verbose=TRUE,
-+           seed=384886L,
++           seed=426094906L,
 +           lql.frac = 0.025
 +           )
   Nelder-Mead direct search function minimizer
-function value for initial parameters = 10330.933626
-  Scaled convergence tolerance is 0.000153943
+function value for initial parameters = 10349.712405
+  Scaled convergence tolerance is 0.000154223
 Stepsize computed as 0.150000
-BUILD              4 29742.647014 576.824636
-REFLECTION         6 10330.933626 564.186576
-EXTENSION          8 10330.933626 556.163486
-LO-REDUCTION      10 576.824636 555.749535
-LO-REDUCTION      12 564.186576 555.749535
-LO-REDUCTION      14 557.909279 555.749535
-REFLECTION        16 556.174151 555.518836
-HI-REDUCTION      18 556.163486 555.234932
-REFLECTION        20 555.749535 555.069014
-HI-REDUCTION      22 555.518836 555.069014
-LO-REDUCTION      24 555.234932 555.041059
-REFLECTION        26 555.161158 554.878667
-LO-REDUCTION      28 555.069014 554.878667
-LO-REDUCTION      30 555.041059 554.820011
-HI-REDUCTION      32 554.902564 554.820011
-HI-REDUCTION      34 554.878667 554.820011
-HI-REDUCTION      36 554.863049 554.818271
-REFLECTION        38 554.823167 554.795312
-LO-REDUCTION      40 554.820011 554.795312
-HI-REDUCTION      42 554.818271 554.795007
-EXTENSION         44 554.796015 554.739129
-LO-REDUCTION      46 554.795312 554.739129
-LO-REDUCTION      48 554.795007 554.739129
-EXTENSION         50 554.757998 554.655046
-LO-REDUCTION      52 554.746394 554.655046
-EXTENSION         54 554.739129 554.611468
-EXTENSION         56 554.680717 554.529970
-LO-REDUCTION      58 554.655046 554.529970
-REFLECTION        60 554.611468 554.508046
-REFLECTION        62 554.533844 554.490991
-LO-REDUCTION      64 554.529970 554.490991
-LO-REDUCTION      66 554.508046 554.490991
-HI-REDUCTION      68 554.499927 554.490991
-HI-REDUCTION      70 554.499566 554.490991
-LO-REDUCTION      72 554.495632 554.490991
-LO-REDUCTION      74 554.494415 554.490991
-EXTENSION         76 554.493222 554.488394
-HI-REDUCTION      78 554.492456 554.488394
-EXTENSION         80 554.490991 554.486164
-LO-REDUCTION      82 554.490490 554.486164
-LO-REDUCTION      84 554.488394 554.486164
-REFLECTION        86 554.486677 554.486008
-REFLECTION        88 554.486468 554.485672
-HI-REDUCTION      90 554.486164 554.485662
-HI-REDUCTION      92 554.486008 554.485580
+BUILD              4 29590.472476 574.029743
+REFLECTION         6 10349.712405 561.069623
+EXTENSION          8 10349.712405 552.918157
+LO-REDUCTION      10 574.029743 552.446706
+LO-REDUCTION      12 561.069623 552.446706
+LO-REDUCTION      14 554.933811 552.446706
+LO-REDUCTION      16 553.288596 552.188648
+HI-REDUCTION      18 552.918157 552.188648
+REFLECTION        20 552.446706 551.941892
+HI-REDUCTION      22 552.310402 551.941892
+LO-REDUCTION      24 552.188648 551.941892
+EXTENSION         26 552.061458 551.693153
+LO-REDUCTION      28 551.960407 551.693153
+HI-REDUCTION      30 551.941892 551.693153
+EXTENSION         32 551.777968 551.552226
+LO-REDUCTION      34 551.749550 551.552226
+HI-REDUCTION      36 551.693153 551.552226
+EXTENSION         38 551.598023 551.421898
+HI-REDUCTION      40 551.581645 551.421898
+LO-REDUCTION      42 551.552226 551.421898
+REFLECTION        44 551.511351 551.401006
+LO-REDUCTION      46 551.462702 551.401006
+REFLECTION        48 551.428693 551.390416
+LO-REDUCTION      50 551.421898 551.388095
+LO-REDUCTION      52 551.401006 551.388095
+REFLECTION        54 551.395541 551.387873
+LO-REDUCTION      56 551.390416 551.385576
+REFLECTION        58 551.388095 551.379441
+HI-REDUCTION      60 551.387873 551.379441
+HI-REDUCTION      62 551.385576 551.379441
+LO-REDUCTION      64 551.383020 551.379441
+HI-REDUCTION      66 551.382723 551.379441
+EXTENSION         68 551.381009 551.378081
+LO-REDUCTION      70 551.380921 551.378081
+EXTENSION         72 551.379441 551.374956
+LO-REDUCTION      74 551.379030 551.374956
+LO-REDUCTION      76 551.378081 551.374956
+LO-REDUCTION      78 551.376822 551.374956
+EXTENSION         80 551.375968 551.373995
+LO-REDUCTION      82 551.375446 551.373995
+REFLECTION        84 551.374956 551.373649
+LO-REDUCTION      86 551.374162 551.373649
+REFLECTION        88 551.373995 551.373632
+HI-REDUCTION      90 551.373845 551.373632
+REFLECTION        92 551.373739 551.373469
+REFLECTION        94 551.373649 551.373462
+LO-REDUCTION      96 551.373632 551.373462
 Exiting from Nelder Mead minimizer
-    94 function evaluations used
+    98 function evaluations used
 h in NLF =  0.1 
-epsilon in NLF = 0.07703295 0.08568253 1.296531 
-Fitted param  1 -5.928954 -5.928954  up in  'nlf' 
-Fitted param  1 -5.918596  down in  'NLF' 
-Fitted param  2 -5.919574 -5.919574  up in  'nlf' 
-Fitted param  2 -5.933857  down in  'NLF' 
-Fitted param  3 -5.937754 -5.937754  up in  'nlf' 
-Fitted param  3 -5.903045  down in  'NLF' 
-> 
+epsilon in NLF = 0.07430743 0.07134126 1.118089 
+Fitted param  1 -5.893548 -5.893548  up in  'nlf' 
+Fitted param  1 -5.887774  down in  'NLF' 
+Fitted param  2 -5.888571 -5.888571  up in  'nlf' 
+Fitted param  2 -5.89076  down in  'NLF' 
+Fitted param  3 -5.901152 -5.901152  up in  'nlf' 
+Fitted param  3 -5.872222  down in  'NLF' 
 > se4 <- m4$se
 > 
+> options(scipen=-3)
 > print(
-+       cbind(
-+             guess=c(theta.guess[estnames],se=se3,value=m3),
-+             truth=c(theta.truth[estnames],se=se1,value=m1),
-+             fit.from.guess=c(m4$params[estnames],se=se4,value=m4$value),
-+             fit.from.truth=c(m2$params[estnames],se=se2,value=m2$value)
-+             )
++       signif(
++              cbind(
++                    guess=c(theta.guess[estnames],se=se3,value=m3),
++                    truth=c(theta.truth[estnames],se=se1,value=m1),
++                    fit.from.guess=c(m4$params[estnames],se=se4,value=m4$value),
++                    fit.from.truth=c(m2$params[estnames],se=se2,value=m2$value)
++                    ),
++              4
++              )
 +       )
-            guess     truth fit.from.guess fit.from.truth
-alpha.2     -0.75   -0.5000    -0.45749499    -0.45774692
-alpha.3      0.45    0.3000     0.30150315     0.30194588
-tau          1.50    1.0000     1.09790880     1.09526822
-se1            NA        NA     0.04374829     0.04397017
-se2            NA        NA     0.05423946     0.05463665
-se3            NA        NA     0.54596143     0.54625858
-value   -10330.93 -555.0868  -554.48554809  -554.48546595
+             guess  truth fit.from.guess fit.from.truth
+alpha.2 -7.500e-01   -0.5     -4.663e-01     -4.664e-01
+alpha.3  4.500e-01    0.3      3.005e-01      3.003e-01
+tau      1.500e+00    1.0      1.129e+00      1.125e+00
+se1             NA     NA      3.531e-02      3.533e-02
+se2             NA     NA      3.978e-02      3.974e-02
+se3             NA     NA      5.287e-01      5.312e-01
+value   -1.035e+04 -551.8     -5.514e+02     -5.514e+02
 > 
 > proc.time()
    user  system elapsed 
-  8.112   0.052   8.216 
+  6.836   0.060   6.942 



More information about the pomp-commits mailing list