Description Usage Arguments Author(s) See Also Examples
Computes population mean from survey data sets with replicate weights.
1 | svydbrepmean(x, design, num, return.replicates = F)
|
x |
Name indicating the variable. |
design |
|
num |
|
return.replicates |
|
Charco Hui
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(ss16hde)
hde.dbrepsurv = svydbrepdesign(wt = WGTP, repwt="wgtp[0-9]+", scale = 4/80, data = ss16hde)
svydbrepmean(x = BATH, design = hde.dbrepsurv, num = T)
svydbrepmean(x = FS, design = hde.dbrepsurv, num = F)
svydbrepmean(x = HHT, design = hde.dbrepsurv, num = T, return.replicates = T)$replicates
coef(svydbrepmean(x = BATH, design = hde.dbrepsurv, num = T))
SE(svydbrepmean(x = BATH, design = hde.dbrepsurv, num = T))
# OR with a database connection
# library(MonetDBLite)
# library(DBI)
# library(dbplyr)
# con = dbConnect(MonetDBLite())
# dbWriteTable(con, "ss16hde", ss16hde)
# ss16hde.db = tbl(con, "ss16hde")
# hde.dbrepsurv = svydbrepdesign(wt = WGTP, repwt="wgtp[0-9]+", scale = 4/80, data = ss16hde.db)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.