Skip to content

Commit

Permalink
added hindcast cross validation (#149)
Browse files Browse the repository at this point in the history
Bump version to 1.3.7

Added functionality for hindcast analysis

Co-authored-by: Alex Kokkalis <alko@aqua.dtu.dk>
  • Loading branch information
tokami and alko989 authored Sep 6, 2022
1 parent 26da6b8 commit 88e2314
Show file tree
Hide file tree
Showing 19 changed files with 1,975 additions and 17 deletions.
2 changes: 1 addition & 1 deletion make.description.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ date <- format(Sys.Date(), "%Y-%m-%d")
cat('Package: spict
Type: Package
Title: Stochastic surplus Production model in Continuous-Time (SPiCT)
Version: 1.3.6
Version: 1.3.7
Date:', date, '
Authors@R: c(person(given="Martin Waever",
family="Pedersen",
Expand Down
6 changes: 3 additions & 3 deletions spict/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: spict
Type: Package
Title: Stochastic surplus Production model in Continuous-Time (SPiCT)
Version: 1.3.6
Date: 2022-06-06
Version: 1.3.7
Date: 2022-09-06
Authors@R: c(person(given="Martin Waever",
family="Pedersen",
email="wpsgodd@gmail.com",
Expand Down Expand Up @@ -40,4 +40,4 @@ Suggests:
LazyData: true
Encoding: UTF-8
VignetteBuilder: knitr
RoxygenNote: 7.1.2
RoxygenNote: 7.2.1
4 changes: 4 additions & 0 deletions spict/NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export(annual)
export(calc.bmsyk)
export(calc.gamma)
export(calc.influence)
export(calc.mase)
export(calc.om)
export(calc.osa.resid)
export(calc.tac)
Expand All @@ -31,6 +32,7 @@ export(get.par)
export(get.spline)
export(get.version)
export(guess.m)
export(hindcast)
export(invlogit)
export(invlogp1)
export(likprof.spict)
Expand Down Expand Up @@ -63,6 +65,7 @@ export(plotspict.fb)
export(plotspict.ffmsy)
export(plotspict.growth)
export(plotspict.hcr)
export(plotspict.hindcast)
export(plotspict.infl)
export(plotspict.inflsum)
export(plotspict.likprof)
Expand Down Expand Up @@ -100,5 +103,6 @@ export(write.aspic)
exportClasses(spictcls)
import(TMB)
importFrom(ellipse,ellipse)
importFrom(parallel,mclapply)
importFrom(utils,packageDescription)
useDynLib(spict)
10 changes: 8 additions & 2 deletions spict/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
spict v1.3.7-pre (not released yet)
============
spict v1.3.7 (2021-08-12)

New features

* Added functionality for performing and plotting hindcast analysis
introducing the functions `hindcast()` and `plotspict.hindcast`.

Bug fixes:


* fixed retro when last year's observations where missing

spict v1.3.6 (2021-06-06)
Expand Down
6 changes: 6 additions & 0 deletions spict/R/checkinp.R
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,12 @@ check.inp <- function(inp, verbose = TRUE, mancheck = TRUE){
## Simulate using fitted object (env$last.par)?
if(!"sim.fit" %in% names(inp)) inp$sim.fit <- TRUE

##
if(!"iuse" %in% names(inp) || length(inp$iuse) != length(unlist(inp$obsI)))
inp$iuse <- rep(TRUE, length(unlist(inp$obsI)))



# Reorder parameter list
inp$parlist <- list(logm=inp$ini$logm,
mu=inp$ini$mu,
Expand Down
Loading

0 comments on commit 88e2314

Please sign in to comment.