Description Usage Arguments Author(s) See Also Examples
Linear models for survey data sets.
1 |
formula |
Model formula. |
design |
|
Charco Hui
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | data(nhane)
nh.dbsurv = svydbdesign(st = SDMVSTRA, wt = WTMEC2YR, id = SDMVPSU, data = nhane)
svydblm(DirectChol ~ Age + BMI + factor(Gender), design = nh.dbsurv)
svydblm(DirectChol ~ Age + BMI, design = nh.dbsurv$subset(Race3 == 3))
coef(svydblm(DirectChol ~ Age + BMI, design = nh.dbsurv))
SE(svydblm(DirectChol ~ Age + BMI, design = nh.dbsurv))
vcov(svydblm(DirectChol ~ Age + BMI, design = nh.dbsurv))
head(residuals(svydblm(DirectChol ~ Age + BMI, design = nh.dbsurv)))
summary(svydblm(DirectChol ~ Age + BMI, design = nh.dbsurv))
predict(svydblm(DirectChol ~ Age + BMI, design = nh.dbsurv),
newdata = data.frame(Age = 1:3, BMI = 4:6))
# 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.