#### MAM

##### New Member
I wonder if I have missed something in Minitab. I need to write custom hypotheses such as (4 -1 -1 -1 -1). I use general linear model under ANOVA in the menu mostly. How to do? Thank you.

MAM

#### Miner

##### TS Contributor
Please explain your hypothesis clearly. I am a Minitab user and am proficient with GLM in Minitab, but I have no idea what you want to do.

#### MAM

##### New Member
Ok. I will do better. Please see the enclosed file. The pdf contains output and input for a comparison of 4 mixtures with varying amounts of salt. These are labeled D, A, B, and C where D=mixture with no salt. Columns 5 -7 are the data in stacked form.

I want to compare the mixture with no salt to the other three. I would use a contrast vector (3 -1 -1 -1). I have a few problems with this the first being that I don't know the order in which the means are stored. In other words, is the mixture with no salt the first element of the vector (3 -1 -1 -1)? Does Minitab store means alphabetically as SAS does?

I would like to have a macro or snippet of code to do this in a generic way.

I hope this is a better explanation. Any suggestions or help would be appreciated. I have been running things in a different language such as R or SAS when I encounter this. I like to stay in one language per project.

Thank you.

MM

#### Attachments

• 161.4 KB Views: 2

#### Miner

##### TS Contributor
I think this is what you wanted. First, I duplicated your results in GLM to confirm that I understood your design. What you have is a simple 1-way ANOVA. I ran the 1-way ANOVA in Minitab and used Dunnett's multiple comparisons with a control test to provide your desired contrasts.

#### Attachments

• 148.3 KB Views: 1

#### MAM

##### New Member
Thank you. It does do what I want. It was not the best example.

I was actually thinking about a contrast that was more generic such as compare groups A and B with C and None. The contrast vector would read (1 1 -1 -1). What I am trying to do is to not use the menu system and create a macro or find code that will do the comparison for me.
I am still learning the way Minitab works.

MM

#### Miner

##### TS Contributor
My knowledge of contrasts is rusty and my reference materials are unfortunately out of reach due to COVID-19, so I am working entirely from memory. Try adding a worksheet column called "Contrast", and enter your desired contrast vector in that column. Run the ANOVA, but use "Contrast" as the factor instead of Salt. Unless my memory is faulty, that should give you what you want.

#### MAM

##### New Member
I will definitely try it and let you know. You are doing pretty well without your reference materials. Thanks again.
MM

#### MAM

##### New Member
Wow. Knowing how to write a contrast makes a difference. It worked! Thanks.
MM

#### MAM

##### New Member
I would like to discuss results of contrasts run in Minitab.

Can you explain why the difference in the p-values for the runs of Dunnett contrast and fisher, please?
1. Dunnett compare groups 1-4
2. contrast (1,0,0,-1) run as y=contrast
3. fisher (1,0,0,-1) run as y=salt
Why do these p-value differ? See attached file for summary.

MM

#### Attachments

• 1.4 KB Views: 1
• 28.5 KB Views: 1
Last edited:

#### Miner

##### TS Contributor
The two tests control for the family-wise error rate in different ways in addition to making different comparisons. Fisher's test provides less protection for family-wise errors.

#### MAM

##### New Member
The contrast C=(1,0,0,-1) has a p-value computed using an F test. See attached file. I can compute the p-value for a test of CB=0. This is the p-value for an individual contrast. If I want to include more simultaneous contrasts it is possible to compute simultaneous tests of hypotheses using general linear model theory. I would just increase the number of rows in C. See the attached file for F test construction. Do I have that right? Is this what Minitab is doing when I do an orthogonal polynomial type of analysis of a contrast such as C=(1,0,0,-1) where y= [ u contrast ] ?

#### Attachments

• 16.9 KB Views: 1

#### Miner

##### TS Contributor
You should be able to set up each contrast in its own column (like the first contrast) then use these contrasts as variables in GLM.