-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Seems like an easy mistake to make, and currently it just silently gives you the median.
library(srvyr)
data(api, package = "survey")
dstrata <- apistrat %>%
as_survey(strata = stype, weights = pw)
dstrata %>%
summarize(
x = survey_median(api99, quantiles = 0.2),
median = survey_median(api99),
twentith = survey_quantile(api99, quantiles = 0.2)
)
#> # A tibble: 1 × 6
#> x x_se median median_se twentith_q20 twentith_q20_se
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 631 17.5 631 17.5 504 10.6
Metadata
Metadata
Assignees
Labels
No labels