I'm currently struggling with how to assess the type I error of a permutation test for significance of variance term in R. The idea that I want to follow is outlined below:
Suppose we simulate data such that $$Y_{ij}=1+b_i+\epsilon_{ij}$$ where $b_i\sim \mathcal{N}(0, \sigma_b^2)$ and $\epsilon_{ij} \sim \mathcal{N}(0, \sigma_e^2)$. We can then calculate the LRT statistic for this model (testing against the alternative of $\sigma_e^2 \neq 0$) and permute the clusters (that is, the values of the $b_i$'s) to see how does the LRT vary across the different permutations.
I was, in particular, interested in the type I error of this test, i.e. what happens if we indeed have $\sigma_b^2=0$, but the issue I'm facing is that when using the lmer() function in R I get an error as I am simulating $b_i=0$ for all $i$ and I'm assuming the model becomes unidentifiable. Is there a way to make this work, as in, how should the code of the model look like?
I should point out that I'd prefer to have just hints, not full answers as this is related to something important that will be marked and I want to be a decent human being and not rely on good people on the internet.
Thanks in advance!