Skip to content

Commit

Permalink
Fixing CRAN notes about Rd syntax requirements for itemize/item.
Browse files Browse the repository at this point in the history
  • Loading branch information
bschneidr committed Mar 10, 2024
1 parent c92373a commit 296c960
Show file tree
Hide file tree
Showing 24 changed files with 401 additions and 415 deletions.
48 changes: 24 additions & 24 deletions R/as_bootstrap_design.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@
#' on its applicability to the sampling method used for the survey.
#' The available types are the following: \cr
#' \itemize{
#' \item{\strong{"Rao-Wu-Yue-Beaumont"} (the default): }{\cr
#' The bootstrap method of Beaumont and Émond (2022), which is a generalization of the Rao-Wu-Yue bootstrap,
#' and is applicable to a wide variety of designs, including single-stage and multistage stratified designs.
#' The design may have different sampling methods used at different stages.
#' Each stage of sampling may potentially be PPS (i.e., use unequal probabilities), with or without replacement,
#' and may potentially use Poisson sampling. \cr \cr
#' For a stratum with a fixed sample size of \eqn{n} sampling units, resampling in each replicate resamples \eqn{(n-1)} sampling units with replacement.}
#' \item{\strong{"Rao-Wu"}: }{\cr
#' The basic Rao-Wu \eqn{(n-1)} bootstrap method, which is only applicable to single-stage designs or
#' multistage designs where the first-stage sampling fractions are small (and can thus be ignored).
#' Accommodates stratified designs. All sampling within a stratum must be simple random sampling with or without replacement,
#' although the first-stage sampling is effectively treated as sampling without replacement.}
#' \item{\strong{"Preston"}: }{\cr
#' Preston's multistage rescaled bootstrap, which is applicable to single-stage designs or multistage designs
#' with arbitrary sampling fractions. Accommodates stratified designs. All sampling within a stratum must be
#' simple random sampling with or without replacement.}
#' \item{\strong{"Canty-Davison"}: }{\cr
#' The Canty-Davison bootstrap, which is only applicable to single-stage designs, with arbitrary sampling fractions.
#' Accommodates stratified designs. All sampling with a stratum must be simple random sampling with or without replacement.}
#' \item \strong{"Rao-Wu-Yue-Beaumont"} (the default): \cr
#' The bootstrap method of Beaumont and Émond (2022), which is a generalization of the Rao-Wu-Yue bootstrap,
#' and is applicable to a wide variety of designs, including single-stage and multistage stratified designs.
#' The design may have different sampling methods used at different stages.
#' Each stage of sampling may potentially be PPS (i.e., use unequal probabilities), with or without replacement,
#' and may potentially use Poisson sampling. \cr \cr
#' For a stratum with a fixed sample size of \eqn{n} sampling units, resampling in each replicate resamples \eqn{(n-1)} sampling units with replacement.
#' \item \strong{"Rao-Wu"}: \cr
#' The basic Rao-Wu \eqn{(n-1)} bootstrap method, which is only applicable to single-stage designs or
#' multistage designs where the first-stage sampling fractions are small (and can thus be ignored).
#' Accommodates stratified designs. All sampling within a stratum must be simple random sampling with or without replacement,
#' although the first-stage sampling is effectively treated as sampling without replacement.
#' \item \strong{"Preston"}: \cr
#' Preston's multistage rescaled bootstrap, which is applicable to single-stage designs or multistage designs
#' with arbitrary sampling fractions. Accommodates stratified designs. All sampling within a stratum must be
#' simple random sampling with or without replacement.
#' \item \strong{"Canty-Davison"}: \cr
#' The Canty-Davison bootstrap, which is only applicable to single-stage designs, with arbitrary sampling fractions.
#' Accommodates stratified designs. All sampling with a stratum must be simple random sampling with or without replacement.
#' }
#' @param replicates Number of bootstrap replicates (should be as large as possible, given computer memory/storage limitations).
#' A commonly-recommended default is 500.
Expand All @@ -42,11 +42,11 @@
#' Accepts a vector with length equal to the number of stages of sampling.
#' Each element should be one of the following: \cr
#' \itemize{
#' \item{"SRSWOR"}{ - Simple random sampling, without replacement}
#' \item{"SRSWR"}{ - Simple random sampling, with replacement}
#' \item{"PPSWOR"}{ - Unequal probabilities of selection, without replacement}
#' \item{"PPSWR"}{ - Unequal probabilities of selection, with replacement}
#' \item{"Poisson"}{ - Poisson sampling: each sampling unit is selected into the sample at most once, with potentially different probabilities of inclusion for each sampling unit.}
#' \item \code{"SRSWOR"} - Simple random sampling, without replacement
#' \item \code{"SRSWR"} - Simple random sampling, with replacement
#' \item \code{"PPSWOR"} - Unequal probabilities of selection, without replacement
#' \item \code{"PPSWR"} - Unequal probabilities of selection, with replacement
#' \item \code{"Poisson"} - Poisson sampling: each sampling unit is selected into the sample at most once, with potentially different probabilities of inclusion for each sampling unit.
#' }
#' @return
#' A replicate design object, with class \code{svyrep.design}, which can be used with the usual functions,
Expand Down
12 changes: 4 additions & 8 deletions R/as_jackknife_design.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,27 @@
#' replicate weight adjustment factor.
#' Available options for \code{adj_method} include:
#' \itemize{
#' \item{"variance-stratum-psus" (the default)}{
#' \item \code{"variance-stratum-psus"} (the default) \cr
#' The replicate weight adjustment for a unit
#' is based on the number of PSUs in its variance stratum.
#' }
#' \item{"variance-units"}{
#' \item \code{"variance-units"} \cr
#' The replicate weight adjustment for a unit
#' is based on the number of variance units
#' in its variance stratum.
#' }
#' }
#' See the section "Adjustment and Scale Methods" for details.
#' @param scale_method Specifies how to calculate the
#' scale factor for each replicate.
#' Available options for \code{scale_method} include:
#' \itemize{
#' \item{"variance-stratum-psus"}{
#' \item \code{"variance-stratum-psus"} \cr
#' The scale factor for a variance unit
#' is based on its number of PSUs compared
#' to the number of PSUs in its variance stratum.
#' }
#' \item{"variance-units"}{
#' \item \code{"variance-units"} \cr
#' The scale factor for a variance unit is
#' based on the number of variance units in
#' its variance stratum.
#' }
#' }
#' See the section "Adjustment and Scale Methods" for details.
#' @param var_strat Specifies the name of a variable
Expand Down
47 changes: 23 additions & 24 deletions R/fays_generalized_replication.R
Original file line number Diff line number Diff line change
Expand Up @@ -262,30 +262,29 @@ make_fays_gen_rep_factors <- function(
#' detailed description of each variance estimator.
#' Options include:
#' \itemize{
#' \item{\strong{"Yates-Grundy"}: }{The Yates-Grundy variance estimator based on
#' first-order and second-order inclusion probabilities.}
#' \item{\strong{"Horvitz-Thompson"}: }{The Horvitz-Thompson variance estimator based on
#' first-order and second-order inclusion probabilities.}
#' \item{\strong{"Poisson Horvitz-Thompson"}: }{The Horvitz-Thompson variance estimator
#' based on assuming Poisson sampling, with first-order inclusion probabilities
#' inferred from the sampling probabilities of the survey design object.}
#' \item{\strong{"Stratified Multistage SRS"}: }{The usual stratified multistage variance estimator
#' based on estimating the variance of cluster totals within strata at each stage.}
#' \item{\strong{"Ultimate Cluster"}: }{The usual variance estimator based on estimating
#' the variance of first-stage cluster totals within first-stage strata.}
#' \item{\strong{"Deville-1"}: }{A variance estimator for unequal-probability
#' sampling without replacement, described in Matei and Tillé (2005)
#' as "Deville 1".}
#' \item{\strong{"Deville-2"}: }{A variance estimator for unequal-probability
#' sampling without replacement, described in Matei and Tillé (2005)
#' as "Deville 2".}
#' \item{\strong{"Deville-Tille": }}{A variance estimator useful
#' for balanced sampling designs, proposed by Deville and Tillé (2005).}
#' \item{\strong{"SD1"}: }{The non-circular successive-differences variance estimator described by Ash (2014),
#' sometimes used for variance estimation for systematic sampling.}
#' \item{\strong{"SD2"}: }{The circular successive-differences variance estimator described by Ash (2014).
#' This estimator is the basis of the "successive-differences replication" estimator commonly used
#' for variance estimation for systematic sampling.}
#' \item \strong{"Yates-Grundy"}: \cr The Yates-Grundy variance estimator based on
#' first-order and second-order inclusion probabilities.
#' \item \strong{"Horvitz-Thompson"}: \cr The Horvitz-Thompson variance estimator based on
#' first-order and second-order inclusion probabilities.
#' \item \strong{"Poisson Horvitz-Thompson"}: \cr The Horvitz-Thompson variance estimator
#' based on assuming Poisson sampling, with first-order inclusion probabilities
#' inferred from the sampling probabilities of the survey design object.
#' \item \strong{"Stratified Multistage SRS"}: \cr The usual stratified multistage variance estimator
#' based on estimating the variance of cluster totals within strata at each stage.
#' \item \strong{"Ultimate Cluster"}: \cr The usual variance estimator based on estimating
#' the variance of first-stage cluster totals within first-stage strata.
#' \item \strong{"Deville-1"}: \cr A variance estimator for unequal-probability
#' sampling without replacement, described in Matei and Tillé (2005)
#' as "Deville 1".
#' \item \strong{"Deville-2"}: \cr A variance estimator for unequal-probability
#' sampling without replacement, described in Matei and Tillé (2005) as "Deville 2".
#' \item \strong{"Deville-Tille": } \cr A variance estimator useful
#' for balanced sampling designs, proposed by Deville and Tillé (2005).
#' \item \strong{"SD1"}: \cr The non-circular successive-differences variance estimator described by Ash (2014),
#' sometimes used for variance estimation for systematic sampling.
#' \item\strong{"SD2"}: \cr The circular successive-differences variance estimator described by Ash (2014).
#' This estimator is the basis of the "successive-differences replication" estimator commonly used
#' for variance estimation for systematic sampling.
#' }
#' @param aux_var_names (Only used if \code{variance_estimator = "Deville-Tille")}.
#' A vector of the names of auxiliary variables used in sampling.
Expand Down
47 changes: 23 additions & 24 deletions R/generalized_bootstrap.R
Original file line number Diff line number Diff line change
Expand Up @@ -259,30 +259,29 @@ make_gen_boot_factors <- function(Sigma, num_replicates, tau = "auto", exact_vco
#' detailed description of each variance estimator.
#' Options include:
#' \itemize{
#' \item{\strong{"Yates-Grundy"}: }{The Yates-Grundy variance estimator based on
#' first-order and second-order inclusion probabilities.}
#' \item{\strong{"Horvitz-Thompson"}: }{The Horvitz-Thompson variance estimator based on
#' first-order and second-order inclusion probabilities.}
#' \item{\strong{"Poisson Horvitz-Thompson"}: }{The Horvitz-Thompson variance estimator
#' based on assuming Poisson sampling, with first-order inclusion probabilities
#' inferred from the sampling probabilities of the survey design object.}
#' \item{\strong{"Stratified Multistage SRS"}: }{The usual stratified multistage variance estimator
#' based on estimating the variance of cluster totals within strata at each stage.}
#' \item{\strong{"Ultimate Cluster"}: }{The usual variance estimator based on estimating
#' the variance of first-stage cluster totals within first-stage strata.}
#' \item{\strong{"Deville-1"}: }{A variance estimator for unequal-probability
#' sampling without replacement, described in Matei and Tillé (2005)
#' as "Deville 1".}
#' \item{\strong{"Deville-2"}: }{A variance estimator for unequal-probability
#' sampling without replacement, described in Matei and Tillé (2005)
#' as "Deville 2".}
#' \item{\strong{"Deville-Tille": }}{A variance estimator useful
#' for balanced sampling designs, proposed by Deville and Tillé (2005).}
#' \item{\strong{"SD1"}: }{The non-circular successive-differences variance estimator described by Ash (2014),
#' sometimes used for variance estimation for systematic sampling.}
#' \item{\strong{"SD2"}: }{The circular successive-differences variance estimator described by Ash (2014).
#' This estimator is the basis of the "successive-differences replication" estimator commonly used
#' for variance estimation for systematic sampling.}
#' \item \strong{"Yates-Grundy"}: \cr The Yates-Grundy variance estimator based on
#' first-order and second-order inclusion probabilities.
#' \item \strong{"Horvitz-Thompson"}: \cr The Horvitz-Thompson variance estimator based on
#' first-order and second-order inclusion probabilities.
#' \item \strong{"Poisson Horvitz-Thompson"}: \cr The Horvitz-Thompson variance estimator
#' based on assuming Poisson sampling, with first-order inclusion probabilities
#' inferred from the sampling probabilities of the survey design object.
#' \item \strong{"Stratified Multistage SRS"}: \cr The usual stratified multistage variance estimator
#' based on estimating the variance of cluster totals within strata at each stage.
#' \item \strong{"Ultimate Cluster"}: \cr The usual variance estimator based on estimating
#' the variance of first-stage cluster totals within first-stage strata.
#' \item \strong{"Deville-1"}: \cr A variance estimator for unequal-probability
#' sampling without replacement, described in Matei and Tillé (2005)
#' as "Deville 1".
#' \item \strong{"Deville-2"}: \cr A variance estimator for unequal-probability
#' sampling without replacement, described in Matei and Tillé (2005) as "Deville 2".
#' \item \strong{"Deville-Tille": } \cr A variance estimator useful
#' for balanced sampling designs, proposed by Deville and Tillé (2005).
#' \item \strong{"SD1"}: \cr The non-circular successive-differences variance estimator described by Ash (2014),
#' sometimes used for variance estimation for systematic sampling.
#' \item\strong{"SD2"}: \cr The circular successive-differences variance estimator described by Ash (2014).
#' This estimator is the basis of the "successive-differences replication" estimator commonly used
#' for variance estimation for systematic sampling.
#' }
#' @param aux_var_names (Only used if \code{variance_estimator = "Deville-Tille")}.
#' A vector of the names of auxiliary variables used in sampling.
Expand Down
58 changes: 29 additions & 29 deletions R/libraries_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,30 @@
#' \cr \cr
#' Identifier variables and survey response status:
#' \itemize{
#' \item{FSCSKEY: }{A unique identifier for libraries.}
#' \item{LIBNAME: }{The name of the library}
#' \item{RESPONSE_STATUS: }{Response status for the Public Library Survey:
#' indicates whether the library was a respondent, nonrespondent, or was closed.}
#' \item FSCSKEY: A unique identifier for libraries.
#' \item LIBNAME: The name of the library.
#' \item RESPONSE_STATUS: Response status for the Public Library Survey:
#' indicates whether the library was a respondent, nonrespondent, or was closed.
#' }
#' Numeric summaries:
#' \itemize{
#' \item{TOTCIR: }{Total circulation}
#' \item{VISITS: }{Total visitors}
#' \item{REGBOR: }{Total number of registered users}
#' \item{TOTSTAFF: }{Total staff (measured in full-time equivalent staff)}
#' \item{LIBRARIA: }{Total librarians (measured in full-time equivalent staff)}
#' \item{TOTOPEXP: }{Total operating expenses}
#' \item{TOTINCM: }{Total income}
#' \item{BRANLIB: }{Number of library branches}
#' \item{CENTLIB: }{Number of central library locations}
#' \item TOTCIR: Total circulation
#' \item VISITS: Total visitors
#' \item REGBOR: Total number of registered users
#' \item TOTSTAFF: Total staff (measured in full-time equivalent staff)
#' \item LIBRARIA: Total librarians (measured in full-time equivalent staff)
#' \item TOTOPEXP: Total operating expenses
#' \item TOTINCM: Total income
#' \item BRANLIB: Number of library branches
#' \item CENTLIB: Number of central library locations
#' }
#' Location:
#' \itemize{
#' \item{LONGITUD: }{Geocoded longitude (in WGS84 CRS)}
#' \item{LATITUD: }{Geocoded latitude (in WGS84 CRS)}
#' \item{STABR: }{Two-letter state abbreviation}
#' \item{CBSA: }{Five-digit identifer for a core-based statistical area (CBSA)}
#' \item{MICROF: }{Flag for a metropolitan or micropolitan statistical area}
#' \item LONGITUD: Geocoded longitude (in WGS84 CRS)
#' \item LATITUD: Geocoded latitude (in WGS84 CRS)
#' \item STABR: Two-letter state abbreviation
#' \item CBSA: Five-digit identifer for a core-based statistical area (CBSA)
#' \item MICROF: Flag for a metropolitan or micropolitan statistical area
#'
#' }
#' @references
Expand All @@ -67,13 +67,13 @@
#' Includes the same variables as \code{library_census},
#' but with additional design variables.
#' \itemize{
#' \item{PSU_ID: }{A unique identifier for primary sampling units}
#' \item{SSU_ID: }{A unique identifer for secondary sampling units}
#' \item{SAMPLING_PROB: }{Overall inclusion probability}
#' \item{PSU_SAMPLING_PROB: }{Inclusion probability for the PSU}
#' \item{SSU_SAMPLING_PROB: }{Inclusion probability for the SSU}
#' \item{PSU_POP_SIZE: }{The number of PSUs in the population}
#' \item{SSU_POP_SIZE: }{The number of population SSUs within the PSU}
#' \item PSU_ID: A unique identifier for primary sampling units
#' \item SSU_ID: A unique identifer for secondary sampling units
#' \item SAMPLING_PROB: Overall inclusion probability
#' \item PSU_SAMPLING_PROB: Inclusion probability for the PSU
#' \item SSU_SAMPLING_PROB: Inclusion probability for the SSU
#' \item PSU_POP_SIZE: The number of PSUs in the population
#' \item SSU_POP_SIZE: The number of population SSUs within the PSU
#' }
"library_multistage_sample"

Expand All @@ -86,9 +86,9 @@
#' Includes the same variables as \code{library_census},
#' but with additional design variables.
#' \itemize{
#' \item{SAMPLING_STRATUM: }{Unique identifier for sampling strata}
#' \item{STRATUM_POP_SIZE: }{The population size in the stratum}
#' \item{SAMPLING_SORT_ORDER: }{The sort order used before selecting a random systematic sample}
#' \item{SAMPLING_PROB: }{Overall inclusion probability}
#' \item SAMPLING_STRATUM: Unique identifier for sampling strata
#' \item STRATUM_POP_SIZE: The population size in the stratum
#' \item SAMPLING_SORT_ORDER: The sort order used before selecting a random systematic sample
#' \item SAMPLING_PROB: Overall inclusion probability
#' }
"library_stsys_sample"
Loading

0 comments on commit 296c960

Please sign in to comment.