Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: SampleSelectR
Title: Randomly select samples for various probability-based methods
Title: Randomly Select Samples for Various Probability-Based Methods
Version: 1.0.0
Authors@R: c(
person("Stephanie", "Zimmer", , "sazimmer@rti.org", role = c("aut", "cre")),
Expand All @@ -13,7 +13,7 @@ Description: Randomly select samples with SRS, systematic, and various PPS metho
License: GPL (>= 3)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
RoxygenNote: 7.3.3
Depends:
R (>= 4.1.0)
Imports:
Expand Down
16 changes: 8 additions & 8 deletions R/allocate.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
#' \item Optimal allocation
#' \itemize{
#' \item cost-constrained \[\code{N.h, S.h, c.h, cost, allocation = "optimal"}\]
#' \deqn{n_h = (Cc_0) \times \frac{N_h S_h / \sqrt{c_h}}{\sum\limits_{h=1}^H N_h S_h \sqrt{c_h}}}
#' \deqn{n_h = (C-c_0) \times \frac{N_h S_h / \sqrt{c_h}}{\sum\limits_{h=1}^H N_h S_h \sqrt{c_h}}}
#' where \cr
#' \eqn{c_h}: cost per unit in stratum \emph{h} (function input is \code{c.h}), and \cr
#' \eqn{(C c_0)}: total variable cost (function input is \code{cost})
#' \eqn{(C - c_0)}: total variable cost (function input is \code{cost})
#' \item precision-constrained \[\code{N.h, S.h, c.h, variance, allocation = "optimal"}\]
#' \deqn{n_h = N_h S_h / \sqrt{c_h} \times \frac{\sum\limits_{h=1}^H N_h S_h \sqrt{c_h}}{V_0 \left(\sum\limits_{h=1}^H N_h \right)^2 + \sum\limits_{h=1}^H N_h S_h^2}}
#' where \cr
Expand All @@ -36,11 +36,11 @@
#'
#' \tabular{lllllllll}{
#' \strong{allocation} \tab \strong{N.h} \tab \strong{n.samp} \tab \strong{S.h} \tab \strong{c.h} \tab \strong{cost} \tab \strong{variance} \tab \strong{lbound} \tab \strong{power} \cr
#' proportional \tab \tab \tab \tab \tab \tab \tab \tab \cr
#' power \tab \tab \tab \tab \tab \tab \tab \tab \cr
#' neyman \tab \tab \tab \tab \tab \tab \tab \tab \cr
#' optimal: cost-constrained \tab \tab \tab \tab \tab \tab \tab \tab \cr
#' optimal: precision-constrained \tab \tab \tab \tab \tab \tab \tab \tab
#' proportional \tab X \tab X \tab \tab \tab \tab \tab X \tab \cr
#' power \tab X \tab X \tab \tab \tab \tab \tab X \tab X\cr
#' neyman \tab X \tab X \tab X \tab X \tab \tab \tab X \tab \cr
#' optimal: cost-constrained \tab X \tab \tab X \tab X \tab X \tab \tab X \tab \cr
#' optimal: precision-constrained \tab X \tab \tab X \tab X \tab \tab X \tab X \tab
#' }
#'
#' @param allocation type of allocation, must be one of \code{"proportional"}, \code{"power"}, \code{"neyman"}, or \code{"optimal"}.
Expand All @@ -52,7 +52,7 @@
#' required for the following allocation types: Neyman, and optimal, and \code{NULL} otherwise.
#' @param c.h vector of cost per unit in stratum h (positive values same length as \code{N.h}) (\eqn{c_h}). \cr\cr
#' required for the optimal allocation only, and \code{NULL} otherwise.
#' @param cost total variable cost (positive value) \eqn{(C c_0)}. \cr\cr
#' @param cost total variable cost (positive value) \eqn{(C - c_0)}. \cr\cr
#' required for the cost-constrained optimal allocation only, and \code{NULL} otherwise.
#' @param variance fixed variance target for estimated mean (positive value) (\eqn{V_0}). \cr\cr
#' required for the precision-constrained optimal allocation only, and \code{NULL} otherwise.
Expand Down
3 changes: 2 additions & 1 deletion man/SampleSelectR-package.Rd

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

18 changes: 9 additions & 9 deletions man/allocate.Rd

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

Loading