vcdExtra
vcdExtra copied to clipboard
CMHTest type="cor" supresses p-value and df
When I run CMHtest(as.formula(fStr), data=dm, types = c("cor"), overall = T) the $ALL element lacks a p-value and a d.f. Any particular reason why?
Example:
CMHtest(Freq~right+left|gender, data=VisualAcuity, overall=T, type="cor", details=T) lacks a p-value but CMHtest(Freq~right+left|gender, data=VisualAcuity, overall=T, type="cor", details=T) doesn't.
Your two examples are identical, as far as I can see.
Pedantic: you should use types="cor" not type="cor" or types=c("cor"), and =TRUE, not =T.
If you omit the types=arg, the function does give the df`` and Prob` column in the result. I don't have an immediate explanation for this.
That's primarily because I didn't proof the post carefully. My apologies.
The types= version CMHtest(Freq~right+left|gender, data=VisualAcuity, types=c("cor"), overall=TRUE) produces
....
$ALL
Cochran-Mantel-Haenszel Statistics for right by left
Overall tests, controlling for all strata
AltHypothesis Chisq Df Prob
cor Nonzero correlation 5193.2 NA NA
while the call CMHtest(Freq~right+left|gender, data=VisualAcuity, overall=TRUE) produces
...
$ALL
Cochran-Mantel-Haenszel Statistics for right by left
Overall tests, controlling for all strata
AltHypothesis Chisq Df Prob
cor Nonzero correlation 5193.2 1 0
rmeans Row mean scores differ 5213.4 3 0
cmeans Col mean scores differ 5219.4 3 0
general General association 11316 9 0
WRT the types and T, point taken. I thought R permitted partial matches.
Hi @bill-raynor,
I am facing a similar output in a recent analysis. So in your second output just above, Does Prob 0 effectively means that comparison is statistically significant?
I am just finding the output a bit distinct from other R packages, where I see something like P < 0.05, for example.
Thank you
Good evening, It’s been awhile, but you can check it by running it once with and without type=“cor.” I went diving through the code but have forgotten how I handled it.
Bill
On Jun 13, 2019, at 3:04 PM, lf_araujo [email protected] wrote:
Hi @bill-raynor https://github.com/bill-raynor,
I am facing a similar output in a recent analysis. So in your second output just above, Does Prob 0 effectively means that comparison is statistically significant?
I am just finding the output a bit distinct from other R packages, where I see something like P < 0.05, for example.
Thank you
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/friendly/vcdExtra/issues/2?email_source=notifications&email_token=AAP4D7QA3O34GIKUCAAUCNDP2KR4PA5CNFSM4FENFEJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXU4CRI#issuecomment-501858629, or mute the thread https://github.com/notifications/unsubscribe-auth/AAP4D7Q33KXVQN3PLHKYI4TP2KR4PANCNFSM4FENFEJA.