I have a longitudinal dataset of about 350,000 individuals who had diagnostic measurements taken within a specific time period. The number of measurements per individual varies and the measurement itself is represented by a rank (1-6). The measurement can only progress (i.e. it can't be 3 and then revert to 2 at a later date). I am trying to estimate the age at which each individual reached rank of 2, which must occur between the last appointment they were measured as a 1 and the first appointment they were measured as a 2.

I have tried modeling the progression from rank 1 (lower asymptote, $b_0$) to rank 6 (upper asymptote, $b_1$) as a function of Age ($A$) with the following nonlinear function:

$$T(A) = b_0 + (b_1 - b_0) \frac{1}{1+ e^{-\alpha(A-\lambda)}}$$

in a mixed effects model with random effects for both $\alpha$ and $\lambda$, but run into major convergence issues.

Are there any suggestions for how to approach this problem? Keep in mind that not everyone is interval censored, there is also strong presence of right and left censoring.

  • $\begingroup$ Please say more about the "nonlinear mixed effect models" that you tried, and what additional information you have available to estimate the "age at which each individual reached rank of 2." You seem to have the date of the last visit with rank 1 and the date of the first visit with rank 2. Do you have anything else? $\endgroup$
    – EdM
    Commented Aug 17, 2020 at 22:33
  • $\begingroup$ @EdM - Yes, I have the date at each visit and I have used that to calculate the age at each visit. I don't think my other variables are relevant to the outcome I'm interested in. Is there something in particular you had in mind? As for the nonlinear mixed effects model, I was interested in estimating age of entry into rank 2, as well as the rate at which individuals were progressing so I used a logistic function embedded within the NLME model. $\endgroup$ Commented Aug 17, 2020 at 23:25
  • $\begingroup$ This is the SAS code I used for the model PROC NLMIXED DATA=cohort ; b0=1; *lower asymptote=1 ; b1=6; *upper asymptote=6; *Nonlinear mixed effects model equation; traject=b0+(b1-b0)*(1/(1+exp(-alpha*(Age-lambda)))); MODEL measurement ~ NORMAL(traject, v_e); RANDOM alpha lambda ~ NORMAL ([m_alpha, m_lambda], [v_alpha, cov_alam, v_lambda]) SUBJECT=id ; PARMS m_alpha=0.65 m_lambda=12.62 v_e=0.41 v_alpha=0.0118 v_lambda=0.9644 cov_alam= 0.004; RUN; $\endgroup$ Commented Aug 17, 2020 at 23:31
  • $\begingroup$ I can get the model to converge with a smaller subset of my data. But I can't seem to find appropriate starting values for the parameters when I use my full cohort. :( $\endgroup$ Commented Aug 17, 2020 at 23:32
  • $\begingroup$ @EdM Thank you for your insight. One thing I wanted to point out is that it is expected for all individuals to experience ranks 1-6. If an individual does not have info on a particular rank it can because they were lost to follow up, or there was a long gap between appointments so we missed seeing them at certain ranks, or as you mentioned their progression may be slow so we were unable to observe the more advanced ones by the end of follow-up. I do not think death is a concern in this particular population. The biggest issue is the variability in # of appts, and time between each appt. $\endgroup$ Commented Aug 21, 2020 at 2:21

1 Answer 1


Finding starting values to get useful fits of nonlinear functions is often a challenge. I think that in this case you have made your problem more difficult by your choice of function. A different modeling approach is needed.

First, your function for the progression of rank with time is for an exponential asymptotic rise starting from a rank value of 1. But that functional form implies that a rank value of 6 is only reached at infinite age. Presumably some individuals who reach a rank value of 6 do not live infinitely long. That poses a problem for model fitting.

Second, if your goal is

trying to estimate the age at which each individual reached rank of 2, which must occur between the last appointment they were measured as a 1 and the first appointment they were measured as a 2.

then your function doesn't impose that restriction.

Third, if you only care about the very first event, the transition from rank 1 to rank 2, the function perhaps weights too heavily the ages at which the higher ranks are reached.

Fourth, the function doesn't explicitly include the data censoring that you note. For example, say someone never goes on from rank 2 to rank 3. Does that mean the person just progressed very slowly, or did the person die soon after reaching rank 2 and never got to rank 3? That difference could have substantially different implications for your modeling of that first event. This type of modeling poses a strong danger of such survivorship bias.

So instead of trying to get better starting values for fitting this function, you should concentrate on a better way to model the age at that specific first event of interest. You need to take into account the upper and lower limits that you have for that age, the censoring of times of progression among ranks, and the non-infinite time horizon.

I suspect that what you want is a repeated-events survival model that, in addition to the right-censoring of intervals for which you only have a lower limit for the time between professions in rank,* takes into account the interval censoring for the observations that you have. You would have to make some assumptions about the transition probabilities from rank to rank. For example: is the probability of transition from rank 1 to rank 2 the same as that for all subsequent transitions, or is there some systematic slowing or quickening for later transitions? The icenReg package in R might provide the tools you need, although I have no direct experience with that package or with interval censoring in general.

*Make sure that you really have "left censoring." That means that you have only an upper limit for the value of interest. Sometimes that terminology leads to confusion. Say, for example, that rank 1 might have been achieved at some time before your study started. So with respect to the age at which rank 1 was reached you do have left censoring in that you know it happened at an age no older than the age at your study start. But with respect to the age interval between reaching rank 1 and reaching rank 2 (which is what a repeated-event survival model would examine), you still have interval censoring: the interval could be as short as almost 0 (reached rank 1 at study start and almost immediately progressed to rank 2) or as long as the age at the visit that first identified rank 2.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.