I am using nbreg (Stata MP 15.1) to analyze the rate of days on which patients use two different drugs. I don't think the format of the model matters here, but for completeness it is this:
The model does not converge. I allowed it to iterate overnight. The last several hundred iterations gave the same log pseudolikelihood and the message (not concave). Note that the Poisson model and the constant-only model do converge. It's the full model that does not.
However, a Poisson model (same as above, but substitute poisson for nbreg) of the same data does converge (quickly).
Interestingly, if I run the nbreg model starting from the poisson estimates, the nbreg model converges with no problems.
Is this a legitimate approach? There are two large-ish coefficients in the final estimate that might be affecting the convergence, but both are around 25.
Note that there are a large number of variables in the model, hence the size of the b1 matrix, but I have 13 million observations.
Code:
nbreg overlap_days independent_vars if drug1_days>0, exposure(drug1_days) vce(cluster patient_id) difficult
However, a Poisson model (same as above, but substitute poisson for nbreg) of the same data does converge (quickly).
Interestingly, if I run the nbreg model starting from the poisson estimates, the nbreg model converges with no problems.
Code:
poisson overlap_days independent_vars if drug1_days>0, exposure(drug1_days) vce(cluster patient_id) difficult matrix b0=e(b) matrix b1=J(1,126,1) matrix b1[1,1]=b0 nbreg overlap_days independent_vars if drug1_days>0, exposure(drug1_days) vce(cluster patient_id) difficult from(b1, copy)
Note that there are a large number of variables in the model, hence the size of the b1 matrix, but I have 13 million observations.
Comment