I'm working on analyzing a dataset with the following structure:
+------------------------------+
| gender race state died alive |
+------------------------------+
| f w ny 40 450 |
| m w ny 20 300 |
| f b ny 45 300 |
+------------------------------+
etc
Hence since this dataset contains $2$ genders, $2$ races, and $5$ states, there are $2\times2\times5 = 20$ rows. The died and alive columns are the number of people who died and lived within that combination of categories.
My question here is how do i test for significance in a dataset like this, particularly in R? I want to see whether the categories given have an effect on the number of people who died or lived, but I'm not sure how to go about it. For every test I've researched, it seems like it doesn't quite fit the problem.
One thing I also tried was adding an extra column to report the percentage. i.e. in R:
mydata$percentage = mydata$died / (mydata$died + mydata$alive)