report icon indicating copy to clipboard operation
report copied to clipboard

svyglm

Open databeforedishonor opened this issue 3 years ago • 5 comments

I may be missing it, but do you have svyglm model support? or any survey package models? Would be a great add!

databeforedishonor avatar May 28 '21 19:05 databeforedishonor

We got survreg support. Can you give a reproducible example for a svyglm model?

bwiernik avatar May 28 '21 20:05 bwiernik

report currently doesn't support it though. Only parameters and performance do.

# data
library(survey)
set.seed(123)
data(api)
dstrat <-
  survey::svydesign(
    id = ~1,
    strata = ~stype,
    weights = ~pw,
    data = apistrat,
    fpc = ~fpc
  )

# model
mod_svyglm <-
  survey::svyglm(
    formula = sch.wide ~ ell + meals + mobility,
    design = dstrat,
    family = quasibinomial()
  )

# report
library(report)
report(mod_svyglm)
#> Warning in logLik.svyglm(x, ...): svyglm not fitted by maximum likelihood.
#> Warning in logLik.svyglm(x): svyglm not fitted by maximum likelihood.
#> Error in UseMethod("format_value"): no applicable method for 'format_value' applied to an object of class "NULL"

Created on 2021-05-28 by the reprex package (v2.0.0)

IndrajeetPatil avatar May 28 '21 20:05 IndrajeetPatil

(I said, survreg not svyglm)

bwiernik avatar May 28 '21 20:05 bwiernik

My bad!

but do you have svyglm model support?

No, we currently don't support svyglm. But, until that support is added, survreg is an option.

IndrajeetPatil avatar May 28 '21 20:05 IndrajeetPatil

Thanks!

databeforedishonor avatar Jun 08 '21 15:06 databeforedishonor