[R-sig-ME] Modeling group-level effects with unequal #s of "subgroups"

Pierce, Steven p|erce@1 @end|ng |rom m@u@edu
Wed Jul 10 14:14:44 CEST 2019


You might want to search for literature on "partially clustered" or "partially nested" models. Here's one example. 

Baldwin, S. A., Bauer, D. J., Stice, E., & Rohde, P. (2011). Evaluating models for partially clustered designs. Psychological Methods, 16(2), 149-165. doi:10.1037/a0023464

Steven J. Pierce, Ph.D.
Associate Director
Center for Statistical Training & Consulting (CSTAT)
Michigan State University

-----Original Message-----
From: jonnations <jonnations using gmail.com> 
Sent: Tuesday, July 9, 2019 10:38 PM
To: r-sig-mixed-models using r-project.org
Subject: [R-sig-ME] Modeling group-level effects with unequal #s of "subgroups"

Hi list,

I am working on what may be a simple problem, but I can’t quite wrap my
head around it. I have spent time searching for a solution to a problem
like this, but I must not be using the correct terminology in my searches.

I am trying to construct a simple linear model with one response, one
predictor, and a group level factor (3 islands in this case). The hard part
is that one of the 3 “islands” is composed of multiple smaller islands.
Here is a small fake data set:

size <- c(5,6,4,5,3,5,6,6,4,3,2)
age <- c(5,10,2,5,10,3,10,3,3,10,3)
island <- c("A", "A", "B", "B", "B", "C", "C", "C", "C", "C" , "C")
sub-island <- c(NA, NA, NA, NA, NA, "C1", "C1" , "C1", "C2", "C2", "C2")
df_test <- data.frame(size, age, island, sub-island)

Writing a simple model such as
`size ~ 1 + age + (age | island)`
ignores the hierarchical structure of group C, which is important in my
case. However, modeling
`size ~ 1 + age + (age | island) + (age | sub-island)`
would not work as islands A and B do not have this sub-structure. One
alternative may be to assign the other "sub-island" groups to single groups
(i.e. "A1 for all "A's", etc) but I'm not sure if this is appropriate or

If anyone provide some useful information on how to construct this model I
would be very grateful. I am used to modeling in brms, which uses basically
the same syntax as lme4. Alternatively, if anyone could tell me what this
type of data structure is called, then I could better search for options on
my own.

Thank you for helping this beginner,

Jonathan A. Nations
PhD Candidate
Esselstyn Lab <https://urldefense.proofpoint.com/v2/url?u=https-3A__esselstyn.github.io_&d=DwIFaQ&c=nE__W8dFE-shTxStwXtp0A&r=91SB6keVyEb7FtX7ZipxyQ&m=T7Dok4zc8W-_7zIU6FFE-Tuk8De5yMztwyM3PZF9FeY&s=qFG6aLHJdCC8ygWe69jNZHm9v7ZTY83jLcRk3m5FusM&e= >
Museum of Natural Sciences <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.lsu.edu_mns_&d=DwIFaQ&c=nE__W8dFE-shTxStwXtp0A&r=91SB6keVyEb7FtX7ZipxyQ&m=T7Dok4zc8W-_7zIU6FFE-Tuk8De5yMztwyM3PZF9FeY&s=VOT7rzKKbHKPIaUTVs5NT6k5jlsnl5ZoKKOcm7FMzpQ&e= >
Louisiana State University

	[[alternative HTML version deleted]]

More information about the R-sig-mixed-models mailing list