Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • $\begingroup$ How do you define a slope for variable group which is a categorical variable? $\endgroup$ Commented Nov 28, 2023 at 13:34
  • $\begingroup$ Sorry but I dont understand the issue. I've seen plenty of examples with 2 categories as fixed variables (example: ed.ac.uk/biomedical-sciences/…) $\endgroup$ Commented Nov 28, 2023 at 13:39
  • $\begingroup$ Let me clarify, how do you define a random slope for group? $\endgroup$ Commented Nov 28, 2023 at 13:43
  • $\begingroup$ Sorry, this might all be going over my head, but isn't that the case every time you want to evaluate the extent onto which a covariate may have, together with a predictor, on an outcome? $\endgroup$ Commented Nov 28, 2023 at 16:05
  • 1
    $\begingroup$ There's nothing wrong with your code as such. You can very well include a random slope of a categorical predictor, though it may feel strange to call it a slope because what you get is a contrast estimate for each subject. I'm not sure if the fact that you only have 2 observations per subject causes some issues though (in the example you link, they had several observations for each modality per subject). $\endgroup$ Commented Nov 29, 2023 at 16:04