• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
The Analysis Factor

The Analysis Factor

Statistical Consulting, Resources, and Statistics Workshops for Researchers

  • Home
  • About
    • Our Programs
    • Our Team
    • Our Core Values
    • Our Privacy Policy
    • Employment
    • Guest Instructors
  • Membership
    • Statistically Speaking Membership Program
    • Login
  • Workshops
    • Online Workshops
    • Login
  • Consulting
    • Statistical Consulting Services
    • Login
  • Free Webinars
  • Contact
  • Login

The Difference Between Crossed and Nested Factors

by Karen Grace-Martin 17 Comments

One of those tricky, but necessary, concepts in statistics is the difference between crossed and nested factors.

As a reminder, a factor is just any categorical independent variable. In experiments, or any randomized designs, these factors are often manipulated. Experimental manipulations (like Treatment vs. Control) are factors.

Observational categorical predictors, such as gender, time point, poverty status, etc., are also factors. Whether the factor is observational or manipulated won’t affect the analysis, but it will affect the conclusions you draw from the results.

When there is only one factor in a design, you don’t have to worry about crossing and nesting. But when there are at least two factors, you need to understand whether they are fixed or crossed, because it will affect the analyses you can and should conduct.

Two factors are crossed when every category of one factor co-occurs in the design with every category of the other factor. In other words, there is at least one observation in every combination of categories for the two factors.

A factor is nested within another factor when each category of the first factor co-occurs with only one category of the other. In other words, an observation has to be within one category of Factor 2 in order to have a specific category of Factor 1. All combinations of categories are not represented.

If two factors are crossed, you can calculate an interaction. If they are nested, you cannot because you do not have every combination of one factor along with every combination of the other.

If you’re not sure whether two factors in your design are crossed or nested, the easiest way to tell is to run a cross tabulation of those factors.

Here is an example. In this study, 27 men in their early 20s were randomized into one of three physical training groups. The subjects in every group–endurance, strength, and concurrent training regimens–were measured on a number of physical health measures at two time points: pre and post.

Group and Time are Crossed

crossed-factors

The two factors of interest–Training group and Time–are crossed, as there are 9 observations from each training group in each time. In other words, each Training group is represented at every Time point. This cross tabulation table shows this.

crossed-factors-2

Subjects and Time are Crossed

However, there is a third factor that needs to be taken into account because it’s a repeated measures study: Subject.

If the same nine people in each group were not measured at both times, subject would not be an important factor and we could stop there. Groups and time would still be crossed. We would miss out on some of the efficiency advantages that we get from repeated measures, though, so let’s keep going.

In repeated measures, subject itself becomes a factor. Subject is crossed with time because each subject appears in every time point. Again, this is easy to see in the cross tabulation. Every subject has at least one value at every time point.

Subjects are Nested within Group

But you can see in the Subject*Groups cross tabulation that each subject has observations in only one group. Subjects 1-9 are in the Endurance training group only. Subjects 10-18 are in the Strength training group, etc. Because each subject was assigned to only one training group, subject and group are not crossed. Rather, subject is nested within training group.

In traditional multivariate approaches of analyzing repeated measures data, we ignore issues of nesting and crossing and use different names for these same concepts. Factors that Subject is nested within, like Training group, are called between-subjects factors. Factors that Subject is crossed with, like Time, are called within-subjects factors.

nested-factorsThose concepts are helpful and valid. But being able to translate them into which factors are crossed and which are nested will allow you to see the bigger design and analysis issues. This becomes very, very important when you expand your analysis of repeated measures beyond traditional approaches to mixed models approaches.

It also becomes extremely important in clustered designs, which don’t necessarily have repeated measures, but do have some sort of nesting of individuals within some larger group.

The combinations of nesting and crossing in designs with many factors can get quite complex. It gets even more confusing when some of these factors should (or could) be treated as fixed or random. Remember to use the cross tabulations to help you sort it out.

rm-500Learn more about repeated measures analysis using mixed models in our most popular workshop, Analyzing Repeated Measures Data: GLM and Mixed Models Approaches.

"I wanted to share this recent publication with you. I would not have made it through the statistical analysis for this project without your Repeated Measures class. I am continually pulling out my class notes for other analyses. Thanks again!"

- Lisa Giencke, Plant Ecology Lead Technician, Joseph W. Jones Ecological Research Center

Fixed and Random Factors in Mixed Models
One of the hardest parts of mixed models is understanding which factors to make fixed and which to make random. Learn the important criteria to help you decide.

Tagged With: between-subject, Crossed factors, mixed model, nested factors, Repeated Measures, within-subject

Related Posts

  • The Difference Between Clustered, Longitudinal, and Repeated Measures Data
  • Member Training: Elements of Experimental Design
  • The Difference Between Random Factors and Random Effects
  • Six Differences Between Repeated Measures ANOVA and Linear Mixed Models

Reader Interactions

