Fractional polynomial model not converging in Stata I am having trouble getting a fractional polynomial logistic model to converge using Stata 12. 
fracpoly, logistic: y x

I have tried


*

*centering the dependent variable

*transforming the variable 

*adding a fixed value to every observation so that there aren't any 'zeros'


I am trying to fit a 2nd order fractional polynomial using the default powers (-2, -1, -.5, 0, .5, 1, 2, 3). I have experimented, and found that the problem seems to occur with particular powers (-2, 2, 3) and so had been trying with just the remainder. However, I recently added another year's worth of data, and with this larger dataset, the model fails to converge even with this reduced set.
The variable looks like this
Variable: x
Obs:147778
Mean: 1.608095
SD: 1.572316
Min: .0792616
Max: 51.26371   

I have left the model running overnight, and it still fails to converge. If I set trace on then Stata is 'stuck' at 
version 11: mata: Mopt_maxmin()

Here is a running line smoother of the data if that helps.
 
 A: Questions arise at several levels here. 
First, as it appears that you have just one predictor then a graph of (average) y versus x should indicate (a) what model(s) is/are plausible (b) what pathologies in your data might be inhibiting or prohibiting convergence. Although fractional polynomials are a flexible family, they won't be able to cope with outliers or some other problems much more easily than anything else. But crucially your running mean graph implies some values of y below 0, which is quite inconsistent with fitting a logistic model. Regardless, the summary statistics for y are important too. 
Second, your results indicate a highly skewed predictor x, which may mean outliers. 
Third, if the tight turn on the left-hand side of your graph is a real feature it's a tough call for a fractional polynomial to mimic it. 
Fourth, Stata's optimizer was rewritten for Stata 11 (e.g. search for "Existing command ml has been rewritten" in http://www.stata.com/help.cgi?whatsnew10to11). One side-effect is that some models are reported as more difficult to fit, which makes it less surprising that you got different results with an older Stata. (To be clear, models more difficult to fit appear rare, but they get reported in places like this, in the same way that "man bites dog" is more newsworthy than "dog bites man".)
