Chi-squared tests on imputed data?

Dear all,

I am struggling with running the chi-squared analysis on the imputed data. Can someone please share the R code with me using my data below?

I know how to run the logistic regression on the imputed data but can't figure out the chi-squared analysis code for it.

## Chi-squared analysis
chisq.test(mydata$smoking_status, mydata$disease, correct = TRUE)
## multiple imputation 
df <- mydata[c("smoking_status", "disease")] 
imp1 <- mice(df, m = 5) 
## Logistic regression
fitm <- with(imp1, glm(disease~ smoking_status, data=mydata, family=binomial))

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.