diff --git a/R/simdata_constant.R b/R/simdata_constant.R deleted file mode 100644 index f86b6cdf..00000000 --- a/R/simdata_constant.R +++ /dev/null @@ -1,18 +0,0 @@ -#' Constant force-of-infection simulated serosurvey -#' -#' Simulated dataset describing a endemic situation where the force-of-infection -#' is constant over a period of 50 years (2000-2050) with a value of 0.2. -#' The hypothetical serosurvey is conducted in year 2050 for 250 individuals -#' that are up to 50 years old. -#' -#' @docType data -#' -#' @usage simdata_constant -#' -#' @format An object of class `"cross"`; see [qtl::read.cross()]. -#' -#' @keywords datasets -#' -#' @examples -#' simdata_constant -"simdata_constant" diff --git a/R/simdata_large_epi.R b/R/simdata_large_epi.R deleted file mode 100644 index b057f737..00000000 --- a/R/simdata_large_epi.R +++ /dev/null @@ -1,18 +0,0 @@ -#' Large epidemic simulated serosurvey -#' -#' Simulated dataset describing a large epidemic between the years 2032 and 2035 -#' with a constant force-of-infection with value 1.5. -#' The hypothetical serosurvey is conducted in year 2050 for 250 individuals -#' that are up to 50 years old. -#' -#' @docType data -#' -#' @usage simdata_large_epi -#' -#' @format An object of class `"cross"`; see [qtl::read.cross()]. -#' -#' @keywords datasets -#' -#' @examples -#' simdata_large_epi -"simdata_large_epi" diff --git a/R/simdata_sw_dec.R b/R/simdata_sw_dec.R deleted file mode 100644 index 809496f4..00000000 --- a/R/simdata_sw_dec.R +++ /dev/null @@ -1,18 +0,0 @@ -#' Step-wise decreasing force-of-infection simulated serosurvey -#' -#' Simulated dataset describing a situation where the force-of-infection -#' follows a step-wise decreasing tendency over a period of 50 years (2000-2050) -#' The hypothetical serosurvey is conducted in year 2050 for 250 individuals -#' that are up to 50 years old. -#' -#' @docType data -#' -#' @usage simdata_sw_dec -#' -#' @format An object of class `"cross"`; see [qtl::read.cross()]. -#' -#' @keywords datasets -#' -#' @examples -#' simdata_sw_dec -"simdata_sw_dec" diff --git a/data/simdata_constant.RData b/data/simdata_constant.RData deleted file mode 100644 index 62df2d5d..00000000 Binary files a/data/simdata_constant.RData and /dev/null differ diff --git a/data/simdata_large_epi.RData b/data/simdata_large_epi.RData deleted file mode 100644 index 3617b6ca..00000000 Binary files a/data/simdata_large_epi.RData and /dev/null differ diff --git a/data/simdata_sw_dec.RData b/data/simdata_sw_dec.RData deleted file mode 100644 index e6d8be6e..00000000 Binary files a/data/simdata_sw_dec.RData and /dev/null differ diff --git a/man/simdata_constant.Rd b/man/simdata_constant.Rd deleted file mode 100644 index e06f96e7..00000000 --- a/man/simdata_constant.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/simdata_constant.R -\docType{data} -\name{simdata_constant} -\alias{simdata_constant} -\title{Constant force-of-infection simulated serosurvey} -\format{ -An object of class \code{"cross"}; see \code{\link[qtl:read.cross]{qtl::read.cross()}}. -} -\usage{ -simdata_constant -} -\description{ -Simulated dataset describing a endemic situation where the force-of-infection -is constant over a period of 50 years (2000-2050) with a value of 0.2. -The hypothetical serosurvey is conducted in year 2050 for 250 individuals -that are up to 50 years old. -} -\examples{ -simdata_constant -} -\keyword{datasets} diff --git a/man/simdata_large_epi.Rd b/man/simdata_large_epi.Rd deleted file mode 100644 index 7f0ba780..00000000 --- a/man/simdata_large_epi.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/simdata_large_epi.R -\docType{data} -\name{simdata_large_epi} -\alias{simdata_large_epi} -\title{Large epidemic simulated serosurvey} -\format{ -An object of class \code{"cross"}; see \code{\link[qtl:read.cross]{qtl::read.cross()}}. -} -\usage{ -simdata_large_epi -} -\description{ -Simulated dataset describing a large epidemic between the years 2032 and 2035 -with a constant force-of-infection with value 1.5. -The hypothetical serosurvey is conducted in year 2050 for 250 individuals -that are up to 50 years old. -} -\examples{ -simdata_large_epi -} -\keyword{datasets} diff --git a/man/simdata_sw_dec.Rd b/man/simdata_sw_dec.Rd deleted file mode 100644 index 406cffc7..00000000 --- a/man/simdata_sw_dec.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/simdata_sw_dec.R -\docType{data} -\name{simdata_sw_dec} -\alias{simdata_sw_dec} -\title{Step-wise decreasing force-of-infection simulated serosurvey} -\format{ -An object of class \code{"cross"}; see \code{\link[qtl:read.cross]{qtl::read.cross()}}. -} -\usage{ -simdata_sw_dec -} -\description{ -Simulated dataset describing a situation where the force-of-infection -follows a step-wise decreasing tendency over a period of 50 years (2000-2050) -The hypothetical serosurvey is conducted in year 2050 for 250 individuals -that are up to 50 years old. -} -\examples{ -simdata_sw_dec -} -\keyword{datasets} diff --git a/tests/testthat/models_serialization.R b/tests/testthat/models_serialization.R deleted file mode 100644 index 3926c1ff..00000000 --- a/tests/testthat/models_serialization.R +++ /dev/null @@ -1,40 +0,0 @@ -library(serofoi) -library(testthat) - -set.seed(1234) # For reproducibility - -#----- Read and prepare data -data("simdata_large_epi") -simdata <- prepare_serodata(simdata_large_epi) -no_transm <- 0.0000000001 -big_outbreak <- 1.5 -foi_sim <- c(rep(no_transm, 32), rep(big_outbreak, 3), rep(no_transm, 15)) # 1 epidemics - - -#----- Run models -models_to_run <- c( - "constant", - "tv_normal", - "tv_normal_log" -) - -models_list <- lapply(models_to_run, - run_seromodel, - serodata = simdata, - iter = 1000 -) - -saveRDS( - models_list[[1]], - testthat::test_path("extdata", "model_constant.RDS") -) - -saveRDS( - models_list[[2]], - testthat::test_path("extdata", "model_tv_normal.RDS") -) - -saveRDS( - models_list[[3]], - testthat::test_path("extdata", "model_tv_normal_log.RDS") -)