R/as_survey.r
, R/as_survey_design.r
, R/as_survey_rep.r
, and 4 more
srvyr-se-deprecated.Rd
srvyr has updated it's standard evaluation semantics to match dplyr 0.7, so
these underscore functions are no longer required (but are still supported
for backward compatibility reasons). See se-deprecated
or the
dplyr vignette on programming (vignette("programming", package =
"dplyr")
) for more details.
as_survey_(.data, ...)
as_survey_design_(
.data,
ids = NULL,
probs = NULL,
strata = NULL,
variables = NULL,
fpc = NULL,
nest = FALSE,
check_strata = !nest,
weights = NULL,
pps = FALSE,
variance = c("HT", "YG")
)
as_survey_rep_(
.data,
variables = NULL,
repweights = NULL,
weights = NULL,
type = c("BRR", "Fay", "JK1", "JKn", "bootstrap", "successive-difference", "ACS",
"other"),
combined_weights = TRUE,
rho = NULL,
bootstrap_average = NULL,
scale = NULL,
rscales = NULL,
fpc = NULL,
fpctype = c("fraction", "correction"),
mse = getOption("survey.replicates.mse")
)
as_survey_twophase_(
.data,
id,
strata = NULL,
probs = NULL,
weights = NULL,
fpc = NULL,
subset,
method = c("full", "approx", "simple")
)
cascade_(.data, ..., .dots, .fill = NA)
a data.frame or an object from the survey package
other arguments, see other functions for details
Variables specifying cluster ids from largest level to smallest level (leaving the argument empty, NULL, 1, or 0 indicate no clusters).
Variables specifying cluster sampling probabilities.
Variables specifying strata.
Variables specifying variables to be included in survey. Defaults to all variables in .data
Variables specifying a finite population correct, see
svydesign
for more details.
If TRUE
, relabel cluster ids to enforce nesting within strata.
If TRUE
, check that clusters are nested in strata.
Variables specifying weights (inverse of probability).
"brewer" to use Brewer's approximation for PPS sampling without replacement. "overton" to use Overton's approximation. An object of class HR to use the Hartley-Rao approximation. An object of class ppsmat to use the Horvitz-Thompson estimator.
For pps without replacement, use variance="YG" for the Yates-Grundy estimator instead of the Horvitz-Thompson estimator
Variables specifying the replication weight variables
Type of replication weights
TRUE
if the repweights
already
include the sampling weights. This is usually the case.
Shrinkage factor for weights in Fay's method
For type = "bootstrap"
, if the bootstrap
weights have been averaged, gives the number of iterations averaged over.
Scaling constant for variance, see
svrepdesign
for more information.
Finite population correction information
if TRUE
, compute variances based on sum of squares
around the point estimate, rather than the mean of the replicates
list of two sets of variable names for sampling unit identifiers
bare name of a variable which specifies which observations are selected in phase 2
"full" requires (much) more memory, but gives unbiased variance estimates for
general multistage designs at both phases. "simple" or "approx" use less memory, and is correct for
designs with simple random sampling at phase one and stratified randoms sampling at phase two. See
twophase
for more details.
Used to work around non-standard evaluation. See
vignette("nse", package = "dplyr")
for details.
Value to fill in for group summaries