[Pomp-commits] r1071 - in pkg/pomp: . R inst tests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Feb 13 20:34:41 CET 2015
Author: kingaa
Date: 2015-02-13 20:34:41 +0100 (Fri, 13 Feb 2015)
New Revision: 1071
Added:
pkg/pomp/tests/ou2-spect.R
pkg/pomp/tests/ou2-spect.Rout.save
Modified:
pkg/pomp/DESCRIPTION
pkg/pomp/R/spect-match.R
pkg/pomp/inst/NEWS
pkg/pomp/inst/NEWS.Rd
Log:
- bug fix in 'spect.match'. Thanks to Karsten Hempel for catching it and submitting a patch.
Modified: pkg/pomp/DESCRIPTION
===================================================================
--- pkg/pomp/DESCRIPTION 2015-02-11 12:31:23 UTC (rev 1070)
+++ pkg/pomp/DESCRIPTION 2015-02-13 19:34:41 UTC (rev 1071)
@@ -1,8 +1,8 @@
Package: pomp
Type: Package
Title: Statistical Inference for Partially Observed Markov Processes
-Version: 0.58-11
-Date: 2015-02-09
+Version: 0.59-1
+Date: 2015-02-14
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/R/spect-match.R
===================================================================
--- pkg/pomp/R/spect-match.R 2015-02-11 12:31:23 UTC (rev 1070)
+++ pkg/pomp/R/spect-match.R 2015-02-13 19:34:41 UTC (rev 1071)
@@ -37,13 +37,14 @@
detrend=detrend,
ker=ker
)
+ ## simvals is an nsim x nfreq x nobs array
## compute a measure of the discrepancies between simulations and data
discrep <- array(dim=c(length(freq),length(vars)))
sim.means <- colMeans(simvals)
for (j in seq_along(freq)) {
for (k in seq_along(vars)) {
- discrep[j,k] <- ((datval[j,k]-sim.means[j,k])^2)/mean((simvals[j,,k]-sim.means[j,k])^2)
+ discrep[j,k] <- ((datval[j,k]-sim.means[j,k])^2)/mean((simvals[,j,k]-sim.means[j,k])^2)
}
discrep[j,] <- weights[j]*discrep[j,]
}
Modified: pkg/pomp/inst/NEWS
===================================================================
--- pkg/pomp/inst/NEWS 2015-02-11 12:31:23 UTC (rev 1070)
+++ pkg/pomp/inst/NEWS 2015-02-13 19:34:41 UTC (rev 1071)
@@ -1,5 +1,10 @@
_N_e_w_s _f_o_r _p_a_c_k_a_g_e '_p_o_m_p'
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._5_9-_1:
+
+ • A bug in ‘spect.match’ has been fixed. Thanks to Karsten
+ Hempel for finding it and contributing the fix.
+
_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._5_8-_1:
• Compiler messages are now suppressed by default when
Modified: pkg/pomp/inst/NEWS.Rd
===================================================================
--- pkg/pomp/inst/NEWS.Rd 2015-02-11 12:31:23 UTC (rev 1070)
+++ pkg/pomp/inst/NEWS.Rd 2015-02-13 19:34:41 UTC (rev 1071)
@@ -1,5 +1,11 @@
\name{NEWS}
\title{News for package `pomp'}
+\section{Changes in \pkg{pomp} version 0.59-1}{
+ \itemize{
+ \item A bug in \code{spect.match} has been fixed.
+ Thanks to Karsten Hempel for finding it and contributing the fix.
+ }
+}
\section{Changes in \pkg{pomp} version 0.58-1}{
\itemize{
\item Compiler messages are now suppressed by default when \code{Csnippet}s are used in construction of a \code{pomp} object.
Added: pkg/pomp/tests/ou2-spect.R
===================================================================
--- pkg/pomp/tests/ou2-spect.R (rev 0)
+++ pkg/pomp/tests/ou2-spect.R 2015-02-13 19:34:41 UTC (rev 1071)
@@ -0,0 +1,16 @@
+library(pomp)
+pompExample(ou2)
+
+gm1 <- spect.match(ou2,
+ kernel.width=3,
+ detrend="mean",
+ nsim=50,
+ est=c("alpha.1","alpha.4"),
+ method="Nelder-Mead")
+
+gm2 <- spect.match(ou2,
+ kernel.width=3,
+ detrend="mean",
+ nsim=49,
+ est=c("alpha.1","alpha.4"),
+ method="Nelder-Mead")
Added: pkg/pomp/tests/ou2-spect.Rout.save
===================================================================
--- pkg/pomp/tests/ou2-spect.Rout.save (rev 0)
+++ pkg/pomp/tests/ou2-spect.Rout.save 2015-02-13 19:34:41 UTC (rev 1071)
@@ -0,0 +1,41 @@
+
+R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet"
+Copyright (C) 2014 The R Foundation for Statistical Computing
+Platform: x86_64-unknown-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> library(pomp)
+Loading required package: subplex
+Loading required package: nloptr
+> pompExample(ou2)
+newly created object(s):
+ ou2
+>
+> gm1 <- spect.match(ou2,
++ kernel.width=3,
++ detrend="mean",
++ nsim=50,
++ est=c("alpha.1","alpha.4"),
++ method="Nelder-Mead")
+>
+> gm2 <- spect.match(ou2,
++ kernel.width=3,
++ detrend="mean",
++ nsim=49,
++ est=c("alpha.1","alpha.4"),
++ method="Nelder-Mead")
+>
+> proc.time()
+ user system elapsed
+ 21.537 0.040 21.670
More information about the pomp-commits
mailing list