Deprecated SE versions of main srvyr verbs
Source: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.
Usage
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)
Arguments
- .data
a data.frame or an object from the survey package
- ...
other arguments, see other functions for details
- ids
Variables specifying cluster ids from largest level to smallest level (leaving the argument empty, NULL, 1, or 0 indicate no clusters).
- probs
Variables specifying cluster sampling probabilities.
- strata
Variables specifying strata.
- variables
Variables specifying variables to be included in survey. Defaults to all variables in .data
- fpc
Variables specifying a finite population correct, see
svydesign
for more details.- nest
If
TRUE
, relabel cluster ids to enforce nesting within strata.- check_strata
If
TRUE
, check that clusters are nested in strata.- weights
Variables specifying weights (inverse of probability).
- pps
"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.
- variance
For pps without replacement, use variance="YG" for the Yates-Grundy estimator instead of the Horvitz-Thompson estimator
- repweights
Variables specifying the replication weight variables
- type
Type of replication weights
- combined_weights
TRUE
if therepweights
already include the sampling weights. This is usually the case.- rho
Shrinkage factor for weights in Fay's method
- bootstrap_average
For
type = "bootstrap"
, if the bootstrap weights have been averaged, gives the number of iterations averaged over.- scale, rscales
Scaling constant for variance, see
svrepdesign
for more information.- fpctype
Finite population correction information
- mse
if
TRUE
, compute variances based on sum of squares around the point estimate, rather than the mean of the replicates- id
list of two sets of variable names for sampling unit identifiers
- subset
bare name of a variable which specifies which observations are selected in phase 2
- method
"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.- .dots
Used to work around non-standard evaluation. See
vignette("nse", package = "dplyr")
for details.- .fill
Value to fill in for group summaries