英文:
How to add p-values to odds ratio with logistic svyglm()?
问题
我正在使用以下代码来获取我的svyglm模型的比值比和置信区间。
model <- svyglm(y ~ x + covariate,
design = survey_design,
family = quasibinomial(link = logit))
exp(cbind(OR = coef(model), confint(model)))
当我使用 summary
时,我会得到 p 值,但这会返回需要进行指数化的系数。如何将这些 p 值添加到比值比和置信区间表中?
英文:
I am using the code below to get odds ratios and confidence intervals for my svyglm model.
model <- svyglm(y ~ x + covariate,
design = survey_design,
family = quasibinomial(link = logit))
exp(cbind(OR = coef(model), confint(model)))
I get the p-values when I use summary
, however, this returns coefficients that then need to be exponentiated. How do I add these p-values to the odds ratio and confint table?
答案1
得分: 2
有一个用于 broom 包中的 svlglm 对象的整洁方法。
library(broom)
tidy(model, expo=TRUE, conf.int=TRUE)
英文:
There's a tidy method for svlglm objects in the broom package.
library(broom)
tidy(model, expo=TRUE, conf.int=TRUE)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论