0

I have run glm (for a logistic regression) and as result I got that the algorithm diverges. I want to try the function logistf to check whether Firth's approach can improve my data analysis. Let dat denote my dataframe and y ~ f1 + f2 be my model. Trying

fit <- logistf(y ~ f1 + f2, dat)

or

fit <- logistf(y ~ f1 + f2, data=dat)

I always get the error

Error in logistf.fit(x = x, y = y, weight = weight, offset = offset, firth,  : 
no loop for break/next, jumping to top level

As glm runs smoothly, I do not see how my data structure could be the source of error (this is why I have not described dat explicitly). Do you see any potential conflict? I thank you very much, Avitus

MichaelChirico
  • 33,841
  • 14
  • 113
  • 198
Avitus
  • 734
  • 2
  • 14
  • 27
  • I am unclear. You wrote that with glm the algorithm diverges but you also wrote that glm runs smoothly. Maybe post results of the glm analysis along with any associated messages. – Mark Miller May 30 '13 at 10:31
  • @Mark: glm diverges: this is a result I do accept; so for me the package runs and provides me with a sound answer. The problem with logistf is that it gives no answer at all, due to the above error message. What puzzles me is that the data and the model I use in both cases are the same... – Avitus May 30 '13 at 11:00
  • I think we need a reproducible example, please: http://tinyurl.com/reproducible-000 – Ben Bolker May 30 '13 at 12:17

0 Answers0