Description Usage Arguments Author(s) See Also Examples
Computes population total from survey data sets.
1 2 | svydbtotal(x, num, design, return.total = F,
lonely.psu = getOption("svydb.lonely.psu"), ...)
|
x |
Name indicating the variable. |
num |
|
design |
|
return.total |
|
Charco Hui
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(nhane)
nh.dbsurv = svydbdesign(st = SDMVSTRA, wt = WTMEC2YR, id = SDMVPSU, data = nhane)
svydbtotal(x = DirectChol, design = nh.dbsurv, num = T)
svydbtotal(x = Race3, design = nh.dbsurv, num = F)
svydbtotal(x = DirectChol, design = nh.dbsurv, num = T, return.total = T)
coef(svydbtotal(x = DirectChol, design = nh.dbsurv, num = T))
SE(svydbtotal(x = DirectChol, design = nh.dbsurv, num = T))
# 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.