Hello all,
I'm running a linear mixed model using "mixed". My highest level (2 levels) variable is a categorical one with 10 categories and I want to know if there is a command or a option of the margins command that displays the graphical difference of the outcome for every group of the second level. Below you can find my variables, the main code I'm using for the analysis and the following codes I'm using for the graphical part.
Z_altidade: numeric outcome
Saud: yes/no variable
Nsaud: yes/no variable
Class_idhm: 4 categories
Idade: age as numeric
Sexo: sex 0 female 1 male
Class_cob: 10 categories second level variable
My objective is to see how the correlation between what a child eats (saud and nsaud) and the levels of Human Development Index (IDHM) of their home states influences their height (z_altidade) - therefore the interaction.
I now want to see how this relation happens in each group of the second level (class_cob).
Is it possible? Can you help me?
I'm running a linear mixed model using "mixed". My highest level (2 levels) variable is a categorical one with 10 categories and I want to know if there is a command or a option of the margins command that displays the graphical difference of the outcome for every group of the second level. Below you can find my variables, the main code I'm using for the analysis and the following codes I'm using for the graphical part.
Z_altidade: numeric outcome
Saud: yes/no variable
Nsaud: yes/no variable
Class_idhm: 4 categories
Idade: age as numeric
Sexo: sex 0 female 1 male
Class_cob: 10 categories second level variable
Code:
mixed z_altidade i.saud##i.class_idhm i.nsaud##i.class_idhm idade i.sexo || class_cob: , cov(un)
Code:
margins i.saud##i.macrorregiao marginsplot
Is it possible? Can you help me?
Comment