I am working on a paper about discrimination in the labour market. I have three variables (among many others): one is race (black/white), the other is callback and the third is advertisement. Race and callback are dummies, the ad variable assigns a number to each job advertisement from 1 to 1200
the dataset is like this
race call ad
b 0 1
w 0 1
b 0 1
w 0 1
Which means that for ad 1, nobody got called back
then I have
race call ad
w 0 216
b 1 216
b 1 216
w 0 216
which means that for ad 216, 2 African-Americans got called back and 0 Whites
or
race call ad
b 0 376
w 1 376
b 0 376
w 1 376
which means that for ad 376 2 whites got called back and no African-Americans
I need to to know the percentage of ads that favored african americans (like ad 216) or they treates the candidates equally (like ad 1) or they favored whites (like other ads where 1 white got called back and no african americans) so I need to discern the advertisement variable to know how many ads called 0 whites and 0 blacks or 1 black and 1 white or 2 whites and 0 blacks and so on.
I am relatively new to Stata so I've tried to use the summarize command, unsuccessfully
sum ad if race=="w" & call==0 & race=="b" & call==1 says "no observations"
I tried to use tabulate race call adid, row and it says "too many variables specified" so I switched to bysort ad: summarize race call yet I got no results.
Related Posts with Sorting a variable by two dummy variables
Using loop to create state-codes for statesHi, I have the following states. I want to assign a 2-digit code to each state. The dataex is given…
Interpreting the coefficients using "one standard deviation"This regression measures the impact of the log change in competition (measured in # competitior bank…
Can I take fixed effects( such as country id) as a continues covariate to controlHi guys, I am using a cross-section data to run 2sls regression. And there is a bunch of dummies com…
How to plot these graphs?Dear all, I want to plot two graphs shown pictures below. I would appreciate if anyone can help me …
Stochastic Search and Optimization in StataDear all, I am having a panel data of some quality indicators say ind1 ind2 it's up to ind8 and som…
Subscribe to:
Post Comments (Atom)
0 Response to Sorting a variable by two dummy variables
Post a Comment