For the sake of example, let’s say this is a "costumer research study" with a 3 by 3 factorial design, in which I am studying whether customers make purchases or not depending on various factors.
I have three independent variables: store decor (A), customer service (B), and price (C).
Each variable has three levels:
- A store decor: high level decor, medium level decor, no decor
- B customer service: friendly interaction, minimal interaction, no interaction
- C price: high price, medium price, low price
The binary outcome (x) is either making a purchase (1) or not (0).
This gives me a total of 27 conditions.
I have run the study on five participants using a virtual simulation in which they "visit" 27 different stores, one after the other - one store for each combination of the three independent variables.
These are the results for the five participants (I am using r):
A <- c(0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2) B <- c(0,0,0,1,1,1,2,2,2,0,0,0,1,1,1,2,2,2,0,0,0,1,1,1,2,2,2) C <- c(0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2) 1 <- c(1,0,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0) 2 <- c(0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0) 3 <- c(0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,1,0,0,0,0,0,0) 4 <- c(0,0,0,0,1,0,0,1,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0) 5 <- c(0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0) data <- data.frame(A, B, C, x)
My question is, what is the best way to analyze this data?
I am interested in the effect of A, B and C on whether the customer makes a purchase or not.
I have found the following example online about the use of Generalized Estimating Equations (gee). The example uses the following dataset:
Initially I thought this dataset looked similar to mine if I considered "stores" in place of "visits".
But then I realized that this example would be good to study, say, the influence of the customer's gender on the purchase. My variables, instead, are about the store, so each store is characterized by a different combination of the IVs.
Should I "flip" the data then? Could I apply the same methodology?