0

So I have data at the individual level like so :

ageband <- factor(0:5) event.true <- c(1487,1863,1038,874,424,12) event.false <- c(50997,32216,16723,12224,7990,1928)

df <- as.data.frame(cbind(ageband,event.true,event.false))

Here is the weird part :

results <- coxph(tsurv ~ ageband0 + ageband1 + ageband2+ ageband3 + ageband4 +ageband5, data = df)

I get this warning message :

Warning message: In fitter(X, Y, strats, offset, init, control, weights = weights, : Loglik converged before variable 1,2,3,4,5,6 ; beta may be infinite.

and all of the p-values are exactly 1 ...

  • ageband0 1
  • ageband1 1
  • ageband2 1
  • ageband3 1
  • ageband4 1
  • ageband5 1

Which is really weird, because in previous datasets that I had not cleaned, age was always significant ...

Negarev
  • 79
  • 2
  • 8
  • Your example is not reproducible, e.g. `Error in eval(predvar, data, env): object 'tsurv' not found`. – Maurits Evers Dec 05 '17 at 01:59
  • Ewww. Badness (serious badness) lurks in the construction: `as.data.frame(cbind( ...` . You should discard any text that suggests this is a good way to make dataframes. And that criticism is going to be followed by a deprecation of using discrete categories for what is undoubtedly a continuous variable. – IRTFM Dec 05 '17 at 02:57
  • ageband was entered improperly in the formula. Also. There’s no ‘tsurv’ – IRTFM Dec 05 '17 at 07:02

0 Answers0