I have a categorical response (ordinal, lets call it A) collected from a complete randomized block design experiment where the explanatory variable is treatment. How do I account for the between block variation? I have found models that do this for dichotomous response variables but my response has >2 levels, treatment is also categorical and has 10 levels and there are 8 separate blocks. Could I hypothetically run a logistic regression and add the separate block factors to account for the variation?

The treatment variable has 10 levels but I could separate them so that I compare them 2 at a time, control vs some treatment. Would it be reasonable to run a GLMM model using treatment as a response? So that level changes in the categorical variable, A, affect the odds of having received treatment or is there some fallacy in this?

  • $\begingroup$ So, I solved this problem by using counts, however this was unique to my case in which the distribution of counts for the separate ordinal responses were approximatley poisson distributed. However, the problem remains in the case where they are not, perhaps summing up the categorical levels could yield results (though at the loss of information). $\endgroup$
    – Igelkatt
    Feb 7, 2014 at 9:18

1 Answer 1


Could you not run a LMM or GLMM with block as a random effect? Random effects are often added to control for pseudo-replication.

The testFactors function from the package phia seems appropriate for your post-hoc analysis. "This function is specially indicated for post-hoc analyses of models with factors, to test pairwise comparisons of factor levels..." Package 'phia'

Lets say your treatment levels are 1,2,3,4,5,6,7,8,9, and 10. Try:

model<-lmer(data=mydata, A~treatment+(1|block))

treat1.vs.treat2 <- list(treatment=c("1", "2"))
testFactors(model, treat1,vs,treat2)
testFactors(model, treat2.vs.treat3)



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.