Skip to content

Commit

Permalink
fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
kingaa committed Dec 13, 2018
1 parent 3424c91 commit 29e0e5e
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 7 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: pomp2
Type: Package
Title: Statistical Inference for Partially Observed Markov Processes
Version: 2.0.6.1
Date: 2018-10-02
Version: 2.0.6.2
Date: 2018-12-13
Authors@R: c(person(given=c("Aaron","A."),family="King",
role=c("aut","cre"),email="[email protected]"),
person(given=c("Edward","L."),family="Ionides",role=c("aut")),
Expand Down
2 changes: 1 addition & 1 deletion R/mif2.R
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ perturbn.kernel.sd <- function (rw.sd, time, paramnames) {
unrec <- names(rw.sd)[!names(rw.sd) %in% paramnames]
pStop_("the following parameter(s), ",
"given random walks in ",sQuote("rw.sd"),", are not present in ",
sQuote("start"),": ",paste(sapply(unrec,sQuote),collapse=","),".")
sQuote("params"),": ",paste(sapply(unrec,sQuote),collapse=","),".")
}
ivp <- function (sd, lag = 1L) {
sd*(seq_along(time)==lag)
Expand Down
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
- what does a generic `pomp.fun` interface look like?
- should parameter transformations allow renaming of variables?
- would require attention to `rw.sd`, e.g.
- weighted particle filter

## For pomp:

Expand Down
20 changes: 20 additions & 0 deletions inst/NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
_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 _2._0._6:

• More examples have been included.

• Minor changes to error messages.

_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _2._0._5:

• The names of the ‘objfun’ methods have been changed to
‘probe_objfun’, ‘spect_objfun’, ‘traj_objfun’, and
‘nlf_objfun’.

_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _2._0._4:

• The package directory structure has been modified to include
a new ‘examples’ directory, which holds the examples used in
the documentation.

• The names of the ‘objfun’ methods have been shortened.

_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _2._0._3:

• It is now permissible that the sequence of observation times
Expand Down
17 changes: 17 additions & 0 deletions inst/NEWS.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
\name{NEWS}
\title{News for package `pomp'}
\section{Changes in \pkg{pomp} version 2.0.6}{
\itemize{
\item More examples have been included.
\item Minor changes to error messages.
}
}
\section{Changes in \pkg{pomp} version 2.0.5}{
\itemize{
\item The names of the \sQuote{objfun} methods have been changed to \code{probe_objfun}, \code{spect_objfun}, \code{traj_objfun}, and \code{nlf_objfun}.
}
}
\section{Changes in \pkg{pomp} version 2.0.4}{
\itemize{
\item The package directory structure has been modified to include a new \file{examples} directory, which holds the examples used in the documentation.
\item The names of the \sQuote{objfun} methods have been shortened.
}
}
\section{Changes in \pkg{pomp} version 2.0.3}{
\itemize{
\item It is now permissible that the sequence of observation times (and sequences of covariate times) be merely non-decreasing sequences.
Expand Down
8 changes: 4 additions & 4 deletions tests/mif2.Rout.save
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Error : in 'mif2': 'rw.sd' should be specified using the 'rw.sd' function. See '
> try(mif2(po,Nmif=1,Np=100,rw.sd=rw.sd()))
Error : in 'mif2': in 'rw.sd': parameters must be referenced by name.
> try(mif2(po,Nmif=1,Np=100,rw.sd=rw.sd(a=9)))
Error : in 'mif2': the following parameter(s), given random walks in 'rw.sd', are not present in 'start': 'a'.
Error : in 'mif2': the following parameter(s), given random walks in 'rw.sd', are not present in 'params': 'a'.
> try(mif2(po,Nmif=1,Np=100,rw.sd=rw.sd(sigma=1:1000)))
Error : in 'mif2': 'rw.sd' spec for parameter 'sigma' does not evaluate to a vector of the correct length ('length(time(object))'=10).
> try(mif2(po,Nmif=1,Np=100,rw.sd=rw.sd(sigma=0.1)))
Expand All @@ -154,9 +154,9 @@ Error : in 'mif2': 'cooling.fraction.50' must be in (0,1].
+ cooling.type="geometric",tol=-3))
Error : in 'mif2': 'tol' should be a small positive number.
> try(mif2(po,params=NULL,Nmif=1,Np=100,rw.sd=rw.sd(sigma=0.1)))
Error : in 'mif2': the following parameter(s), given random walks in 'rw.sd', are not present in 'start': 'sigma'.
Error : in 'mif2': the following parameter(s), given random walks in 'rw.sd', are not present in 'params': 'sigma'.
> try(mif2(po,params=list(),Nmif=1,Np=100,rw.sd=rw.sd(sigma=0.1)))
Error : in 'mif2': the following parameter(s), given random walks in 'rw.sd', are not present in 'start': 'sigma'.
Error : in 'mif2': the following parameter(s), given random walks in 'rw.sd', are not present in 'params': 'sigma'.
> try(mif2(po,params=list(NULL),Nmif=1,Np=100,rw.sd=rw.sd(sigma=0.1)))
Error : in 'mif2': (list) object cannot be coerced to type 'double'
> try(mif2(po,params=c(3,2,1),Nmif=1,Np=100,rw.sd=rw.sd(sigma=0.1)))
Expand Down Expand Up @@ -205,7 +205,7 @@ Error : in 'mif2': 'rprocess', 'dmeasure' are needed basic components.
> try(mif2(po,Nmif=2,Np=50,rw.sd=rw.sd(sigma=0.01),cooling.fraction.50=0.1,rprocess=NULL))
Error : in 'mif2': 'rprocess', 'dmeasure' are needed basic components.
> try(mif2(po,Nmif=2,Np=50,rw.sd=rw.sd(sigma=0.01),cooling.fraction.50=0.1,params=NULL))
Error : in 'mif2': the following parameter(s), given random walks in 'rw.sd', are not present in 'start': 'sigma'.
Error : in 'mif2': the following parameter(s), given random walks in 'rw.sd', are not present in 'params': 'sigma'.
>
> theta <- coef(po)
> theta["sigma"] <- 0.2
Expand Down

0 comments on commit 29e0e5e

Please sign in to comment.