Skip to main content
BetaLucidstat is in beta. Results are checked against R, but always verify them against your source data.Send feedback via EZY Research

Types of variables and levels of measurement

Numeric, categorical and Likert variables: how they differ and why they decide which test you can use.

5 min read

Before choosing a test, you need to know what kind of data each variable holds. The type decides what can be calculated: the average of "gender" means nothing, but the average of "age" does.

The three variable types in Lucidstat

When you import data, Lucidstat asks you to set each column to one of three types.

Type in LucidstatMeaningExamples
NumericNumbers you can meaningfully add, subtract and averageAge, exam score, income, study hours
CategoricalGroup or category names with no orderGender, faculty, teaching method, pass/fail
Ordinal / LikertOrdered levels whose spacing may not be equalSatisfaction 1–5, year of study, education level

The four levels of measurement

Textbooks usually describe Stevens' (1946) four levels of measurement. They map onto Lucidstat's types like this:

  • Nominal: numbers or names only label groups (1 = male, 2 = female). This is categorical.
  • Ordinal: you can say more or less, but not by how much (1st, 2nd, 3rd place). This is ordinal.
  • Interval: equal spacing but no true zero (temperature in °C). This is numeric.
  • Ratio: equal spacing and a true zero (weight, income). This is numeric.

In practice, every test that works for interval data also works for ratio data, so Lucidstat groups both as "numeric".

What about Likert scales?

A single 1–5 item (strongly disagree to strongly agree) is ordinal in principle. Even so, much social-science research reports the mean and SD of Likert items and interprets the mean as a level such as "High" or "Very high". Lucidstat supports this; see Descriptive statistics.

Variable types decide the test

Research questionVariable typesSuitable test
Do two groups differ in their means?Group (2) + numericIndependent t-test
Do three or more groups differ?Group (≥ 3) + numericOne-way ANOVA
Are two variables related?Numeric + numericPearson correlation
Are two categorical variables related?Categorical + categoricalChi-square test
Do several variables predict an outcome?Several numeric + numericMultiple regression

Not sure? The test wizard asks about your variables one question at a time and recommends a test.

Common mistakes

  • Leaving numeric codes as numeric. If gender is coded 1/2 and not set to categorical, the software will happily compute an average gender, which is meaningless.
  • Text mixed into a numeric column, such as "n/a" or "-". Lucidstat lists the rows with problems so you can fix them or mark them as missing.
  • Averaging a categorical variable. Report categorical variables as counts and percentages.

References

  • Stevens, S. S. (1946). On the theory of scales of measurement. Science, 103(2684), 677–680.

Related lessons