How to set up qualatative data as a set of binary variables for regression analysis?

DanielManiel

New Member
Joined
May 29, 2017
Messages
2
I am doing a regression analysis and have some data from a survey. One column is ethnicity. The way the data is set up is:
Yearly Salary
EthnicityAge
100Black25
87White24
57Black65
94Hispanic45

<tbody>
</tbody>

But I would like it set up so that each ethnicity is it's own column:
Yearly Salary
BlackWhiteAge
1001025
870124
571065
940045

<tbody>
</tbody>


Is there a fast way of doing this in excel?
Thanks! :)
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Unknown
ABCD
1Yearly SalaryEthnicityAge
2100Black25
387White24
457Black65
594Hispanic45
6
7
8
9Yearly SalaryBlackWhiteAge
101001025
11870124
12571065
13940045
14
Sheet2
Cell Formulas
RangeFormula
B10=SUMPRODUCT(($A10=$A$2:$A$5)*(B$9=$B$2:$B$5))
C10=SUMPRODUCT(($A10=$A$2:$A$5)*(C$9=$B$2:$B$5))
D10=VLOOKUP(A10,$A$2:$C$5,3,0)
 
Upvote 0

Forum statistics

Threads
1,216,178
Messages
6,129,326
Members
449,501
Latest member
Amriddin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top