Skip to content

Commit

Permalink
fix typo; drop "donttest" from example
Browse files Browse the repository at this point in the history
  • Loading branch information
kingaa committed Dec 18, 2024
1 parent 1a90db7 commit 092a43b
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 50 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: pomp
Type: Package
Title: Statistical Inference for Partially Observed Markov Processes
Version: 6.0.2.2
Date: 2024-12-15
Version: 6.0.2.3
Date: 2024-12-18
Authors@R: c(person(given=c("Aaron","A."),family="King",role=c("aut","cre"),email="[email protected]",comment=c(ORCID="0000-0001-6159-3207")),
person(given=c("Edward","L."),family="Ionides",role="aut",comment=c(ORCID="0000-0002-4190-0174")) ,
person(given="Carles",family="Bretó",role="aut",comment=c(ORCID="0000-0003-4695-4902")),
Expand Down
2 changes: 1 addition & 1 deletion R/userdata.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##' Facilities for making additional information to basic components
##' Facilities for making additional information available to basic model components
##'
##' When \acronym{POMP} basic components need information they can't get from parameters or covariates.
##'
Expand Down
43 changes: 20 additions & 23 deletions examples/kf.R
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
\donttest{ # takes too long for R CMD check
if (require(dplyr)) {

if (require(dplyr)) {
gompertz() -> po

gompertz() -> po
po |>
as.data.frame() |>
mutate(
logY=log(Y)
) |>
select(time,logY) |>
pomp(times="time",t0=0) |>
kalmanFilter(
X0=c(logX=0),
A=matrix(exp(-0.1),1,1),
Q=matrix(0.01,1,1),
C=matrix(1,1,1),
R=matrix(0.01,1,1)
) -> kf

po |>
as.data.frame() |>
mutate(
logY=log(Y)
) |>
select(time,logY) |>
pomp(times="time",t0=0) |>
kalmanFilter(
X0=c(logX=0),
A=matrix(exp(-0.1),1,1),
Q=matrix(0.01,1,1),
C=matrix(1,1,1),
R=matrix(0.01,1,1)
) -> kf
po |>
pfilter(Np=1000) -> pf

po |>
pfilter(Np=1000) -> pf
kf$logLik
logLik(pf) + sum(log(obs(pf)))

kf$logLik
logLik(pf) + sum(log(obs(pf)))

}
}
43 changes: 20 additions & 23 deletions man/kf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/userdata.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 092a43b

Please sign in to comment.