Study design

Compare groups analysis study requirements and dataset layout.


  • A quantitative response variable.
  • A categorical factor variable with 2 or more levels.

Dataset layout

Use a column for the response variable (Height) and a column for the factor variable (Sex); each row has the values of the variables for a case (Subject).

Subject (optional) Sex Height
1 Male 175
2 Male 180
3 Male 160
4 Male 190
5 Male 180
6 Female 150
7 Female 140
8 Female 160
9 Female 165
10 Female 180
Note: Do not split groups into separate columns. For example, you should not record the heights of males in one column and heights of females in another.