# Suggestions on how to visualize some data

Basically, I have several design options with 22 variables with a 0-1 option. For each design I have an output which is a real number. So...I would like to know a way to express as clear as possible the effect of all the variables in the output, expressing how well each of the designs did. Any suggestions?

Clarification:

I have (potentially) 2^22 possible designs correct? And I don't know how the variables correlate. So to get a starting general idea I want to display the results graphically in a way that captures information about each design as whole.

Right now I am displaying simply 22 bars showing the variation of the dependent variable when you switch each variable and hold all the rest in a constant "nominal" configuration. This however makes me lose information about how mutually changing variables play a role in the process

I am aware this is an oddly open-question, and I was just looking for suggestions that more experienced people in the field might have

• So...22 binary independent variables and one continuous dependent variable? And you want to visualize the results graphically, not numerically as statistics? This probably needs clarification... Commented Jan 7, 2014 at 11:47
• Yes, that is correct. Let me try to clarify a little...I have (potentially) 2^22 possible designs correct? And I don't know how the variables correlate. So to get a starting general idea I want to display the results graphically in a way that captures information about each whole design. Right now I am displaying simply 22 bars showing the variation of the dependent variable when you switch each variable and hold all the rest in a constant "nominal" configuration. This however makes me lose information about how mutually changing variables play a whole in the process Commented Jan 7, 2014 at 12:00

You could arrange your in a matrix, with 23 columns (one for each independent variable and one for the response) and 2^22 design rows. The first 22 columns would be filled with all possible combinations of 0s and 1s. The last column will have your real numbers.

Then sort the rows and the columns. Sort the rows by the real numbers in column 23. Sort the first 22 columns by the sum of the product of each column with the real numbers. Then, visualize the matrix with different colors or shading.

This should result in designs (rows) and independent variables (columns) with similar responses being grouped together.

Here's a very simple example, with just 3 independent variables:

x1  x2  x3   y
0   0   0   23
0   0   1   22
0   1   0   75
0   1   1   59
1   0   0   43
1   0   1   35
1   1   0   47
1   1   1   38


Sort the rows, then calculate the column products with y and sort the columns by the sum of the products:

x3  x1  x2  y
22  0   0   22
0   0   0   23
35  35  0   35
38  38  38  38
0   43  0   43
0   47  47  47
59  0   59  59
0   0   75  75
154 163 219


Finally, use this ordering to visualize the design with coloring or shading:

• This is a creative approach, but I don't think I understand it fully nor why it works. Your example does not appear actually to sort the rows according to the sums of the products: it sorts them only by the original values of $y$. Furthermore, you do not provide any way to order the columns, so I don't see how this visualization can possibly cause "independent variables (columns) with similar responses being grouped together." Could you provide some explanation for why this ordering might be meaningful and how one can read the resulting visualization?
– whuber
Commented Jan 7, 2014 at 21:28
• Right, the rows are sorted by y. The columns are sorted by the sums of the products. Whoops, I see I made an error in the column labels of the image ... they should read x3, x1, x2 (just edited answer to fix this). X3 had the smallest product sum, x2 had the biggest. Why does it work? It's just a very simple approach to seriation (see for example, this link). Commented Jan 7, 2014 at 22:51
• You made a small mistake in the labels during calculation, right after "Sort the rows, then calculate the column products with y and sort the columns by the sum of the products". It should read x3 x1 x2 I am not familiarized with the concept of seriation, I will definitely take a look at it. Also...I don't have all 2^22 possible options, as it would take too much time to simulate all that. I tried your approach wit what I have and indeed I can already see some clusters, however, some variables seem to just switch randomly from 0 to 1, even thought they are at the far left of the matrix Commented Jan 8, 2014 at 11:47