1

Please be patient with me. I'm new to this site.

I am modeling turtle nest survival using the coxph() function and have run into a confusing problem with an interaction term between species and nest cages. I have nests from 3 species of turtles (7, 10, and 111 nests per species).

There are nest cages on all nests for the species(1) with 7 nests.

There are no nest cages on all the nests for the species(2) with 10 nests.

There are nest cages on about half of the nests for the species(3) with 111 nests.

Here is my model with the summary output:

    S<-Surv(time, event)

    n8<-coxph(S~species:cage, data=nesta1)
    Warning message:
    In coxph(S ~ species:cage, data = nesta1) :
      X matrix deemed to be singular; variable 1 5 6

    summary(n8)

    Call:
    coxph(formula = S ~ species:cage, data = nesta1)

      n= 128, number of events= 73 

                         coef exp(coef) se(coef)      z Pr(>|z|)   
    species1:cageN      NA        NA   0.0000     NA       NA   
    species2:cageN  1.2399    3.4554   0.3965  3.128  0.00176 **
    species3:cageN  0.5511    1.7351   0.2664  2.068  0.03860 * 
    species1:cageY -0.1054    0.8999   0.6145 -0.172  0.86379   
    species2:cageY      NA        NA   0.0000     NA       NA   
    species3:cageY      NA        NA   0.0000     NA       NA   
    ---
    Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

                      exp(coef) exp(-coef) lower .95 upper .95
    species1:cageN        NA         NA        NA        NA
    species2:cageN    3.4554     0.2894    1.5887     7.515
    species3:cageN    1.7351     0.5763    1.0293     2.925
    species1:cageY    0.8999     1.1112    0.2698     3.001
    species2:cageY        NA         NA        NA        NA
    species3:cageY        NA         NA        NA        NA

    Concordance= 0.61  (se = 0.038 )
    Rsquare= 0.079   (max possible= 0.993 )
    Likelihood ratio test= 10.57  on 3 df,   p=0.01426
    Wald test            = 11.36  on 3 df,   p=0.009908
    Score (logrank) test = 12.22  on 3 df,   p=0.006672

I understand that I would have singularities for species 1 and 2, but not for species 3. Why would the "species3:cageY" line be singular when there are species 3 nests with nest cages on them? Is it ok to include species 1 and 2 even though they have those singularities?

Edit: I cannot find any errors in my data. I have decimal numbers for the time variable for a few nests, but that doesn't seem to be a problem for species 3 nests without a nest cage. For species 3, I have the full range of time values for nests with and without a nest cage and I have both true and false events for nests with and without a nest cage.

Edit: with( nesta1, table(event, species, cage))

      , , cage = N

           species
    event    1    2    3
        0    0    1   24
        1    0    9   38

    , , cage = Y

         species
    event    1    2    3
        0    4    0   26
        1    3    0   23

Edit 2: I understand that interaction-only models are not very useful, but the interaction term results behave the same way whether I have other main effects in the model or not. I've removed the other main effects to simplify this question.

Thank you!

  • Post the results of `with( nesta1 , table(event, species, cage))`. Generally construction models with only interaction terms and no main effects will create data-driven mathematical disasters. – IRTFM Apr 05 '16 at 06:06
  • I had a larger model with other main effects and got the same results. I cut the model down in this question to try to simplify it. I've added the results you asked for, but I'm not sure what they mean. – Hannah Mccurdy-Adams Apr 06 '16 at 14:40
  • Point 1 should be that interaction only models are generally a waste of time because there is so much difficulty in interpreting them. If you are not sure what they mean, that's not surprising since most people don't either. They don't usually correspond to hypotheses that are interesting. I'm not sure I need to go to Point 2 given Point 1. With my MD hat on I say that if it hurts when you twist your software that way, well then .... don't do it. – IRTFM Apr 06 '16 at 16:46
  • I understand that interaction-only models are not useful, but I made it interaction-only to simplify my question. Using AIC, all my top models included the interaction term as well as other variables. The interaction results behave the same way with other variables in the model, so I removed them for simplicity for this question. I think I understand what this interaction means for species 1 and 2. It's species 3 I'm confused about because there are nests with and without cages, but the results show NA). I thought I was controlling for variation by adding the interaction term. – Hannah Mccurdy-Adams Apr 09 '16 at 16:04

0 Answers0