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
Identify first non zero value, create new variableHi All, My data is individual level data. There are a series of variables, with "date" and then six…
Test of difference - unpaired 2 proportion survey data w/ clusteringHi there, I am trying to develop tests of difference for 2 unpaired sets of data from cross-section…
error obtaining starting values; try fitting a marginal model in order to diagnose the problemHi Statalist First time poster, long time reader here. I have searched the list and online for answ…
Escape code tags?\ Code: \ …
Conditioning for values within a variable while using foreachHi everyone! I'm new to the forum, but here it goes. I have the following code, where I'm just tryin…
Subscribe to:
Post Comments (Atom)
0 Response to Sorting a variable by two dummy variables
Post a Comment