Dear statalists,

I really would appreciate your help.

I am trying to estimate the simplest model for time to retirement for couples assuming independence between partners. I have written the code for ml and I get an error message telling "too few variables specified" just before the line code for maximizing the LL function and I am not able to find what is wrong.

My data:

I look at time to retirement since first quarter 2010 until 2017 for couples working in the first quarter 2010.
Each row corresponds to a quarter. id is the uniq identifier for couples. Each individual has the dummy for censored data.

The Baseline hazard is piecewise constant (tp). These dummies are included in each beta. I asume that the time increment is unitary.

The model is based on An, Christensen and Gupta (2004)

The code for this is in the following file: ( Array


Thanks for your time and help

Best wishes
Amparo