Comments

  1. Dr R P Tamil Selvan says

    July 23, 2020 at 4:17 am

    thanking you for nice explanation.
    Kindly clarify me one thing. if some of the levels of one factor contain zero observation for some of the levels of second factor is it still considered as crossed? if i am correct it occurs in unbalanced design?
    thanking you once again

    Reply
    • Karen Grace-Martin says

      September 29, 2020 at 11:22 am

      It can depend on how many combinations of the levels of the two factors have zero observations.

      For example, if most combinations are there and one or two combinations are missing, it would still be considered crossed. But there are definitely designs that are somewhere between crossed and nested where too many combinations are not there.

      Reply
  2. Liv says

    December 17, 2019 at 8:05 am

    Hi,

    I am in the process of designing a study. I have a between subjects design, one control group and one experimental group. Both groups will be taking part in a money allocation task as the DV.

    What would be the relationship between my factors (Control and IV group?) This is a totally new concept to me! Thanks! 🙂

    Reply
    • Karen Grace-Martin says

      January 2, 2020 at 1:31 pm

      Hi Liv,
      You only have one factor here: group. The factor is the categorical independent variable. In order for this to be crossed or nested, you would need a second factor in the model, which you don’t have.

      Reply
  3. Mauro says

    January 22, 2019 at 8:26 am

    Hi, and thank you very much for the very interesting topic. How would you go about this: I have three “block” replications. Within these I have three “treatment” plots (these are soil plots, 9 in total). within each plot I have six points where I collect “observations” (I take soil samples) . Within “observations” I have a three soil “horizons” (these are three layers of the soil that come from the same point but at different depths).
    – I want to measure differences between “treatments” within the same soil “horizon”
    – I also would like to measure differences between soil “horizons” (within the “treatment”)
    My understanding is that “treatments” and “blocks” are crossed.
    I am not sure if the soil “horizon” is nested within the “observation” (perhaps is this true only in the case where I want to measure differences between soil “horizons” within the “treatment)?
    Many thanks in advance for your help.

    Reply
    • Karen Grace-Martin says

      March 4, 2019 at 11:52 am

      Hi Mauro,

      I can’t consult over the blog as I need to make sure I totally understand your design. You could take a look at our Statistically Speaking program there. I did a whole webinar in that about crossed and nested factors and we have weekly Q&As.

      Reply
  4. CJ says

    November 28, 2018 at 12:18 pm

    Can you discuss situations where the factors are incompletely crossed?

    Reply
    • Karen Grace-Martin says

      November 30, 2018 at 11:58 am

      Here’s an example:

      You have students and teachers in a high school. If there were only 5 teachers (one math teacher, one English teacher, one science teacher, etc.) so that every student had the same set of teachers, then student and teacher would be totally crossed.

      Likewise, if there is a set up like an elementary school where each student has one teacher, then students are nested within teacher.

      But if there are three math teachers, four English teachers, etc. and each student has 5 teachers, but not the same 5 teachers, then you’ve got a hybrid between nesting and crossing.

      Reply
  5. MJ says

    November 8, 2018 at 10:57 pm

    What about a situation where the categories of one factor have values of 0 in some of the categories of the other factor but >0 in other categories of that factor?

    Reply
  6. Tesfa says

    December 16, 2017 at 4:26 am

    Dear all, please help me. i have faced a problem with design to do my experiment.
    1. two districts selected purposely
    2. 16 farmers selected purposely 8 from each district
    those farmers divided in to two groups on basis of their status (experienced and non-experienced)
    3. two chicken breeds given to the grouped farmers
    so, what design fits this experiment????

    Reply
  7. tesfaw says

    May 8, 2017 at 3:58 am

    HI KAREN
    Regarding to the above explanation of the difference between cross and nested factor i have one question when we see the result’s are an interaction effect nested? or cross?

    Reply
  8. Cleber says

    November 27, 2016 at 4:42 pm

    Thank you very much, you removed my doubts

    Reply
  9. Mark says

    March 8, 2016 at 3:18 pm

    How does a nested ANOVA or nested ANCOVA handle the fact the subject observations are violating the assumption of independent observation. Meaning, since the students are grouped within a classroom (nested) how does ANCOVA/ANOVA get around this lack of independent observations.

    Reply
    • Karen says

      March 11, 2016 at 7:22 pm

      Hi Mark,

      The only way to do that is with a mixed model. ANOVA can’t do it.

      Reply
      • Mark says

        April 7, 2016 at 7:06 pm

        But wouldn’t the example of the participants in the nested groups be violating the assumption of independence? Could it be possible that the participants be competing? It is not as if they are separated into different rooms. For example, participants one through ten go to rooms one through ten. Wouldn’t the observation be influenced by the other participants in the group? Is it assumed in the example that the observations are independent and the fitness participants ignoring each other?

        Reply
  10. Marcia says

    February 9, 2016 at 11:33 am

    Very Nice

    Thank you

    Reply
  11. Josh says

    November 14, 2014 at 5:51 pm

    Nice explanation!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Please note that, due to the large number of comments submitted, any questions on problems related to a personal study/project will not be answered. We suggest joining Statistically Speaking, where you have access to a private forum and more resources 24/7.

Primary Sidebar

This Month’s Statistically Speaking Live Training

  • January Member Training: A Gentle Introduction To Random Slopes In Multilevel Models

Upcoming Workshops

  • Logistic Regression for Binary, Ordinal, and Multinomial Outcomes (May 2021)
  • Introduction to Generalized Linear Mixed Models (May 2021)

Read Our Book



Data Analysis with SPSS
(4th Edition)

by Stephen Sweet and
Karen Grace-Martin

Statistical Resources by Topic

  • Fundamental Statistics
  • Effect Size Statistics, Power, and Sample Size Calculations
  • Analysis of Variance and Covariance
  • Linear Regression
  • Complex Surveys & Sampling
  • Count Regression Models
  • Logistic Regression
  • Missing Data
  • Mixed and Multilevel Models
  • Principal Component Analysis and Factor Analysis
  • Structural Equation Modeling
  • Survival Analysis and Event History Analysis
  • Data Analysis Practice and Skills
  • R
  • SPSS
  • Stata

Copyright © 2008–2021 The Analysis Factor, LLC. All rights reserved.
877-272-8096   Contact Us

The Analysis Factor uses cookies to ensure that we give you the best experience of our website. If you continue we assume that you consent to receive cookies on all websites from The Analysis Factor.
Continue Privacy Policy
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled

Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.

Non-necessary

Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.