easystats / easystats/performance
ICC for multiple membership model
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 1.2k
- Forks
- 109
- Avg merge
- 6h 34m
- Merged PRs (30d)
- 8
Description
I'm trying to estimate the ICC for a multiple membership model estimated with brms. There are students (level 1) nested in teachers (T1_ID, level 2) and classrooms (C1_ID, also level 2). I get an estimate if I condition on all random effects, that is not specifying re.form. However, I'd like to get estimates for the two level 2 effects separately. Is there a way to do this with the performance package? When I tried I got the error message:
Error in is(sexpr, "try-error") : argument "sexpr" is missing, with no default
My model is
Fixed.FAPs.int.fixed <- brm(PFixedT3 ~ 0 + Intercept + (0 + Intercept |p| mm(T1_ID, T2_ID, T3_ID, T4_ID, weights = cbind(W_T1, W_T2, W_T3, W_T4))) + (0 + Intercept |q| mm(C1_ID, C2_ID, C3_ID, C4_ID, weights = cbind(W_C1, W_C2, W_C3, W_C4))), family = skew_normal(), data=data_fixed, control = list(adapt_delta = 0.99), inits = 0, cores = 4)
and for the ICC for teachers
icc(Fixed.FAPs.int.fixed, re.form = ~ (0 + Intercept |p| mm(T1_ID, T2_ID, T3_ID, T4_ID, weights = cbind(W_T1, W_T2, W_T3, W_T4))))
Any ideas? Thanks
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the icc() entry point and inspect how its re.form argument handles the brms multiple-membership random effects shown in the issue. Done means determining whether separate teacher and classroom ICC estimates can be produced without the reported error, with the limitation or supported behavior made clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100