[Pomp-commits] r1106 - in pkg/pomp: . tests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Feb 27 03:57:40 CET 2015
Author: kingaa
Date: 2015-02-27 03:57:40 +0100 (Fri, 27 Feb 2015)
New Revision: 1106
Modified:
pkg/pomp/DESCRIPTION
pkg/pomp/tests/ou2-kalman.Rout.save
pkg/pomp/tests/rw2.Rout.save
pkg/pomp/tests/synlik.Rout.save
Log:
- update tests
Modified: pkg/pomp/DESCRIPTION
===================================================================
--- pkg/pomp/DESCRIPTION 2015-02-27 02:57:36 UTC (rev 1105)
+++ pkg/pomp/DESCRIPTION 2015-02-27 02:57:40 UTC (rev 1106)
@@ -1,7 +1,7 @@
Package: pomp
Type: Package
Title: Statistical Inference for Partially Observed Markov Processes
-Version: 0.61-2
+Version: 0.61-3
Date: 2015-02-26
Authors at R: c(person(given=c("Aaron","A."),family="King",
role=c("aut","cre"),email="kingaa at umich.edu"),
Modified: pkg/pomp/tests/ou2-kalman.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-kalman.Rout.save 2015-02-27 02:57:36 UTC (rev 1105)
+++ pkg/pomp/tests/ou2-kalman.Rout.save 2015-02-27 02:57:40 UTC (rev 1106)
@@ -55,7 +55,7 @@
+ }
>
> kalman <- function (x, object, params) {
-+ y <- data.array(object)
++ y <- obs(object)
+ p <- params
+ p[names(x)] <- x
+ x0 <- init.state(object,params=p)
@@ -82,9 +82,6 @@
Kalman filter log likelihood at truth
> print(loglik.truth <- -kalman(p.truth,ou2,p.truth),digits=4)
[1] -479
-Warning message:
-In data.array(object) :
- 'data.array' is deprecated and will be removed in a future release. Use 'obs' instead.
>
> # make a wild guess
> p.guess <- p.truth[c('alpha.1','alpha.4','x1.0','x2.0')]*exp(rnorm(n=4,mean=0,sd=0.5))
@@ -97,9 +94,6 @@
Kalman filter log likelihood at guess
> print(loglik.guess <- -kalman(p.guess,ou2,p.truth),digits=4)
[1] -511.8
-Warning message:
-In data.array(object) :
- 'data.array' is deprecated and will be removed in a future release. Use 'obs' instead.
>
> # find MLE using Kalman filter starting at the guess
> cat("running Kalman filter estimation\n")
@@ -168,10 +162,9 @@
HI-REDUCTION 115 477.241051 477.241042
Exiting from Nelder Mead minimizer
117 function evaluations used
-There were 50 or more warnings (use warnings() to see the first 50)
> toc <- Sys.time()
> print(toc-tic)
-Time difference of 3.404061 secs
+Time difference of 3.41739 secs
> tic <- Sys.time()
> print(loglik.mle <- -kalm.fit1$value,digits=4)
[1] -477.2
@@ -195,4 +188,4 @@
>
> proc.time()
user system elapsed
- 3.924 0.040 3.956
+ 3.933 0.035 3.954
Modified: pkg/pomp/tests/rw2.Rout.save
===================================================================
--- pkg/pomp/tests/rw2.Rout.save 2015-02-27 02:57:36 UTC (rev 1105)
+++ pkg/pomp/tests/rw2.Rout.save 2015-02-27 02:57:40 UTC (rev 1106)
@@ -164,7 +164,7 @@
}
y
}
-<environment: 0x1535468>
+<environment: 0x2300468>
measurement model density, dmeasure =
function (y, x, t, params, log, covars, ...)
{
@@ -177,7 +177,7 @@
f
else exp(f)
}
-<environment: 0x1535468>
+<environment: 0x2300468>
prior simulator, rprior =
function not specified
prior density, dprior =
@@ -246,10 +246,7 @@
> x <- simulate(rw2,nsim=10,params=p,obs=T,states=T)
> x <- simulate(rw2,nsim=10,params=p[,1])
>
-> x <- data.array(rw2)
-Warning message:
-In data.array(rw2) :
- 'data.array' is deprecated and will be removed in a future release. Use 'obs' instead.
+> x <- obs(rw2)
> t <- time(rw2)
>
> x0 <- init.state(rw2,params=p)
@@ -345,4 +342,4 @@
>
> proc.time()
user system elapsed
- 0.903 0.036 0.923
+ 0.870 0.033 0.889
Modified: pkg/pomp/tests/synlik.Rout.save
===================================================================
--- pkg/pomp/tests/synlik.Rout.save 2015-02-27 02:57:36 UTC (rev 1105)
+++ pkg/pomp/tests/synlik.Rout.save 2015-02-27 02:57:40 UTC (rev 1106)
@@ -59,7 +59,7 @@
+ }
>
> kalman <- function (x, object, params) {
-+ y <- data.array(object)
++ y <- obs(object)
+ p <- params
+ p[names(x)] <- x
+ x0 <- init.state(object,params=p)
@@ -76,9 +76,6 @@
> # exact likelihood
> p.truth <- coef(po)
> loglik.truth <- -kalman(p.truth,po,p.truth)
-Warning message:
-In data.array(object) :
- 'data.array' is deprecated and will be removed in a future release. Use 'obs' instead.
>
> ## likelihood from probes (works since ou2 is Gaussian)
> loglik.probe <- replicate(n=500,logLik(probe(po,nsim=200,probes=function(x)x)))
@@ -119,4 +116,4 @@
>
> proc.time()
user system elapsed
- 7.404 0.033 7.432
+ 7.286 0.042 7.322
More information about the pomp-commits
mailing list