diff --git a/.gitignore b/.gitignore index 73b16ef4..db871aa8 100644 --- a/.gitignore +++ b/.gitignore @@ -111,3 +111,6 @@ inst/doc CRAN-SUBMISSION cran-comments.md docs +.Rproj.user +.Rdata +.quarto diff --git a/NAMESPACE b/NAMESPACE index aff0c845..640808fc 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -222,6 +222,10 @@ S3method(update_inits_X,SIP) S3method(update_inits_X,SIS) S3method(update_inits_X,hMoI) S3method(update_inits_X,trace) +S3method(xde_lines_X,SIP) +S3method(xde_lines_X,SIS) +S3method(xde_plot_X,SIP) +S3method(xde_plot_X,SIS) S3method(xde_solve,aqua) S3method(xde_solve,aqua_dde) S3method(xde_solve,cohort) @@ -458,6 +462,20 @@ export(xDE_diffeqn_aquatic) export(xDE_diffeqn_cohort) export(xDE_diffeqn_human) export(xDE_diffeqn_mosy) +export(xde_lines_EIR) +export(xde_lines_M) +export(xde_lines_PR) +export(xde_lines_X) +export(xde_lines_YZ) +export(xde_lines_YZ_fracs) +export(xde_lines_aEIR) +export(xde_plot_EIR) +export(xde_plot_M) +export(xde_plot_PR) +export(xde_plot_X) +export(xde_plot_YZ) +export(xde_plot_YZ_fracs) +export(xde_plot_aEIR) export(xde_setup) export(xde_setup_aquatic) export(xde_setup_cohort) diff --git a/R/adult-RM.R b/R/adult-RM.R index 2837c2dc..a91ffa0f 100644 --- a/R/adult-RM.R +++ b/R/adult-RM.R @@ -386,8 +386,12 @@ get_inits_MYZ.RM_ode <- function(pars) {with(pars$MYZinits,{ #' @title Return initial values as a vector #' @description Implements [get_inits_MYZ] for the RM model. #' @inheritParams get_inits_MYZ -#' @return none +#' @return [numeric] #' @export get_inits_MYZ.RM_dde <- function(pars) {with(pars$MYZinits,{ c(M0, P0, Y0, Z0, as.vector(Upsilon0), rep(0, 3*pars$nPatches)) })} + + + + diff --git a/R/adult-interface.R b/R/adult-interface.R index 0e13eca6..16f88d6a 100644 --- a/R/adult-interface.R +++ b/R/adult-interface.R @@ -122,6 +122,7 @@ parse_deout_MYZ <- function(deout, pars) { UseMethod("parse_deout_MYZ", pars$MYZpar) } + #' @title Return initial values as a vector #' @description This method dispatches on the type of `pars$MYZpar`. #' @param pars a [list] @@ -151,4 +152,3 @@ update_inits_MYZ <- function(pars, y0) { make_Omega <- function(g, sigma, K, nPatches) { diag(g, nPatches) + ((diag(nPatches) - K) %*% diag(sigma, nPatches)) } - diff --git a/R/human-SIP.R b/R/human-SIP.R index 6db096b5..bfd954c4 100644 --- a/R/human-SIP.R +++ b/R/human-SIP.R @@ -228,3 +228,42 @@ update_inits_X.SIP <- function(pars, y0) { get_inits_X.SIP <- function(pars){with(pars$Xinits,{ c(X0, P0) })} + + +#' Plot the density of infected individuals for the SIP model +#' +#' @inheritParams xde_plot_X +#' @export +xde_plot_X.SIP = function(pars, clrs=c("black", "darkgreen"), llty=1, stable=FALSE, add_axes=TRUE){ + vars=with(pars$outputs,if(stable==TRUE){stable_orbits}else{orbits}) + + if(add_axes==TRUE) + with(vars$XH, + plot(time, 0*time, type = "n", ylim = c(0, max(H)), + ylab = "# Infected", xlab = "Time")) + + xde_lines_X(vars$XH, pars, clrs, llty) +} + + +#' Add lines for the density of infected individuals for the SIP model +#' +#' @inheritParams xde_lines_X +#' +#' @export +xde_lines_X.SIP = function(XH, pars, clrs=c("black", "darkgreen"), llty=1){ + with(XH,{ + if(pars$nStrata==1) { + lines(time, X, col=clrs[1], lty = llty[1]) + lines(time, P, col=clrs[2], lty = llty[1]) + } + if(pars$nStrata>1){ + if (length(clrs)==1) clrs=matrix(clrs, 2, pars$nStrata) + if (length(llty)==1) llty=rep(llty, pars$nStrata) + for(i in 1:pars$nStrata){ + lines(time, X[,i], col=clrs[1,i], lty = llty[i]) + lines(time, P[,i], col=clrs[2,i], lty = llty[i]) + } + } + })} + diff --git a/R/human-SIS.R b/R/human-SIS.R index 1f5be93a..680b7094 100644 --- a/R/human-SIS.R +++ b/R/human-SIS.R @@ -198,3 +198,36 @@ update_inits_X.SIS <- function(pars, y0) { get_inits_X.SIS <- function(pars){ pars$Xinits$X0 } + +#' Plot the density of infected individuals for the SIS model +#' +#' @inheritParams xde_plot_X +#' @export +xde_plot_X.SIS = function(pars, clrs="black", llty=1, stable=FALSE, add_axes=TRUE){ + vars=with(pars$outputs,if(stable==TRUE){stable_orbits}else{orbits}) + + if(add_axes==TRUE) + with(vars$XH, + plot(time, 0*time, type = "n", ylim = c(0, max(H)), + ylab = "# Infected", xlab = "Time")) + + xde_lines_X(vars$XH, pars, clrs, llty) +} + + +#' Add lines for the density of infected individuals for the SIS model +#' +#' @inheritParams xde_lines_X +#' +#' @export +xde_lines_X.SIS = function(XH, pars, clrs="black", llty=1){ + with(XH,{ + if(pars$nStrata==1) lines(time, X, col=clrs[1], lty = llty[1]) + if(model$nStrata>1){ + if (length(clrs)==1) clrs=rep(clrs, model$nStrata) + if (length(llty)==1) llty=rep(llty, model$nStrata) + for(i in 1:model$nStrata){ + lines(time, X[,i], col=clrs[i], lty = llty[i]) + } + } + })} diff --git a/R/human-interface.R b/R/human-interface.R index 3c8ce929..61de8474 100644 --- a/R/human-interface.R +++ b/R/human-interface.R @@ -102,3 +102,28 @@ HTC <- function(pars) { UseMethod("get_inits_X", pars$Xpar) } +#' Basic plotting for epidemiological models +#' +#' @param pars a [list] that defines an `exDE` model (*e.g.*, generated by `xde_setup()`) +#' @param clrs a [character] vector of colors +#' @param llty an [integer] (or integers) to set the `lty` for plotting +#' @param stable a [logical] set to FALSE for `orbits` and TRUE for `stable_orbits` +#' @param add_axes a [logical] to plot axes only if TRUE +#' +#' @export +xde_plot_X = function(pars, clrs="black", llty=1, stable=FALSE, add_axes=TRUE){ + UseMethod("xde_plot_X", pars$Xpar) +} + +#' Add lines for basic outputs of epidemiological models +#' +#' @param XH a [list] with the outputs of `exDE::parse_deout()` +#' @param pars a [list] that defines an `exDE` model (*e.g.*, generated by `xde_setup()`) +#' @param clrs a [character] vector of colors +#' @param llty an [integer] (or integers) to set the `lty` for plotting +#' +#' @export +xde_lines_X = function(XH, pars, clrs="black", llty=1){ + UseMethod("xde_lines_X", pars$Xpar) +} + diff --git a/R/plot-MYZ.R b/R/plot-MYZ.R new file mode 100644 index 00000000..6028778b --- /dev/null +++ b/R/plot-MYZ.R @@ -0,0 +1,135 @@ + +#' Plot adult mosquito population density +#' +#' @param pars a [list] that defines an `exDE` model (*e.g.*, generated by `xde_setup()`) +#' @param clrs a [character] vector of colors +#' @param llty an [integer] (or integers) to set the `lty` for plotting +#' @param stable a [logical] set to FALSE for `orbits` and TRUE for `stable_orbits` +#' @param add_axes a [logical] to plot axes only if TRUE +#' +#' @export +xde_plot_M = function(pars, clrs="darkblue", llty=1, stable=FALSE, add_axes=TRUE){ + vars=with(pars$outputs,if(stable==TRUE){stable_orbits}else{orbits}) + + if(add_axes == TRUE) with(vars$MYZ, + plot(time, 0*time, type = "n", ylim = range(0,max(M)), + ylab = "Mosquito Density", xlab = "Time")) + + xde_lines_M(vars$MYZ, pars, clrs, llty) +} + +#' Add lines for adult mosquito population density +#' +#' @param MYZ a [list] the output of `exDE::parse_deout()` +#' @param pars a [list] that defines an `exDE` model (*e.g.*, generated by `xde_setup()`) +#' @param clrs a [character] vector of colors +#' @param llty an [integer] (or integers) to set the `lty` for plotting +#' +#' @export +xde_lines_M = function(MYZ, pars, clrs="darkblue", llty=1){ + with(MYZ,{ + if(pars$nPatches==1) lines(time, M, col=clrs[1], lty = llty[1]) + if(pars$nPatches>1){ + if (length(clrs)==1) clrs=rep(clrs, pars$nPatches) + if (length(llty)==1) llty=rep(llty, pars$nPatches) + for(i in 1:pars$nPatches){ + lines(time, M[,i], col=clrs[i], lty = llty[i]) + } + } +})} + +#' Plot the density of infected and infective mosquitoes +#' +#' @param pars a [list] that defines an `exDE` model (*e.g.*, generated by `xde_setup()`) +#' @param Yclrs a [character] vector of colors for infected mosquitoes +#' @param Zclrs a [character] vector of colors for infective mosquitoes +#' @param llty an [integer] (or integers) to set the `lty` for plotting +#' @param stable a [logical] set to FALSE for `orbits` and TRUE for `stable_orbits` +#' @param add_axes a [logical] to plot axes only if TRUE +#' +#' @export +xde_plot_YZ = function(pars, Yclrs = "purple", Zclrs="darkred", llty=1, stable=FALSE, add_axes=TRUE){ + vars=with(pars$outputs,if(stable==TRUE){stable_orbits}else{orbits}) + + if(add_axes == TRUE) + with(vars$MYZ, + plot(time, 0*time, type = "n", ylim = range(0,max(Y)), + ylab = "Mosquito Density", xlab = "Time")) + + xde_lines_YZ(vars$MYZ, pars, Yclrs, Zclrs, llty) +} + +#' Add lines for the density of infected and infective mosquitoes +#' +#' @param MYZ a [list] the output of `exDE::parse_deout()` +#' @param pars a [list] that defines an `exDE` model (*e.g.*, generated by `xde_setup()`) +#' @param Yclrs a [character] vector of colors +#' @param Zclrs a [character] vector of colors +#' @param llty an [integer] (or integers) to set the `lty` for plotting +#' +#' @export +xde_lines_YZ = function(MYZ, pars, Yclrs="purple", Zclrs = "darkred", llty=1){ + with(MYZ,{ + if(pars$nPatches==1){ + lines(time, Y, col=Yclrs[1], lty = llty[1]) + lines(time, Z, col=Zclrs[1], lty = llty[1]) + } + if(pars$nPatches>1){ + if (length(Yclrs)==1) Yclrs=rep(Yclrs, pars$nPatches) + if (length(Zclrs)==1) Zclrs=rep(Zclrs, pars$nPatches) + if (length(llty)==1) llty=rep(llty, pars$nPatches) + + for(i in 1:pars$nPatches){ + lines(time, Y[,i], col=Yclrs[i], lty = llty[i]) + lines(time, Z[,i], col=Zclrs[i], lty = llty[i]) + } + } +})} + +#' Plot the fraction of infected and infective mosquitoes +#' +#' @param pars a [list] that defines an `exDE` model (*e.g.*, generated by `xde_setup()`) +#' @param Yclrs a [character] vector of colors for infected mosquitoes +#' @param Zclrs a [character] vector of colors for infective mosquitoes +#' @param llty an [integer] (or integers) to set the `lty` for plotting +#' @param stable a [logical] set to FALSE for `orbits` and TRUE for `stable_orbits` +#' @param add_axes a [logical] to plot axes only if TRUE +#' +#' @export +xde_plot_YZ_fracs = function(pars, Yclrs = "purple", Zclrs = "darkred", llty=1, stable=FALSE, add_axes=TRUE){ + vars=with(pars$outputs,if(stable==TRUE){stable_orbits}else{orbits}) + + if(add_axes == TRUE) + with(vars$MYZ, + plot(time, 0*time, type = "n", ylim = range(0,1), + ylab = "Fraction Infected", xlab = "Time")) + + xde_lines_YZ_fracs(vars$MYZ, pars, Yclrs, Zclrs, llty) +} + +#' Add lines for the fraction of infected and infective mosquitoes +#' +#' @param MYZ a [list] the output of `exDE::parse_deout()` +#' @param pars a [list] specifying the model +#' @param Yclrs a [list] of colors +#' @param Zclrs a [list] of colors +#' @param llty an [integer] (or integers) to set the `lty` for plotting +#' +#' @export +xde_lines_YZ_fracs = function(MYZ, pars, Yclrs="purple", Zclrs="darkred", llty=1){ + with(MYZ,{ + if(pars$nPatches==1) { + lines(time, y, col=Yclrs, lty = llty[1]) + lines(time, z, col=Zclrs, lty = llty[1]) + } + if(pars$nPatches>1){ + if (length(Yclrs)==1) Yclrs=rep(Yclrs, pars$nPatches) + if (length(Zclrs)==1) Zclrs=rep(Zclrs, pars$nPatches) + if (length(llty)==1) llty=rep(llty, pars$nPatches) + + for(i in 1:pars$nPatches){ + lines(time, y[,i], col=Yclrs[i], lty = llty[i]) + lines(time, z[,i], col=Zclrs[i], lty = llty[i]) + } + } +})} diff --git a/R/plot-terms.R b/R/plot-terms.R new file mode 100644 index 00000000..a8ccb81b --- /dev/null +++ b/R/plot-terms.R @@ -0,0 +1,121 @@ +#' Plot the EIR *vs.* time +#' +#' @param pars a [list] that defines an `exDE` model (*e.g.*, generated by `exDE::xde_setup()`) +#' @param clrs a [character] vector of colors +#' @param llty an [integer] (or integers) to set the `lty` for plotting +#' @param stable a [logical] set to FALSE for `orbits` and TRUE for `stable_orbits` +#' @param add_axes a [logical] to plot axes only if TRUE +#' +#' @export +xde_plot_EIR <- function(pars, clrs="black", llty=1, stable=FALSE, add_axes=TRUE){ + vars=with(pars$outputs,if(stable==TRUE){stable_orbits}else{orbits}) + + if(add_axes==TRUE) + with(vars$terms,{ + plot(time, eir, type = "n", xlab = "Time", ylab = "dEIR", ylim = range(0, eir)) + }) + + xde_lines_EIR(vars$terms, pars, clrs, llty) +} + +#' Add lines for the EIR *vs.* time +#' +#' @param terms a [list] with the outputs of `exDE::parse_deout()` +#' @param pars a [list] that defines an `exDE` model (*e.g.*, generated by `exDE::xde_setup()`) +#' @param clrs a [character] vector of colors +#' @param llty an [integer] (or integers) to set the `lty` for plotting +#' +#' @export +xde_lines_EIR <- function(terms, pars, clrs="black", llty=1){ + with(terms,{ + if(pars$nStrata==1) + lines(time, eir, col=clrs, lty = llty) + if(pars$nStrata>1){ + if(length(clrs)==1) clrs=rep(clrs, pars$nStrata) + if(length(llty)==1) llty=rep(llty, pars$nStrata) + for(i in 1:pars$nStrata) + lines(time, eir[,i], col=clrs[i], lty = llty) + } + }) +} + +#' Plot the annualized EIR *vs.* time +#' +#' @param pars a [list] that defines an `exDE` model (*e.g.*, generated by `exDE::xde_setup()`) +#' @param clrs a [character] vector of colors +#' @param llty an [integer] (or integers) to set the `lty` for plotting +#' @param stable a [logical] set to FALSE for `orbits` and TRUE for `stable_orbits` +#' @param add_axes a [logical] to plot axes only if TRUE +#' +#' @export +xde_plot_aEIR <- function(pars, clrs="black", llty=1, stable=FALSE, add_axes=TRUE){ + vars=with(pars$outputs,if(stable==TRUE){stable_orbits}else{orbits}) + + if(add_axes==TRUE) + with(vars$terms,{ + aeir = 365*eir + plot(time, aeir, type = "n", xlab = "Time", ylab = "aEIR", ylim = range(0, aeir)) + }) + xde_lines_aEIR(vars$terms, pars, clrs, llty) +} + +#' Add lines for the annualized EIR *vs.* time +#' +#' @param terms a [list] with the outputs of `parse_deout()` +#' @param pars a [list] that defines an `exDE` model (*e.g.*, generated by `exDE::xde_setup()`) +#' @param clrs a [character] vector of colors +#' @param llty an [integer] (or integers) to set the `lty` for plotting +#' +#' @export +xde_lines_aEIR <- function(terms, pars, clrs="black", llty=1){ + with(terms,{ + aeir = 365*eir + if(pars$nStrata==1) lines(time, aeir, col=clrs) + if(pars$nStrata>1){ + if (length(clrs)==1) clrs=rep(clrs, pars$nStrata) + for(i in 1:pars$nStrata) + lines(time, aeir[,i], col=clrs[i]) + } + }) +} + +#' Plot the prevalence / parasite rate (PR) from a model of human infection and immunity +#' +#' @param pars a [list] that defines an `exDE` model (*e.g.*, generated by `xde_setup()`) +#' @param stable a [logical] set to FALSE for `orbits` and TRUE for `stable_orbits` +#' @param add_axes a [logical] to plot axes only if TRUE +#' @param clrs a [character] vector of colors +#' @param llty an [integer] (or integers) that specifies `lty` for plotting +#' +#' @export +xde_plot_PR = function(pars, clrs="black", llty=1, stable=FALSE, add_axes=TRUE){ + vars=with(pars$outputs,if(stable==TRUE){stable_orbits}else{orbits}) + + if(add_axes==TRUE) + with(vars$terms, + plot(time, 0*time + 1, type = "n", ylim = c(0,1), + ylab = "# Infected", xlab = "Time")) + + xde_lines_PR(vars$terms, pars, clrs, llty) +} + +#' Add lines for the prevalence / parasite rate (PR) from a model of human infection and immunity +#' +#' @param terms a [list] with the outputs of `exDE::parse_deout()` +#' @param pars a [list] that defines an `exDE` model (*e.g.*, generated by `xde_setup()`) +#' @param clrs a [character] vector of colors +#' @param llty an [integer] (or integers) that specifies `lty` for plotting +#' +#' @export +xde_lines_PR = function(terms, pars, clrs="black", llty=1){ + with(terms,{ + if(pars$nStrata==1) lines(time, pr, col=clrs) + if(pars$nStrata>1){ + if (length(clrs)==1) clrs=rep(clrs, pars$nStrata) + for(i in 1:pars$nStrata) + lines(time, pr[,i], col=clrs[i]) + } + }) +} + + diff --git a/_pkgdown.yml b/_pkgdown.yml index 4470b177..83bb4b4e 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -87,6 +87,12 @@ reference: - dde2ode_MYZ - dde2ode_MYZ.dde - dde2ode_MYZ.ode + - xde_plot_M + - xde_lines_M + - xde_plot_YZ + - xde_lines_YZ + - xde_plot_YZ_fracs + - xde_lines_YZ_fracs - subtitle: EIP desc: | Specialized methods for NULL dynamics: a funtion generates values of Z to force human infection dynamics @@ -274,6 +280,8 @@ reference: - get_inits_X - update_inits_X - HTC + - xde_plot_X + - xde_lines_X - subtitle: trace desc: | Specialized methods for a human trace model to pass kappa as a parameter @@ -327,6 +335,8 @@ reference: - update_inits_X.SIS - make_parameters_X_SIS - HTC.SIS + - xde_plot_X.SIS + - xde_lines_X.SIS - subtitle: SIP desc: | Specialized methods for the SIP (Susceptible-Infected-Prophylaxis) model of human dynamics. @@ -346,6 +356,8 @@ reference: - update_inits_X.SIP - make_parameters_X_SIP - HTC.SIP + - xde_plot_X.SIP + - xde_lines_X.SIP - title: Human Population Dynamics desc: | Generic methods for the human demography and aging @@ -424,8 +436,7 @@ reference: - title: Exposure desc: | Methods to implement exposure models (i.e., EIR to FoI) - contents: - - F_foi + contents: F_foi - subtitle: Poisson desc: | Specialized methods the default model (Poisson) @@ -441,8 +452,7 @@ reference: - title: Travel Malaria desc: | Methods to implement exposure to malaria while traveling - contents: - - travel_malaria + contents: travel_malaria - subtitle: null model desc: | Specialized methods the null travel malaria model @@ -464,8 +474,7 @@ reference: - title: Visitors desc: | Methods to implement malaria importation through visitors - contents: - - Visitors + contents: Visitors - subtitle: null model desc: | Specialized methods for a null model for visitors (do nothing) @@ -743,3 +752,11 @@ reference: - compute_kappa - compute_kappa_i - compute_kappa_ty +- title: Plot terms + contents: + - xde_plot_EIR + - xde_lines_EIR + - xde_plot_aEIR + - xde_lines_aEIR + - xde_plot_PR + - xde_lines_PR diff --git a/man/get_inits_MYZ.RM_dde.Rd b/man/get_inits_MYZ.RM_dde.Rd index d504603d..ad63b92b 100644 --- a/man/get_inits_MYZ.RM_dde.Rd +++ b/man/get_inits_MYZ.RM_dde.Rd @@ -10,7 +10,7 @@ \item{pars}{a \link{list}} } \value{ -none +\link{numeric} } \description{ Implements \link{get_inits_MYZ} for the RM model. diff --git a/man/xde_lines_EIR.Rd b/man/xde_lines_EIR.Rd new file mode 100644 index 00000000..d44f6085 --- /dev/null +++ b/man/xde_lines_EIR.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot-terms.R +\name{xde_lines_EIR} +\alias{xde_lines_EIR} +\title{Add lines for the EIR \emph{vs.} time} +\usage{ +xde_lines_EIR(terms, pars, clrs = "black", llty = 1) +} +\arguments{ +\item{terms}{a \link{list} with the outputs of \code{exDE::parse_deout()}} + +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{exDE::xde_setup()})} + +\item{clrs}{a \link{character} vector of colors} + +\item{llty}{an \link{integer} (or integers) to set the \code{lty} for plotting} +} +\description{ +Add lines for the EIR \emph{vs.} time +} diff --git a/man/xde_lines_M.Rd b/man/xde_lines_M.Rd new file mode 100644 index 00000000..35ed4480 --- /dev/null +++ b/man/xde_lines_M.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot-MYZ.R +\name{xde_lines_M} +\alias{xde_lines_M} +\title{Add lines for adult mosquito population density} +\usage{ +xde_lines_M(MYZ, pars, clrs = "darkblue", llty = 1) +} +\arguments{ +\item{MYZ}{a \link{list} the output of \code{exDE::parse_deout()}} + +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} + +\item{clrs}{a \link{character} vector of colors} + +\item{llty}{an \link{integer} (or integers) to set the \code{lty} for plotting} +} +\description{ +Add lines for adult mosquito population density +} diff --git a/man/xde_lines_PR.Rd b/man/xde_lines_PR.Rd new file mode 100644 index 00000000..050fa4df --- /dev/null +++ b/man/xde_lines_PR.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot-terms.R +\name{xde_lines_PR} +\alias{xde_lines_PR} +\title{Add lines for the prevalence / parasite rate (PR) from a model of human infection and immunity} +\usage{ +xde_lines_PR(terms, pars, clrs = "black", llty = 1) +} +\arguments{ +\item{terms}{a \link{list} with the outputs of \code{exDE::parse_deout()}} + +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} + +\item{clrs}{a \link{character} vector of colors} + +\item{llty}{an \link{integer} (or integers) that specifies \code{lty} for plotting} +} +\description{ +Add lines for the prevalence / parasite rate (PR) from a model of human infection and immunity +} diff --git a/man/xde_lines_X.Rd b/man/xde_lines_X.Rd new file mode 100644 index 00000000..e1c4d08b --- /dev/null +++ b/man/xde_lines_X.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/human-interface.R +\name{xde_lines_X} +\alias{xde_lines_X} +\title{Add lines for basic outputs of epidemiological models} +\usage{ +xde_lines_X(XH, pars, clrs = "black", llty = 1) +} +\arguments{ +\item{XH}{a \link{list} with the outputs of \code{exDE::parse_deout()}} + +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} + +\item{clrs}{a \link{character} vector of colors} + +\item{llty}{an \link{integer} (or integers) to set the \code{lty} for plotting} +} +\description{ +Add lines for basic outputs of epidemiological models +} diff --git a/man/xde_lines_X.SIP.Rd b/man/xde_lines_X.SIP.Rd new file mode 100644 index 00000000..961faa01 --- /dev/null +++ b/man/xde_lines_X.SIP.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/human-SIP.R +\name{xde_lines_X.SIP} +\alias{xde_lines_X.SIP} +\title{Add lines for the density of infected individuals for the SIP model} +\usage{ +\method{xde_lines_X}{SIP}(XH, pars, clrs = c("black", "darkgreen"), llty = 1) +} +\arguments{ +\item{XH}{a \link{list} with the outputs of \code{exDE::parse_deout()}} + +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} + +\item{clrs}{a \link{character} vector of colors} + +\item{llty}{an \link{integer} (or integers) to set the \code{lty} for plotting} +} +\description{ +Add lines for the density of infected individuals for the SIP model +} diff --git a/man/xde_lines_X.SIS.Rd b/man/xde_lines_X.SIS.Rd new file mode 100644 index 00000000..d6a75729 --- /dev/null +++ b/man/xde_lines_X.SIS.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/human-SIS.R +\name{xde_lines_X.SIS} +\alias{xde_lines_X.SIS} +\title{Add lines for the density of infected individuals for the SIS model} +\usage{ +\method{xde_lines_X}{SIS}(XH, pars, clrs = "black", llty = 1) +} +\arguments{ +\item{XH}{a \link{list} with the outputs of \code{exDE::parse_deout()}} + +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} + +\item{clrs}{a \link{character} vector of colors} + +\item{llty}{an \link{integer} (or integers) to set the \code{lty} for plotting} +} +\description{ +Add lines for the density of infected individuals for the SIS model +} diff --git a/man/xde_lines_YZ.Rd b/man/xde_lines_YZ.Rd new file mode 100644 index 00000000..2aca4a4c --- /dev/null +++ b/man/xde_lines_YZ.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot-MYZ.R +\name{xde_lines_YZ} +\alias{xde_lines_YZ} +\title{Add lines for the density of infected and infective mosquitoes} +\usage{ +xde_lines_YZ(MYZ, pars, Yclrs = "purple", Zclrs = "darkred", llty = 1) +} +\arguments{ +\item{MYZ}{a \link{list} the output of \code{exDE::parse_deout()}} + +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} + +\item{Yclrs}{a \link{character} vector of colors} + +\item{Zclrs}{a \link{character} vector of colors} + +\item{llty}{an \link{integer} (or integers) to set the \code{lty} for plotting} +} +\description{ +Add lines for the density of infected and infective mosquitoes +} diff --git a/man/xde_lines_YZ_fracs.Rd b/man/xde_lines_YZ_fracs.Rd new file mode 100644 index 00000000..dda33f26 --- /dev/null +++ b/man/xde_lines_YZ_fracs.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot-MYZ.R +\name{xde_lines_YZ_fracs} +\alias{xde_lines_YZ_fracs} +\title{Add lines for the fraction of infected and infective mosquitoes} +\usage{ +xde_lines_YZ_fracs(MYZ, pars, Yclrs = "purple", Zclrs = "darkred", llty = 1) +} +\arguments{ +\item{MYZ}{a \link{list} the output of \code{exDE::parse_deout()}} + +\item{pars}{a \link{list} specifying the model} + +\item{Yclrs}{a \link{list} of colors} + +\item{Zclrs}{a \link{list} of colors} + +\item{llty}{an \link{integer} (or integers) to set the \code{lty} for plotting} +} +\description{ +Add lines for the fraction of infected and infective mosquitoes +} diff --git a/man/xde_lines_aEIR.Rd b/man/xde_lines_aEIR.Rd new file mode 100644 index 00000000..296d79e0 --- /dev/null +++ b/man/xde_lines_aEIR.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot-terms.R +\name{xde_lines_aEIR} +\alias{xde_lines_aEIR} +\title{Add lines for the annualized EIR \emph{vs.} time} +\usage{ +xde_lines_aEIR(terms, pars, clrs = "black", llty = 1) +} +\arguments{ +\item{terms}{a \link{list} with the outputs of \code{parse_deout()}} + +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{exDE::xde_setup()})} + +\item{clrs}{a \link{character} vector of colors} + +\item{llty}{an \link{integer} (or integers) to set the \code{lty} for plotting} +} +\description{ +Add lines for the annualized EIR \emph{vs.} time +} diff --git a/man/xde_plot_EIR.Rd b/man/xde_plot_EIR.Rd new file mode 100644 index 00000000..778c084b --- /dev/null +++ b/man/xde_plot_EIR.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot-terms.R +\name{xde_plot_EIR} +\alias{xde_plot_EIR} +\title{Plot the EIR \emph{vs.} time} +\usage{ +xde_plot_EIR(pars, clrs = "black", llty = 1, stable = FALSE, add_axes = TRUE) +} +\arguments{ +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{exDE::xde_setup()})} + +\item{clrs}{a \link{character} vector of colors} + +\item{llty}{an \link{integer} (or integers) to set the \code{lty} for plotting} + +\item{stable}{a \link{logical} set to FALSE for \code{orbits} and TRUE for \code{stable_orbits}} + +\item{add_axes}{a \link{logical} to plot axes only if TRUE} +} +\description{ +Plot the EIR \emph{vs.} time +} diff --git a/man/xde_plot_M.Rd b/man/xde_plot_M.Rd new file mode 100644 index 00000000..9c0e4c4c --- /dev/null +++ b/man/xde_plot_M.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot-MYZ.R +\name{xde_plot_M} +\alias{xde_plot_M} +\title{Plot adult mosquito population density} +\usage{ +xde_plot_M(pars, clrs = "darkblue", llty = 1, stable = FALSE, add_axes = TRUE) +} +\arguments{ +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} + +\item{clrs}{a \link{character} vector of colors} + +\item{llty}{an \link{integer} (or integers) to set the \code{lty} for plotting} + +\item{stable}{a \link{logical} set to FALSE for \code{orbits} and TRUE for \code{stable_orbits}} + +\item{add_axes}{a \link{logical} to plot axes only if TRUE} +} +\description{ +Plot adult mosquito population density +} diff --git a/man/xde_plot_PR.Rd b/man/xde_plot_PR.Rd new file mode 100644 index 00000000..af68bf05 --- /dev/null +++ b/man/xde_plot_PR.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot-terms.R +\name{xde_plot_PR} +\alias{xde_plot_PR} +\title{Plot the prevalence / parasite rate (PR) from a model of human infection and immunity} +\usage{ +xde_plot_PR(pars, clrs = "black", llty = 1, stable = FALSE, add_axes = TRUE) +} +\arguments{ +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} + +\item{clrs}{a \link{character} vector of colors} + +\item{llty}{an \link{integer} (or integers) that specifies \code{lty} for plotting} + +\item{stable}{a \link{logical} set to FALSE for \code{orbits} and TRUE for \code{stable_orbits}} + +\item{add_axes}{a \link{logical} to plot axes only if TRUE} +} +\description{ +Plot the prevalence / parasite rate (PR) from a model of human infection and immunity +} diff --git a/man/xde_plot_X.Rd b/man/xde_plot_X.Rd new file mode 100644 index 00000000..0f5be7e1 --- /dev/null +++ b/man/xde_plot_X.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/human-interface.R +\name{xde_plot_X} +\alias{xde_plot_X} +\title{Basic plotting for epidemiological models} +\usage{ +xde_plot_X(pars, clrs = "black", llty = 1, stable = FALSE, add_axes = TRUE) +} +\arguments{ +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} + +\item{clrs}{a \link{character} vector of colors} + +\item{llty}{an \link{integer} (or integers) to set the \code{lty} for plotting} + +\item{stable}{a \link{logical} set to FALSE for \code{orbits} and TRUE for \code{stable_orbits}} + +\item{add_axes}{a \link{logical} to plot axes only if TRUE} +} +\description{ +Basic plotting for epidemiological models +} diff --git a/man/xde_plot_X.SIP.Rd b/man/xde_plot_X.SIP.Rd new file mode 100644 index 00000000..269e80b2 --- /dev/null +++ b/man/xde_plot_X.SIP.Rd @@ -0,0 +1,28 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/human-SIP.R +\name{xde_plot_X.SIP} +\alias{xde_plot_X.SIP} +\title{Plot the density of infected individuals for the SIP model} +\usage{ +\method{xde_plot_X}{SIP}( + pars, + clrs = c("black", "darkgreen"), + llty = 1, + stable = FALSE, + add_axes = TRUE +) +} +\arguments{ +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} + +\item{clrs}{a \link{character} vector of colors} + +\item{llty}{an \link{integer} (or integers) to set the \code{lty} for plotting} + +\item{stable}{a \link{logical} set to FALSE for \code{orbits} and TRUE for \code{stable_orbits}} + +\item{add_axes}{a \link{logical} to plot axes only if TRUE} +} +\description{ +Plot the density of infected individuals for the SIP model +} diff --git a/man/xde_plot_X.SIS.Rd b/man/xde_plot_X.SIS.Rd new file mode 100644 index 00000000..8fe6616f --- /dev/null +++ b/man/xde_plot_X.SIS.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/human-SIS.R +\name{xde_plot_X.SIS} +\alias{xde_plot_X.SIS} +\title{Plot the density of infected individuals for the SIS model} +\usage{ +\method{xde_plot_X}{SIS}(pars, clrs = "black", llty = 1, stable = FALSE, add_axes = TRUE) +} +\arguments{ +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} + +\item{clrs}{a \link{character} vector of colors} + +\item{llty}{an \link{integer} (or integers) to set the \code{lty} for plotting} + +\item{stable}{a \link{logical} set to FALSE for \code{orbits} and TRUE for \code{stable_orbits}} + +\item{add_axes}{a \link{logical} to plot axes only if TRUE} +} +\description{ +Plot the density of infected individuals for the SIS model +} diff --git a/man/xde_plot_YZ.Rd b/man/xde_plot_YZ.Rd new file mode 100644 index 00000000..0a38c70b --- /dev/null +++ b/man/xde_plot_YZ.Rd @@ -0,0 +1,31 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot-MYZ.R +\name{xde_plot_YZ} +\alias{xde_plot_YZ} +\title{Plot the density of infected and infective mosquitoes} +\usage{ +xde_plot_YZ( + pars, + Yclrs = "purple", + Zclrs = "darkred", + llty = 1, + stable = FALSE, + add_axes = TRUE +) +} +\arguments{ +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} + +\item{Yclrs}{a \link{character} vector of colors for infected mosquitoes} + +\item{Zclrs}{a \link{character} vector of colors for infective mosquitoes} + +\item{llty}{an \link{integer} (or integers) to set the \code{lty} for plotting} + +\item{stable}{a \link{logical} set to FALSE for \code{orbits} and TRUE for \code{stable_orbits}} + +\item{add_axes}{a \link{logical} to plot axes only if TRUE} +} +\description{ +Plot the density of infected and infective mosquitoes +} diff --git a/man/xde_plot_YZ_fracs.Rd b/man/xde_plot_YZ_fracs.Rd new file mode 100644 index 00000000..9d56e556 --- /dev/null +++ b/man/xde_plot_YZ_fracs.Rd @@ -0,0 +1,31 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot-MYZ.R +\name{xde_plot_YZ_fracs} +\alias{xde_plot_YZ_fracs} +\title{Plot the fraction of infected and infective mosquitoes} +\usage{ +xde_plot_YZ_fracs( + pars, + Yclrs = "purple", + Zclrs = "darkred", + llty = 1, + stable = FALSE, + add_axes = TRUE +) +} +\arguments{ +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{xde_setup()})} + +\item{Yclrs}{a \link{character} vector of colors for infected mosquitoes} + +\item{Zclrs}{a \link{character} vector of colors for infective mosquitoes} + +\item{llty}{an \link{integer} (or integers) to set the \code{lty} for plotting} + +\item{stable}{a \link{logical} set to FALSE for \code{orbits} and TRUE for \code{stable_orbits}} + +\item{add_axes}{a \link{logical} to plot axes only if TRUE} +} +\description{ +Plot the fraction of infected and infective mosquitoes +} diff --git a/man/xde_plot_aEIR.Rd b/man/xde_plot_aEIR.Rd new file mode 100644 index 00000000..e1f3364f --- /dev/null +++ b/man/xde_plot_aEIR.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot-terms.R +\name{xde_plot_aEIR} +\alias{xde_plot_aEIR} +\title{Plot the annualized EIR \emph{vs.} time} +\usage{ +xde_plot_aEIR(pars, clrs = "black", llty = 1, stable = FALSE, add_axes = TRUE) +} +\arguments{ +\item{pars}{a \link{list} that defines an \code{exDE} model (\emph{e.g.}, generated by \code{exDE::xde_setup()})} + +\item{clrs}{a \link{character} vector of colors} + +\item{llty}{an \link{integer} (or integers) to set the \code{lty} for plotting} + +\item{stable}{a \link{logical} set to FALSE for \code{orbits} and TRUE for \code{stable_orbits}} + +\item{add_axes}{a \link{logical} to plot axes only if TRUE} +} +\description{ +Plot the annualized EIR \emph{vs.} time +}