# Significant levels of random factor

Currently I'm trying to analyze data using a mixed model in R.

The data is structured as follows: There are 2 conditions, A and B. For each condition, there are 3 treatments, 1-3. These treatments were done in triplicate, i.e. there are 3 samples per treatment per condition. For each sample, the percentual abundance of a large number of substances were measured (sum of all substances in 1 sample = 100). I am interested in the effect of the treatment in a condition as well as in comparing the treatments between condition for the substances, which means that I would like to know which of the substances have a significantly different concentration between treatments/ conditions.

Thus, I specified my data as a mixed model with lmer:

m <- lmer(logit(abundance)~treatment*condition + (1+treatment*condition|substance),
data=d)


Aside from the fact that I am not totally sure whether I specified the random effect structure in the right way, I was wondering how to assess the significance of levels of the random factor. That is, I would like to know which levels are actually significantly different between treatments and/or conditions. Unfortunately I was not able to find anything regarding this. Thus, any help would be greatly appreciated!

• This model does not make sense to me, why do you want to treat substance as a random effect? Instead of fitting a logit(abundance)~treatment*condition model for each substance separately? Do you have reasons to believe that all substances will behave in a similar way (e.g. they are related in some way)? – amoeba Jun 7 '17 at 14:30
• Thank you for your fast reply! Yes, the substances in one treatment-condition group were measured in one and the same sample (and the samples are in triplicate). That said, each single substance can still behave differently. How would I integrate the regressions for each different substrate to have a common result? – user8093395 Jun 7 '17 at 16:20