I am currently try to analyse differences in the number of individuals of certain insect species (factor: 2 levels - HA, AP) that reached a particular life-stage from the egg stage (e.g. 1st instar) at a range of different temperatures (factor: 5 levels - 20, 23, 26, 29, 32 degrees Celsius). I have data on the numbers of dead vs survived as well as the proportions of individuals that survived to each life stage.
I am trying to understand which analysis method I should use with this data and, given that both explanatory variables are factors, I thought that I should use a contingency table and Chi-squared test. However, I have only ever tried using a Chi-squared test with one factor and I am wondering if it is possible to complete a Chi-squared test when there are two explanatory variables (and also how might I do this in R). I did think that perhaps I should combine them into a single explanatory variable but I am not sure.
Also, if I can do this test, is there a way I can determine if the interaction between the two factors is significant. Also, is there a way I could gain within and between species comparisons between temperatures.
Any help that could be provided would be greatly appreciated.
Here is a sample of the data for the duration of the egg stage to give a better understanding. Prop.egg.to.1st is the proportion of the added eggs that hatched into 1st instar larvae. I have similar data sets for the proportion reaching the 2nd instar from the egg stage, 3rd instar from the egg stage etc. I also have similar data (not shown) detailing the proportion moving from the egg to the 1st instar, 1st instar to 2nd instar, 2nd instar to 3rd instar etc.
Temperature Species No.eggs.added No.hatched Prop.egg.to.1st 20 AP 56 37 0.66 23 AP 69 61 0.88 26 AP 139 65 0.47 29 AP 162 94 0.58