sdm-help-list >

**three groups linear model**Showing 1-5 of 5 posts

Oct 30, 2020 06:10 AM | Yizhen Li

three groups linear model

Dear all,

I have three groups ,and I set a group variate to seperate them, A with -1,B with 0,and C with 1,I am confused about how to set the linear model and how to explain the results?

Is it that I only set the model group value with 1 when I do the lineal model?

Is it that if I get positive Z value ,it means C>B>A,and a negative value means A>B>C?

Thanks sincerely if someone can give some susggestions.

I have three groups ,and I set a group variate to seperate them, A with -1,B with 0,and C with 1,I am confused about how to set the linear model and how to explain the results?

Is it that I only set the model group value with 1 when I do the lineal model?

Is it that if I get positive Z value ,it means C>B>A,and a negative value means A>B>C?

Thanks sincerely if someone can give some susggestions.

Oct 30, 2020 02:10 PM | Lydia Fortea -

*Instituto de Investigaciones Biomédicas August Pi i Sunyer (IDIBAPS)*RE: three groups linear model

Dear Yizhen Li,

In order to analyze a categorical varible with 3 values, you should add all three separate variables as binaries (A=0,1; B=0,1 and C=0,1). Later run the linear model including tha three of them to perform an ANOVA to see if there is any significant difference (eg, https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/GLM#ANOVA:_1-factor_4-levels__.281-way_between-subjects_ANOVA.29)

To check which group has a greater Z value you have to perform several pairwise test (first : A=0 and B=1, second: A=0 and C=1; third: B=0 and C=1), and interpret here the results for each one (positive Z in the first analysis would mean B>A)

Kind Regards,

Lydia

In order to analyze a categorical varible with 3 values, you should add all three separate variables as binaries (A=0,1; B=0,1 and C=0,1). Later run the linear model including tha three of them to perform an ANOVA to see if there is any significant difference (eg, https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/GLM#ANOVA:_1-factor_4-levels__.281-way_between-subjects_ANOVA.29)

To check which group has a greater Z value you have to perform several pairwise test (first : A=0 and B=1, second: A=0 and C=1; third: B=0 and C=1), and interpret here the results for each one (positive Z in the first analysis would mean B>A)

Kind Regards,

Lydia

Nov 2, 2020 02:11 AM | Yizhen Li

RE: three groups linear model

A=0,1; B=0,1 and C=0,1 ??? It is the same?

You means A=0,0; B=0,1 and C=1,1?

But when I set the sdm_table this, it has an error.

You means A=0,0; B=0,1 and C=1,1?

But when I set the sdm_table this, it has an error.

Nov 2, 2020 09:11 AM | Lydia Fortea -

*Instituto de Investigaciones Biomédicas August Pi i Sunyer (IDIBAPS)*RE: three groups linear model

For example, you have the varible color which can be 3 groups: red,
blue and green. To set is there is any difference corresponding
with the colour we are analyzing you have to set three variables:

- Red: 0 (no), 1 (yes)

- Blue: 0 (no), 1 (yes)

- Green: 0 (no), 1 (yes)

**When one "subject" is red it cannot be blue or green.

Then you add the three variables in your linear model (ANOVA) to perform the analysis.

If you want to know if blue > red (or other pairwise comparison) then you set another varible:

- Red_Blue: 0 (red) 1 (blue)

Here you just perform the linear model with the varible, and a Z postiive results would indicate that blue > red.

KInd regards

- Red: 0 (no), 1 (yes)

- Blue: 0 (no), 1 (yes)

- Green: 0 (no), 1 (yes)

**When one "subject" is red it cannot be blue or green.

Then you add the three variables in your linear model (ANOVA) to perform the analysis.

If you want to know if blue > red (or other pairwise comparison) then you set another varible:

- Red_Blue: 0 (red) 1 (blue)

Here you just perform the linear model with the varible, and a Z postiive results would indicate that blue > red.

KInd regards