Problem with post hoc comparison using Robust ANOVA in R

Hi everyone,

I am trying to conduct a robust ANOVA including post-hoc test using WRS2 package in R. My data structure is as such: 1 dependent variable (res) 2 independent variables: between (group) - within (bla) 1 ID variable to refer to subjects (id)

My code looks like this:

fileHB=read.csv2("trial_II.csv");
fileHB$Hb=as.numeric(fileHB$Hb);

m1 <- WRS2::bwtrim(res ~ Group*Bla,id=id, data = fileHB)

Up until this point it works fine but when I try to check post hoc using this line of code:

sppba(res ~ Group*Bla,id,data = fileHB)

I receive the following error:

error in combn(levels(mf[, fixvar]), 2) : n < m

I don't know what to do here and I tried debugging but I cannot seem to find the error. I checked my data and everything is complete - so no missing data. Also, the indexing of subject etc. is correct. I would really aprreciate help on this issue.

I would be happy to get a response!

Best

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.