strengejacke / sjPlot

sjPlot - Data Visualization for Statistics in Social Science

Home Page:https://strengejacke.github.io/sjPlot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tab_model not working with svyglm models in R 4.2.3

LilyFG opened this issue · comments

commented

Hi there,

I am having trouble rerunning some old code printing svyglm models (survey package) with tab_model since updating R to 4.2.3. Here is a reproducible example using the example from the svyglm manual https://rdrr.io/cran/survey/man/svyglm.html

Note that I did not get this error on an old machine running R 4.0.1, even with the same package versions (sjPlot: 2.8.13, survey: 4.1.1).

library(sjPlot)
library(survey)

data(api)

dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc)
dclus2<-svydesign(id=~dnum+snum, weights=~pw, data=apiclus2)
rstrat<-as.svrepdesign(dstrat)
rclus2<-as.svrepdesign(dclus2)

tab_model(svyglm(api00~ell+meals+mobility, design=dstrat))

Error message:
Error in match.arg(method, choices = c("wald", "residual", "normal", "likelihood")) :
'arg' should be one of “wald”, “residual”, “normal”, “likelihood”

Any ideas would be hugely appreciated, thank you in advance!