I'm trying to construct a discrete-time survival model to analyse some mating data. I've used a Cox proportional hazards model previously but got some input that the discrete-time survival model would fit my data better.
The previous post and my results I got from R there can be found here and can work as a good background for understanding my output.
When I tried to do the discrete-time survival model I didn't even get close to the results I got from the Cox proportional hazards model. I've reformatted my data to the following format:
and the list goes on..
I have three different combinations of A and B that is:
A B
High High
Low Low
Metabolite Metabolite
I'm interested in comparing when mating occurs between the different treatment (observation round 1-9 - in my dataset called Round) and if mating occur Mating_time = 1 during that round and if mating time didn't occur = 0. I also wan to look at the interaction between A and B (A*B)
I've fitted the data to a glm in the following manner:
mod<-glm(Round ~ Mating_time + A*B,data=dat, family = "binomial")
and then when running ANOVA I get the following output:
> Anova(mod)
Analysis of Deviance Table (Type II tests)
Response: Round
LR Chisq Df Pr(>Chisq)
Mating_time 0.46970 1 0.4931
A 0.00027 2 0.9999
B 0.00024 2 0.9999
A : B 0.00041 4 1.0000
This is completely different from my previous result posted here (same link as before)
I'm wondering if anyone have a clue what I've done wrong. Should the data instead be coded as 1 for Mating_time for all the observations after mating have occurred?
E.g.