I have the following data set which consists of the number of employees broken down by race for 19 firms.
data <- matrix(c(6073,1033,1711,3920,3431,2178,357,757,301,332,4204,
364,1006,337,553,7352,690,1356,1910,2066,4695,776,
1267,575,454,3761,352,529,130,658,5523,468,652,146,
312,5027,657,356,107,804,4650,311,674,78,599,4581,
192,581,114,335,1176,65,121,67,195,3841,274,289,71,
425,6489,1912,1784,1041,1434,1487,148,121,62,72,
4130,170,365,353,479,5181,2260,1023,219,502,1286,
1288,890,423,285,2536,289,359,61,424,6237,1504,
1117,179,911),ncol=5,byrow=TRUE)
colnames(data) <- c("White","Black","Hispanic","Asian","Unknown")
rownames(data) <- c("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S")
data <- as.table(data)
I am trying to use the pairwise.prop.table test in R to test for differences in the ethnicity of firms to see which are significantly different.
When I run: pairwise.prop.test(data[,c("White","Black","Hispanic","Asian","Unknown")])
I get "Error in pairwise.prop.test(smoke[, c("WHITE_COUNT", "BLACK_COUNT", "HISP_COUNT", 'x' must have 2 columns"
Is there another function that I can use? I would like to compare all 5 races per pairs of firms.
I would appreciate any help. Thank you!