Open sda030 opened 6 years ago
I'm not quite sure how you would like the layout to have. Is there any possibility you could post an image, which illustrates the desired layout?
Certainly: Table 2.xlsx Cells B18-B26 shows what I mean by the separate column. I have of course manually made several adjustments which I don't expect your package to make, but it makes at least more sense to me to keep the term labels in one column.
I see. Maybe I can improve this somehow. Currently, you can create tables for different models with different random effects, where you don't have unique labels accross all models, see for instance examples in this vignette.
The values and random effect labels are too close (only a space between them instead of a tab, which would make more sense; see example. Formulae for the models: M1:
Y ~ 1 + IDGRADE + (1|Item.ID) + (-1+IDGRADE|IDSCHOOL) + (-1+G1|STUDID) + (-1+G2|STUDID)
M2:Y ~ 1 + IDGRADE + (1+IDGRADE|Item.ID) + (-1+IDGRADE|IDSCHOOL) + (-1+G1|STUDID) + (-1+G2|STUDID)
M3:Y ~ 1 + IDGRADE*(CC_PAT_BeforeG1 + CC_PAT_Grade1 + CC_PAT_Both + CC_PAT_Grade2 + CC_PAT_Unclear) + (1+IDGRADE|Item.ID) + (-1+IDGRADE|IDSCHOOL) + (-1+G1|STUDID) + (-1+G2|STUDID)
Moreover, perhaps better to keep the effect terms in a separate column so models are more aligned: Type (sigma^2, tau_00, tau_11, rho_01) | Label (e.g., Student, class, school, etc) | values
I believe the issue is in the create_random_effects function, but I don't know your code enough to make a pull request.
Otherwise a great package!