From b08aa20dc8dbb1259c11016383d8ebfadb481943 Mon Sep 17 00:00:00 2001
From: Alex Curtis
Date: Thu, 15 Sep 2022 10:35:26 -0700
Subject: [PATCH] minor documentation edits
Minor formatting
---
DESCRIPTION | 2 +-
NEWS.md | 2 +-
R/plot_cv.r | 8 +++---
R/plot_probposobs.r | 10 +++----
R/plot_uclnegobs.r | 10 +++----
README.Rmd | 32 ++++++++++-----------
README.md | 42 ++++++++++++++++------------
docs/index.html | 16 +++++++++--
docs/news/index.html | 2 +-
docs/pkgdown.yml | 2 +-
docs/reference/plot_cv.html | 8 +++---
docs/reference/plot_probposobs.html | 10 +++----
docs/reference/plot_uclnegobs.html | 10 +++----
inst/shinyapp/obscov/html/about.html | 20 ++++++-------
inst/shinyapp/obscov/server.R | 16 +++++++----
inst/shinyapp/obscov/ui.R | 27 ++++++++----------
man/plot_cv.Rd | 8 +++---
man/plot_probposobs.Rd | 10 +++----
man/plot_uclnegobs.Rd | 10 +++----
19 files changed, 129 insertions(+), 116 deletions(-)
diff --git a/DESCRIPTION b/DESCRIPTION
index 7110e95..7ab35c1 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -2,7 +2,7 @@ Package: ObsCovgTools
Type: Package
Title: Evaluate Fishery Observer Coverage for Bycatch Estimation
Version: 3.3.0
-Date: 2022-09-14
+Date: 2022-09-15
URL: https://kacurtis.github.io/ObsCovgTools, https://github.com/kacurtis/ObsCovgTools
Depends: R (>= 3.4.0)
Imports:
diff --git a/NEWS.md b/NEWS.md
index 7c265b3..3d20f34 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,6 +1,6 @@
# ObsCovgTools 3.3.0
-* Implemented an analytical solution for CV corresponding to observer coverage, combining sim_cv_obscov.r and plot_cv_obscov.r into one function analogous to those for the other two management objectives. Elimination of Monte Carlo simulations provides major efficiency gains and increases precision of result.
+* Implemented an analytical solution for CV corresponding to observer coverage, replacing sim_cv_obscov.r and plot_cv_obscov.r with a single function analogous to those for the other two management objectives. Elimination of Monte Carlo simulations provides major efficiency gains and increases precision of results.
# ObsCovgTools 3.2.1-2
diff --git a/R/plot_cv.r b/R/plot_cv.r
index 7b1c6bc..e55ba92 100644
--- a/R/plot_cv.r
+++ b/R/plot_cv.r
@@ -24,10 +24,10 @@
#' weight) per unit effort, and (3) the specified dispersion index reflects
#' the highest level of any hierarchical variance (e.g., using dispersion index
#' at trip level if greater than that at set level). Violating these assumptions
-#' will likely result in negatively biased projections of bycatch estimation CV
-#' for a given level of observer coverage. More conservative projections can be
-#' obtained by using a higher dispersion index \code{d}. Users may want to
-#' explore uncertainty in dispersion index and in bycatch per unit effort by
+#' will likely result in negatively biased projections of the observer coverage
+#' needed to meet a specified objective. More conservative (higher) projections
+#' can be obtained by using a higher dispersion index \code{d}. Users may want
+#' to explore uncertainty in dispersion index and in bycatch per unit effort by
#' varying those inputs.
#'
#' @return If \code{targetcv} is non-zero, a list with one component:
diff --git a/R/plot_probposobs.r b/R/plot_probposobs.r
index fa2121b..f107064 100644
--- a/R/plot_probposobs.r
+++ b/R/plot_probposobs.r
@@ -39,11 +39,11 @@
#' weight) per unit effort, and (3) the specified dispersion index reflects
#' the highest level of any hierarchical variance (e.g., using dispersion index
#' at trip level if greater than that at set level). Violating these assumptions
-#' will likely result in positively biased projections of the probability of
-#' observing bycatch at a given level of observer coverage. More conservative
-#' projections can be obtained by using a higher dispersion index \code{d}. Users
-#' may want to explore uncertainty in dispersion index and in bycatch per unit
-#' effort by varying those inputs.
+#' will likely result in negatively biased projections of the observer coverage
+#' needed to meet a specified objective. More conservative (higher) projections
+#' can be obtained by using a higher dispersion index \code{d}. Users may want
+#' to explore uncertainty in dispersion index and in bycatch per unit effort by
+#' varying those inputs.
#'
#' @return A list with two components:
#' \item{targetoc}{minimum observer coverage in terms of percentage.}
diff --git a/R/plot_uclnegobs.r b/R/plot_uclnegobs.r
index c238331..c431d77 100644
--- a/R/plot_uclnegobs.r
+++ b/R/plot_uclnegobs.r
@@ -38,11 +38,11 @@
#' effort,and (3) the specified dispersion index reflects the highest level of
#' any hierarchical variance (e.g., using dispersion index at trip level if
#' greater than that at set level). Violating these assumptions will likely
-#' result in negatively biased projections of the upper confidence limit of total
-#' bycatch given zero observed. More conservative projections can be obtained by
-#' using a higher dispersion index \code{d}. Users may want to explore
-#' uncertainty in dispersion index and in bycatch per unit effort by varying
-#' those inputs.
+#' result in negatively biased projections of the observer coverage needed to
+#' meet a specified objective. More conservative (higher) projections can be
+#' obtained by using a higher dispersion index \code{d}. Users may want to
+#' explore uncertainty in dispersion index and in bycatch per unit effort by
+#' varying those inputs.
#'
#' @return A list with components:
#' \item{ucldat}{a tibble with the following fields for each coverage level included:
diff --git a/README.Rmd b/README.Rmd
index b7e1099..1cd4905 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -15,27 +15,23 @@ output:
### Description
-ObsCovgTools provides tools for evaluating fishery observer coverage,
-particularly with respect to documenting and estimating rare bycatch. Current
-functionality includes evaluating observer coverage in terms of (1) probabilities
-of observing a bycatch event and of any bycatch occurring in total effort, given
-mean bycatch rate, dispersion index (variance to mean ratio in the bycatch rate),
-and total fishery effort; (2) upper confidence limit of bycatch when none was
-observed, given total fishery effort and dispersion index; and (3) bycatch
-estimation CV (coefficient of variation), given bycatch rate, dispersion
-index, and total fishery effort. Estimates in all cases are based directly on the
-corresponding Poisson or negative binomial probability distribution.
+ObsCovgTools provides tools for evaluating fishery observer coverage, particularly with respect to documenting and estimating rare bycatch. Current functionality includes evaluating observer coverage in terms of
+
+(1) probabilities of observing a bycatch event and of any bycatch occurring in total effort, given mean bycatch rate, dispersion index (variance to mean ratio in the bycatch rate), and total fishery effort;
+(2) upper confidence limit of bycatch when none was observed, given total fishery effort and dispersion index; and
+(3) bycatch estimation CV (coefficient of variation), given bycatch rate, dispersion index, and total fishery effort.
+
+Estimates in all cases are based directly on the corresponding Poisson or negative binomial probability distribution.
### Caveat
-The current implementation of ObsCovgTools assumes that (1) observer coverage is
-representative, (2) bycatch is in terms of individuals (not weight) per unit
-effort, and (3) the specified dispersion index reflects the highest level of any
-hierarchical variance (e.g., using dispersion index at trip level if greater than
-that at set level). Violating these assumptions may result in negatively biased
-projections of observer coverage required to meet specific objectives. Users may
-want to explore uncertainty in dispersion index and in bycatch per unit effort by
-varying those inputs.
+The ObsCovgTools package assumes that
+
+* observer coverage is representative,
+* bycatch is in terms of individuals (not weight) per unit effort, and
+* the specified dispersion index reflects the highest level of any hierarchical variance (e.g., using dispersion index at trip level if greater than that at set level).
+
+Violating these assumptions may result in negatively biased projections of observer coverage required to meet specific objectives. Users may want to explore uncertainty in dispersion index and in bycatch per unit effort by varying those inputs.
### Shiny app
diff --git a/README.md b/README.md
index 54412b3..cdb3c28 100644
--- a/README.md
+++ b/README.md
@@ -14,27 +14,33 @@ date)](https://img.shields.io/github/v/release/kacurtis/ObsCovgTools)](https://g
ObsCovgTools provides tools for evaluating fishery observer coverage,
particularly with respect to documenting and estimating rare bycatch.
Current functionality includes evaluating observer coverage in terms of
-(1) probabilities of observing a bycatch event and of any bycatch
-occurring in total effort, given mean bycatch rate, dispersion index
-(variance to mean ratio in the bycatch rate), and total fishery effort;
-(2) upper confidence limit of bycatch when none was observed, given
-total fishery effort and dispersion index; and (3) bycatch estimation CV
-(coefficient of variation), given bycatch rate, dispersion index, and
-total fishery effort. Estimates in all cases are based directly on or
-simulated from the corresponding Poisson or negative binomial
-probability distribution.
+
+1. probabilities of observing a bycatch event and of any bycatch
+ occurring in total effort, given mean bycatch rate, dispersion index
+ (variance to mean ratio in the bycatch rate), and total fishery
+ effort;
+2. upper confidence limit of bycatch when none was observed, given
+ total fishery effort and dispersion index; and
+3. bycatch estimation CV (coefficient of variation), given bycatch
+ rate, dispersion index, and total fishery effort.
+
+Estimates in all cases are based directly on the corresponding Poisson
+or negative binomial probability distribution.
### Caveat
-The current implementation of ObsCovgTools assumes that (1) observer
-coverage is representative, (2) bycatch is in terms of individuals (not
-weight) per unit effort, and (3) the specified dispersion index reflects
-the highest level of any hierarchical variance (e.g., using dispersion
-index at trip level if greater than that at set level). Violating these
-assumptions may result in negatively biased projections of observer
-coverage required to meet specific objectives. Users may want to explore
-uncertainty in dispersion index and in bycatch per unit effort by
-varying those inputs.
+The ObsCovgTools package assumes that
+
+- observer coverage is representative,
+- bycatch is in terms of individuals (not weight) per unit effort, and
+- the specified dispersion index reflects the highest level of any
+ hierarchical variance (e.g., using dispersion index at trip level if
+ greater than that at set level).
+
+Violating these assumptions may result in negatively biased projections
+of observer coverage required to meet specific objectives. Users may
+want to explore uncertainty in dispersion index and in bycatch per unit
+effort by varying those inputs.
### Shiny app
diff --git a/docs/index.html b/docs/index.html
index 5212edc..9cc5546 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -109,13 +109,23 @@
Description
ObsCovgTools provides tools for evaluating fishery observer coverage, particularly with respect to documenting and estimating rare bycatch. Current functionality includes evaluating observer coverage in terms of
-(1) probabilities of observing a bycatch event and of any bycatch occurring in total effort, given mean bycatch rate, dispersion index (variance to mean ratio in the bycatch rate), and total fishery effort;
-(2) upper confidence limit of bycatch when none was observed, given total fishery effort and dispersion index; and (3) bycatch estimation CV (coefficient of variation), given bycatch rate, dispersion index, and total fishery effort. Estimates in all cases are based directly on or simulated from the corresponding Poisson or negative binomial probability distribution.
+
+- probabilities of observing a bycatch event and of any bycatch occurring in total effort, given mean bycatch rate, dispersion index (variance to mean ratio in the bycatch rate), and total fishery effort;
+- upper confidence limit of bycatch when none was observed, given total fishery effort and dispersion index; and
+- bycatch estimation CV (coefficient of variation), given bycatch rate, dispersion index, and total fishery effort.
+
+Estimates in all cases are based directly on the corresponding Poisson or negative binomial probability distribution.
Caveat
-
The current implementation of ObsCovgTools assumes that (1) observer coverage is representative, (2) bycatch is in terms of individuals (not weight) per unit effort, and (3) the specified dispersion index reflects the highest level of any hierarchical variance (e.g., using dispersion index at trip level if greater than that at set level). Violating these assumptions may result in negatively biased projections of observer coverage required to meet specific objectives. Users may want to explore uncertainty in dispersion index and in bycatch per unit effort by varying those inputs.
+
The ObsCovgTools package assumes that
+
+- observer coverage is representative,
+- bycatch is in terms of individuals (not weight) per unit effort, and
+- the specified dispersion index reflects the highest level of any hierarchical variance (e.g., using dispersion index at trip level if greater than that at set level).
+
+
Violating these assumptions may result in negatively biased projections of observer coverage required to meet specific objectives. Users may want to explore uncertainty in dispersion index and in bycatch per unit effort by varying those inputs.
diff --git a/docs/news/index.html b/docs/news/index.html
index 6ad2b99..ccad311 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -146,7 +146,7 @@ Changelog
-- Implemented an analytical solution for CV corresponding to observer coverage, combining sim_cv_obscov.r and plot_cv_obscov.r into one function analogous to those for the other two management objectives. Elimination of Monte Carlo simulations provides major efficiency gains and increases precision of result.
+- Implemented an analytical solution for CV corresponding to observer coverage, replacing sim_cv_obscov.r and plot_cv_obscov.r with a single function analogous to those for the other two management objectives. Elimination of Monte Carlo simulations provides major efficiency gains and increases precision of results.
diff --git a/docs/reference/plot_probposobs.html b/docs/reference/plot_probposobs.html
index 5bc7a4f..6d625fa 100644
--- a/docs/reference/plot_probposobs.html
+++ b/docs/reference/plot_probposobs.html
@@ -225,11 +225,11 @@ Details
weight) per unit effort, and (3) the specified dispersion index reflects
the highest level of any hierarchical variance (e.g., using dispersion index
at trip level if greater than that at set level). Violating these assumptions
-will likely result in positively biased projections of the probability of
-observing bycatch at a given level of observer coverage. More conservative
-projections can be obtained by using a higher dispersion index d
. Users
-may want to explore uncertainty in dispersion index and in bycatch per unit
-effort by varying those inputs.
+will likely result in negatively biased projections of the observer coverage
+needed to meet a specified objective. More conservative (higher) projections
+can be obtained by using a higher dispersion index d
. Users may want
+to explore uncertainty in dispersion index and in bycatch per unit effort by
+varying those inputs.
diff --git a/inst/shinyapp/obscov/server.R b/inst/shinyapp/obscov/server.R
index 3dff865..594dab5 100644
--- a/inst/shinyapp/obscov/server.R
+++ b/inst/shinyapp/obscov/server.R
@@ -154,7 +154,7 @@ server <- function(input, output, session) {
" of observing any bycatch (black dashed line) by the probability ",
"that any bycatch occurs in the given total effort.")
- HTML(paste0("", oc.ppos.out$rec, rec2, " Please review the caveats in the About tab."))
+ HTML(paste0("- ", oc.ppos.out$rec, "
- ", rec2, "
- Please review the caveats in the About tab.
"))
})
@@ -196,8 +196,11 @@ server <- function(input, output, session) {
fixedoc = as.numeric(input$fixedoc.ucl),
ymax = as.numeric(input$ymax.ucl),
silent = TRUE, as.shiny = TRUE)
-
- HTML(paste0("", oc.ucl.out$rec, "Please review the caveats in the About tab."))
+ if (oc.ucl.out$rec=="")
+ HTML(paste0("- Please review the caveats in the About tab.
"))
+ else
+ HTML(paste0("- ", oc.ucl.out$rec,
+ "
- Please review the caveats in the About tab.
"))
})
@@ -231,8 +234,11 @@ server <- function(input, output, session) {
targetcv = as.numeric(input$target.cv),
silent = TRUE, as.shiny = TRUE)
- HTML(paste0("", oc.cv.out$rec,
- " Please review the caveats in the About tab."))
+ if (oc.cv.out$rec=="")
+ HTML(paste0("- Please review the caveats in the About tab.
"))
+ else
+ HTML(paste0("- ", oc.cv.out$rec,
+ "
- Please review the caveats in the About tab.
"))
})
diff --git a/inst/shinyapp/obscov/ui.R b/inst/shinyapp/obscov/ui.R
index 2511235..304fbc8 100644
--- a/inst/shinyapp/obscov/ui.R
+++ b/inst/shinyapp/obscov/ui.R
@@ -23,13 +23,12 @@ ui <- fluidPage(
label=HTML(paste("Dispersion index for BPUE",
"",
"(Dispersion index d is variance:mean",
- " ratio of BPUE, with more skewed data having ",
+ " ratio of BPUE. More skewed data have ",
"higher d. d=2 is a relatively conservative ",
"default for rare event bycatch of marine mammals",
- " and turtles, but higher d may be needed, e.g., when ",
- "animals are highly aggregated or variation among ",
- "vessels or trips is high. Seabirds and fishes tend ",
- "to be more skewed.)",
+ " and turtles. Higher d may be needed, e.g., when ",
+ "variation among vessels or trips is high, or for ",
+ "seabirds and fishes.)",
"
")),
value="2",
placeholder="Number \u2265 1"),
@@ -58,13 +57,12 @@ ui <- fluidPage(
label=HTML(paste("Dispersion index for BPUE",
"",
"(Dispersion index d is variance:mean",
- " ratio of BPUE, with more skewed data having ",
+ " ratio of BPUE. More skewed data have ",
"higher d. d=2 is a relatively conservative ",
"default for rare event bycatch of marine mammals",
- " and turtles, but higher d may be needed, e.g., when ",
- "animals are highly aggregated or variation among ",
- "vessels or trips is high. Seabirds and fishes tend ",
- "to be more skewed.)",
+ " and turtles. Higher d may be needed, e.g., when ",
+ "variation among vessels or trips is high, or for ",
+ "seabirds and fishes.)",
"
")),
value="2",
placeholder="Number \u2265 1"),
@@ -107,13 +105,12 @@ ui <- fluidPage(
label=HTML(paste("Dispersion index for BPUE",
"",
"(Dispersion index d is variance:mean",
- " ratio of BPUE, with more skewed data having ",
+ " ratio of BPUE. More skewed data have ",
"higher d. d=2 is a relatively conservative ",
"default for rare event bycatch of marine mammals",
- " and turtles, but higher d may be needed, e.g., when ",
- "animals are highly aggregated or variation among ",
- "vessels or trips is high. Seabirds and fishes tend ",
- "to be more skewed.)",
+ " and turtles. Higher d may be needed, e.g., when ",
+ "variation among vessels or trips is high, or for ",
+ "seabirds and fishes.)",
"
")),
value="2",
placeholder="Number \u2265 1"),
diff --git a/man/plot_cv.Rd b/man/plot_cv.Rd
index 56d8385..0456f09 100644
--- a/man/plot_cv.Rd
+++ b/man/plot_cv.Rd
@@ -44,9 +44,9 @@ representative, (2) bycatch (\code{bpue}) is in terms of individuals (not
weight) per unit effort, and (3) the specified dispersion index reflects
the highest level of any hierarchical variance (e.g., using dispersion index
at trip level if greater than that at set level). Violating these assumptions
-will likely result in negatively biased projections of bycatch estimation CV
-for a given level of observer coverage. More conservative projections can be
-obtained by using a higher dispersion index \code{d}. Users may want to
-explore uncertainty in dispersion index and in bycatch per unit effort by
+will likely result in negatively biased projections of the observer coverage
+needed to meet a specified objective. More conservative (higher) projections
+can be obtained by using a higher dispersion index \code{d}. Users may want
+to explore uncertainty in dispersion index and in bycatch per unit effort by
varying those inputs.
}
diff --git a/man/plot_probposobs.Rd b/man/plot_probposobs.Rd
index efc8519..6085c78 100644
--- a/man/plot_probposobs.Rd
+++ b/man/plot_probposobs.Rd
@@ -61,9 +61,9 @@ representative, (2) bycatch (\code{bpue}) is in terms of individuals (not
weight) per unit effort, and (3) the specified dispersion index reflects
the highest level of any hierarchical variance (e.g., using dispersion index
at trip level if greater than that at set level). Violating these assumptions
-will likely result in positively biased projections of the probability of
-observing bycatch at a given level of observer coverage. More conservative
-projections can be obtained by using a higher dispersion index \code{d}. Users
-may want to explore uncertainty in dispersion index and in bycatch per unit
-effort by varying those inputs.
+will likely result in negatively biased projections of the observer coverage
+needed to meet a specified objective. More conservative (higher) projections
+can be obtained by using a higher dispersion index \code{d}. Users may want
+to explore uncertainty in dispersion index and in bycatch per unit effort by
+varying those inputs.
}
diff --git a/man/plot_uclnegobs.Rd b/man/plot_uclnegobs.Rd
index 0cef0ca..6c5ade6 100644
--- a/man/plot_uclnegobs.Rd
+++ b/man/plot_uclnegobs.Rd
@@ -76,9 +76,9 @@ representative, (2) bycatch is in terms of individuals (not weight) per unit
effort,and (3) the specified dispersion index reflects the highest level of
any hierarchical variance (e.g., using dispersion index at trip level if
greater than that at set level). Violating these assumptions will likely
-result in negatively biased projections of the upper confidence limit of total
-bycatch given zero observed. More conservative projections can be obtained by
-using a higher dispersion index \code{d}. Users may want to explore
-uncertainty in dispersion index and in bycatch per unit effort by varying
-those inputs.
+result in negatively biased projections of the observer coverage needed to
+meet a specified objective. More conservative (higher) projections can be
+obtained by using a higher dispersion index \code{d}. Users may want to
+explore uncertainty in dispersion index and in bycatch per unit effort by
+varying those inputs.
}