v0.9.0
New features
-
set_higher_is()andextract_higher_is()store and retrieve a
direction-of-improvement attribute ("better"or"worse") for survey
variables. The attribute is used byget_diffs(show_favorability = TRUE)
to classify differences as favorable or backlash. Supports all three
calling conventions (named...args, named vector,
variable =+direction =), data frames, and tidy-select. -
set_reverse_coded()andextract_reverse_coded()store and retrieve a
reverse-coded flag for survey variables. Supports tidy-select...(bare
names and selection helpers) and thevariable =character-vector
interface. Settingreverse_coded = FALSEremoves the flag. Works on both
survey design objects and plain data frames. -
get_diffs()gainsalphaandshow_favorabilityarguments.
show_favorability = TRUEappendsfavorableandbacklashlogical
columns to the result. A difference is classified as favorable when it is
statistically significant (p < alpha, default0.05) and in the
direction indicated byhigher_ismetadata set viaset_higher_is().
When nohigher_ismetadata is set, both columns are allFALSE. The
adjusted p-value (whenpval_adjis supplied) is used for classification. -
as_survey_nonprob()gains replicate-weight (bootstrap) support via six
new arguments:repweights,type,scale,rscales,mse, and
reference_sample. Whenrepweightsis supplied, the constructor resolves
and validates the replicate weight columns and stores them in@variables.
Areference_sampleproperty is also added to thesurvey_nonprobclass
for provenance tracking. -
All
get_*()estimation functions now dispatch to the replicate-weight
variance engine when asurvey_nonprobobject hasrepweightsset.
When no repweights are supplied, a warning is emitted and the SRS
approximation is used as a fallback. Degrees of freedom for
survey_nonprobestimates always use the normal approximation (Inf). -
print()forsurvey_nonprobnow shows bootstrap replicate information
(replicate count, type, and scale) when repweights are set.