Hey Guillaume, I work with hospital cost, charge, and length of stay data, using PRC GLIMMIX. Hopefully I can provide some insight. So, from what i can tell, you've set up your models pretty well! Unfortunately, (as i have found) no matter what you do, there sometimes can be hangups with the modeling process, given the specifics of your data. Here are a few specifics about my data/models - so that you can make a comparison a little easier. All of the data is continuous (Gamma dist), or Count (Negative Binomial dist) I'm using a 2 - level model Here are the things that helped me: (most all this is from the SAS help docs for GLIMMIX) I ran into the "Unable to...quadratic variance estimates" problem as well Using the GLIMMIX statement: Increase the number of iterations within the INITGLM setting by setting INITITER to something high. (I've found the compute time and resource costs are close to nothing for this option). *Note* Based on stuff I've read, you want to be cautious when using the Laplace method with binary data, as with too few samples per cluster, or not enough clusters, you may get biased results; however, the small sample size bias diminishes quickly given that you have enough samples or observations within samples, according so SAS. The alternative is to use the Quad method, and if it ends up only using "1 point" in the output statistics, then you'll probably be just fine using Laplace. You can always manually set Quad(Qpoints=7) and compare the results to those of Laplace. Also, prepare yourself, this is going to take significantly longer... If you think that small sample/obs per sample is an issue, you can set the EMPERICAL option to "MBN". Using the MODEL statement: You probably won't have to do this; however, I've found that setting the DDFM option to "BW" generally speeds things up quite a bit. I've also noticed that in my models that scaling any continuous variables seems to help quite a bit. So you might consider doing that. Using the RANDOM statement: You probably won't have to do this, either; however, if the covariance estimates you get seem a little off, i would set the TYPE option to "Chol" for the covariance structure. As I've found that it makes things a bit more stable (as the help guide recommends over the "UN" method. Although, only having a random int, it shouldn't be that big of an issue). I would output the Random Intercept Solution just to make sure that you aren't ending up with ridiculous estimates/confidence intervals. Also, they might be useful for comparison later on. You set these with the S and CL options. Using the PARMS statement: Try examining the covariance parameters from a simpler model, and putting those as "Starting values" for the 2 - level model, by using the "Parms" statement. If that doesn't work, make your own starting values with something like this (change the values to a range that you think is appropriate for your data). Also, you have to name them (CovP1, CovP2), as that is what SAS expects to see when you pass them in using the Parms statement. data baseParms;
CovP2 = .01; /*Use your own value here to start the loop, this probably won't be useful for your data*/
do while (CovP2 < .1);
CovP1 = .01; /*Use your own value here to start the second loop, again it may not be useful for your data*/
do while (CovP1 <= .1);
output;
CovP1 = CovP1 + .01;
end;
CovP2 = CovP2 + .01;
end;
run; Using the "NLOPTIONS" statement: Jack up the maxitier and maxfunc way up there: Given that you are working with binary data, i think that i've read that the suggested optimization method is NRRIDG. Although, if I'm wrong with that, i hope people chime in. If you run into convergence issues (which seems to be an issue sometimes), try setting Gconv to something greater than the default of 1e-8. Honestly, i would set this to 1e-4 so that the model runs faster...then when you know the model works, set that back to 1e-8 Here is what i might try: ODS SELECT CovParms;
proc glimmix method=laplace ;
class nearest_center fvh (ref='0') ;
model recanalisation_complete (event='1') = / dist=binary link=logit solution oddsratio ;
random intercept / subject=nearest_center ;
ODS OUTPUT CovParms=Parms;
run;
quit;
ODS SELECT ALL;
ODS SELECT FitStatistics CovParms Test3 OddsRatios;
proc glimmix method=laplace inititer=100 empirical=mbn;
class nearest_center fvh (ref='0') ;
model recanalisation_complete (event='1') = thrombus_length fvh /dist=binary link=logit solution oddsratio;
parms /ParmsData=Parms; /*These are the values from above. Optionally use the "baseparms" file from above if the simpiler model doesn't work*/
random intercept / subject=nearest_center s cl; nloptions tech=nrridg gconv=1e-6 maxiter=10000 maxfunc=10000; ods output SolutionR=RandomEffects; title "Model Results";
run; quit; ODS SELECT All; Hopefully that helps!! And if i've given any inaccurate advice, i hope that there are some corrections!! (also my code didn't really output well in the box, but just pretend i structured it super well)
... View more