Description Usage Arguments Author(s) See Also Examples
View source: R/svydbquantile.R
Compute quantiles from survey data sets.
1 | svydbquantile(x, quantiles = 0.5, design)
|
x |
Name indicating the variable. |
quantiles |
Quantiles to estimate, a number, or a vector of numbers for multiple quantiles. Default to 0.5. |
design |
|
Charco Hui
1 2 3 4 5 6 7 8 9 10 11 12 | data(nhane)
nh.dbsurv = svydbdesign(st = SDMVSTRA, wt = WTMEC2YR, id = SDMVPSU, data = nhane)
svydbquantile(x = Age, quantile = 0.5, design = nh.dbsurv)
svydbquantile(x = Age, quantile = c(0.25, 0.75), design = nh.dbsurv)
# OR with a database connection
# library(MonetDBLite)
# library(DBI)
# library(dbplyr)
# con = dbConnect(MonetDBLite())
# dbWriteTable(con, "nhane", nhane)
# nhane.db = tbl(con, "nhane")
# nh.dbsurv = svydbdesign(st = SDMVSTRA, wt = WTMEC2YR, id = SDMVPSU, data = nhane.db)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.