Nonparametrics with clustered binary and multinomial data