arsenal
arsenal copied to clipboard
chi-square p-values of "<0.001" when only one observed factor category
When you compare groups in columns using a chi-square test and there is only one observed level of a factor outcome, a p-value of "<0.001" is shown. This should be shown as "NA", blank, or something similar. When you specify Fisher's exact test, a blank p-value is correctly reported in this situation.
comptable <- tableby(period ~ rph_doseinc, data=retro, total=FALSE, cat.test="chisq") summary(comptable, text=TRUE)