2
$\begingroup$

I'm trying to analyze some data that has observations coming from blocks (like in the experiment design sense), and within a block I expect them to be correlated, but the blocks are not disjoint so a particular observation can belong to more than one.

I am thinking about analyzing this with a mixed model where my model is $$ y_i = \mu + \vec \alpha_i +\varepsilon_i $$ where $\alpha \sim \mathcal N(0, \sigma^2_\alpha I)$ and $\vec \alpha_i$ is the vector of intercepts according to the blocks that unit $i$ is in. If I have $B$ blocks and $n$ observations I think then that I can view this as $$ y = \mu\mathbf 1 + Z\alpha + \varepsilon $$ where $Z\in \{0,1\}^{n\times B}$ has $Z_{ij} = 1_{i \in \text{ block } j}$.

Here's some example data just to make sure it's clear what I mean.

set.seed(1)
dat <- data.frame(
  block1=c(1,1,0,0,0,0),
  block2=c(1,0,0,1,1,0),
  block3=c(0,0,1,1,0,1),
  y=rnorm(6)
)

so then my model would have the first row of $Z$ be $(1,1,0)$ and $y_1 = \mu + \alpha_1 +\alpha_2 + \varepsilon_i$.

My questions:

First, I haven't been able to find any information about modeling something like this. Is there a name for this kind of thing ("fuzzy blocks", "overlapping blocks", "non-disjoint blocks", something else)? And is this a sensible way to analyze this?

And secondly, can I fit this kind of model in lme4 in R? Would it be necessary to create my own custom lFormula output? (sorry if this one is off-topic)


Update: I was indeed able to fit this model by using the four-step process as laid out in "Modular Functions for Mixed Model Fits" in the documentation. All I had to do was modify the output of lFormula. But now my first question remains: is this a statistically sound way to do this, and does this kind of overlapping intercepts model have a common name so I can read more about its uses? I'd also still be very happy to know if there's a way to specify this model using formulas rather than directly supplying my custom model matrix to the output of lFormula but that's less of a concern.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.