# How do you deal with factors, in factorial design, when some or all levels of a factor are meaningless for one or some levels of another factor?

( Introduction: My question is essentially neither about software nor about data preparation. It's about understanding a principle in statistics topic of factorial design of experiments. In reality I need to understand the statistical principle to solve some interdisciplinary problems in building/architectural engineering. I searched about it in some reference books and papers on DoE but couldn't find an example where some levels of different factors cannot be used at the same time in an experiment. I bring a simple example below to clarify my question )

In a factorial design we have multiple categorical factors with multiple levels. But here for the sake of simplification let's say, for example, we have 2 factors (A, B), and the levels are:

• A has IN, MID, OUT levels
• B has With (W), Without (WO) levels

Suppose W and WO are meaningful with respect to MID and OUT, but they don't mean anything about IN. In other words, they don't matter or they're equally indifferent when referring to IN.

What is the best way to structure the combination of such factors and levels? Do you find any of the four following alternatives suitable? Or, do you know a better solution?

1.

A, B, Y
IN, WO, y1
IN, W, y1
MID, WO, y2
MID, W, y3
OUT, WO, y4
OUT, W, y5


2.

A, B, Y
IN, WO, y1
MID, WO, y2
MID, W, y3
OUT, WO, y4
OUT, W, y5


3.

A, B, Y
IN, NA, y1
MID, WO, y2
MID, W, y3
OUT, WO, y4
OUT, W, y5


4.

A, Y
IN, y1
MIDWO, y2
MIDW, y3
OUTWO, y4
OUTW, y5

• Although this has received votes as off-topic I think it has a statistical point even though couched in terms of R software. Sep 3, 2019 at 10:59
• @mdewey I agree there is a statistical point here, but I know I've seen the question before. I don't have time right now to search. The original part of the question is about data preparation, which is off topic. Sep 3, 2019 at 12:05
• With this question I basically wanted to understand better some fundamental concept or principle in statistics. I searched about it for days but I couldn't find a reasonable answer to it. The question is not that easy as some statisticians I know in person replied to it differently. I'm not a statistician, maybe because of that, I have selected some keywords which made you think it's about R or data preparation. It has connection with those but essentially it's about understanding a fundamental topic in statistics. Sep 3, 2019 at 20:43
• Thanks to your comments I rephrased the question and edited the description. Please let me know if further editing is required. As far as I've searched there is only an "unanswered" question with some similarities to my question. Sep 4, 2019 at 1:39