I am trying to understand how both temperature (factor: 6 levels - 20, 23, 26, 29, 32, 35 degrees Celsius) and species (factor: 2 levels HA and AP) affects the likelihood of moving from one life stage to the next (in this case from the 2nd instar to the 3rd) using a logistic regression model as below:
X3rdmodelA <- glm(cbind(No.3rd,No.2nd-No.3rd) ~ Temperature * Species, data=X2ndto3rd, weights = No.2nd, family = binomial(link="logit"))
When I try to run the model the following error appears:
Warning message:
glm.fit: algorithm did not converge
Would anyone be able to tell me why this error might be occurring and what I may do to fix it.
Below is the data I am using if this is helpful:
Temperature Species No.2nd No.3rd
20 AP 32 30
23 AP 53 50
26 AP 46 39
29 AP 72 66
32 AP 38 32
35 AP 3 7
20 HA 41 41
23 HA 48 42
26 HA 117 113
29 HA 89 87
32 HA 42 42
35 HA 59 39
Any help anyone could provide would be greatly appreciated.
20 HA 41 41to20 HA 41 40? – Sycorax Nov 23 '22 at 00:05