I have two variables I want to compare: one containing a variable on age (continuous) and one containing a variable on stroke status (did or did not have stroke, factor). I can do this happily using
wilcox.test (allcoding$age~allcoding$stroketia)
However, I struggle with doing this in sjPlot
as it wants both to be numeric
sjt.mwu(mwu(allcoding$age, allcoding$stroketia))
Performing Mann-Whitney-U-Test...
---------------------------------
showing statistics between groups (x|y)
Error in wilcox.test.default(xsub, ysub.n, paired = TRUE) :
'y' must be numeric
How do I do the equivalent of the "~"
in sjPlot rather than ","
?
Thanks for the help