Description Usage Arguments Author(s) Examples
Gathers all information that are needed to compute survey statistics
into a design. Currently, only svydbreptotal
, svydbrepmean
,
are available for replicate statistics.
1 2 |
st |
Column name specifying the strata column. |
id |
Column name specifying the cluster column. |
wt |
Column name specifying the sampling weights column. |
repwt |
Regular expressions that matches the columns of the replicate weights. |
scale |
Scaling constant for variance. |
data |
A data frame or sql table of the survey data set. |
Charco Hui
1 2 3 4 5 6 7 8 9 10 11 12 | data(ss16hde)
hde.dbrepsurv = svydbrepdesign(wt = WGTP, repwt="wgtp[0-9]+", scale = 4/80, data = ss16hde)
hde.dbrepsurv$subset(BATH == 1)
hde.dbrepsurv$clone()
# 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.