A number of marketing researchers use the orthoplan procedure in SPSS to generate fractional factorial designs. It is not surprising, then, that I received a number of questions concerning the recent article in the Journal of Statistical Software by Hideo Aizaki on “Basic Functions for Supporting an Implementation of Choice Experiments in R.” To summarize their issues, why doesn’t it work like orthoplan in SPSS, and can you answer in 300 words or less? Actually, I added the 300 words or less comment since “moaning when I started to go into detail” sounds worst.
For example, say that you wanted to generate a fractional design for five factors with the following levels: 4x4x3x3x2. The simplest syntax for orthoplan might be “orthoplan factors = a(1,2,3,4), b(1,2,3,4), c(1,2,3), d(1,2,3), e(1,2).” And, SPSS would generate 16 different combinations of the orthogonal main-effects design (aka fractional factorial).
So, you go to the above article, copy the example, and change the code to conform to your example.
# Example 1: Unlabeled Design
rotation.design(attribute.names = list(
A = 1:4,
B = 1:4,
C = 1:3,
D = 1:3,
E = 1:2),
nalternatives = 2, nblocks = 1, row.renames = FALSE,
randomize = TRUE, seed = 987)
We seem to need more code, but not that bad. However, this code will generate the full factorial design with 288 combinations. What happened to the fractional design with 16 combinations? It’s a long story about how orthoplan works, but I will get to the bottom line. You should change the two 3-level factors to 4-level factors and rerun the code with the following two changes: C = 1:4 and D = 1:4. You will get your 16 combinations. Now simply recode all the 4’s to 3’s for C and D, and you have your orthoplan-like design in less than 300 words. The designs before and after the coding look like this:
Why? Read the IBMSPSS algorithm to see how orthoplan works. I prefer this pdf because it is easier to read. Plot spoiler: the above recode is how SPSS does it.