jinseob2kim / jstable

Regression Tables from 'GLM', 'GEE', 'GLMM', 'Cox' and 'survey' Results.
https://jinseob2kim.github.io/jstable/
Apache License 2.0
23 stars 13 forks source link

Using glmer in TableSubgroupMultiGLM #55

Open Hejiewang opened 4 days ago

Hejiewang commented 4 days ago

I want glmer to analyze the association between gender and anemia and take pro as a random item, and I wonder if the TableSubgroupMultiGLM function can use glmer to create a table for subgroup analysis? In addition, if I use the following code for analysis, the same prompt, I want to know how to fix this question, The used jstable package is the newest. In formula.character(object, env = baseenv()) : Using formula(x) is deprecated when x is a character vector of length > 1. My code is here: China_data<-binary_China_data%>% select(SEX,NA13,NA14,nA4b,AA6,BG9,group_age,motherage,binary_anemia,pro))%>% mutate(SEX=factor(SEX,levels=c(1,2),labels=c("Male","Female")), NA13=factor(NA13,levels=c(0,1),labels=c("Improved water source","Unimproved water source")), NA14=factor(NA14,levels=c(0,1),labels=c("Improved sanitation","Unimproved sanitation")), nA4b=factor(nA4b,levels=c(0,1,2),labels=c("Primary","Secondary","Higher")), AA6=factor(AA6,levels=c(0,1),labels=c("<3","≥3")),BG9=factor(BG9,levels=c(0,1),labels=c("No secondhand smoking","Second smoking")), group_age=factor(group_age,levels=c(0,1,2,3,4),labels=c("6~11 months","12-23 mongths","24-35 months","36-47 months","48-59 months")), motherage=factor(motherage,levels=c(0,1),labels=c("No","Yes")), pro=factor(pro,levels=c(15,32,37,44,52),labels=c("Inner Mongolia","Jiangsu","Shandong","Guangdong","Guizhou"))) var<-c("AA6","BG9","group_age","pro") res<-TableSubgroupMultiGLM(binary_anemia~SEX,var_cov = c("AA6","NA14","motherage","group_age","pro"), var_subgroups = var,data=China_data,family = "binomial")

jinseob2kim commented 1 day ago

Sorry, the function can`t support glmer/lmer now. I will update the function soon.