I have 2 categorical independent variables (industry & location) and 1 continuous dependent variable (performance metrics). I need to find significantly different industries by mean performance metrics in each location separately. Sounds like a task for ANOVA, but running one-way ANOVA for each location separately in my understanding inflates the type I error. Running two-way ANOVA will result in either comparison of mean performance metrics by location, or same by industry, or comparing all possible combinations of industries and locations, however I'm not interested in comparing industry performance across different locations. E.g. I am interested in comparing Canada:Energy to Canada:Basic Materials , but not interested in comparing Mexico:Energy to Canada:Basic Materials. Also sample sizes of each location are different, however share of observations from each industry is the same in each location, so not sure how suitable is the data for two-way ANOVA.
Sample dataset (contingency table of the counts):
Basic Materials Energy Financials Canada 10 10 20 Mexico 15 15 30 USA 5 5 10
Sample R code:
DATA <- data.frame(performance=rnorm(120), location=c(rep('USA',20),rep('Canada',40),rep('Mexico',60)), industry=rep(c('Basic Materials','Energy','Financials','Financials'),30)) table(DATA[,-1]) TukeyHSD(aov(performance~location*industry,data=DATA))
Any suggestions (preferably accompanied by some R code)?