Many thanks to both of you!
I've been extremely busy over the last days so I couldn't work that much on the model. I've thus need to have a closer look at this later.
Now the model do not converge....I tried different dependent variable and this is always the same problem: "did not converge".
Is it a problem in the modelling or the data?
Best,
Jérémy
"Did not converge" isn't the same as "Will not noverge". We can address the first with the NLOPTIONS statement, and by adjusting the convergence criterion in the PROC GLIMMIX statement. In order to be of assistance, though, I need to see code and output for that code, especially the iteration history
Steve Denham
Hi Steve,
I included the code as well as the SAS output. Is that all you need?
I'm really grateful for your help here!
proc glimmix data=candidates;
nloptions maxiter=100;
class commune ;
model binouverture (event='1') = EurostatA EurostatC sizelog ENP commune
/ solution dist=binary link=logit ddfm=kenwardrogers ; /* Addresses individual commune levels, and adds the Kenward-Rogers adjustment for repeated measures designs. This also applies the averaged effects of the continuous covariates across all communes */
random intercept / subject= commune solution residual; /* Converts to a repeated measures design. Even though this is a RANDOM statement, the residual option means treat the values within a commune as correlated. */
lsmeans commune/ilink cl; /* Outputs the estimates for each level of commune, on both the logit and original scale */
run;
Jérémy
Le Système SAS |
The GLIMMIX Procedure
Data Set | WORK.CANDIDATES |
---|---|
Response Variable | binouverture |
Response Distribution | Binary |
Link Function | Logit |
Variance Function | Default |
Variance Matrix Blocked By | Commune |
Estimation Technique | Residual PL |
Degrees of Freedom Method | Kenward-Roger |
Fixed Effects SE Adjustment | Prasad-Rao-Kackar-Harville-Jeske |
Commune | 252 | Aiseau-Presles Amay Amel Andenne Anderlues Anhée Ans Anthisnes Antoing Arlon Assesse Ath Attert Aubange Aubel Awans Aywaille Baelen Bassange Bastogne Beaumont Beauraing Beauvechain Beloeil Berloz Bernissart Bertogne Bertrix Beyne-Heusay Binche Bièvre Blegny Bouillon Boussu Braine-l'Alleud Braine-le-Château Braine-le-Comte Braives Brugelette Brunehaut Burdinne Burg-Reuland Büllingen Bütgenbach Celles Cerfontaine Chapelle-Lez-Herlaimont Charleroi Chastre Chaudfontaine Chaumont-Gistoux Chimay Chiny Chièvres Châtelet Ciney Colfontaine Comblain-au-Pont Comines-Warneton Courcelles Court-St-Etienne Couvin Crisnée Dalhem Dinant Dison Doische Donceel Dour Durbuy Ecaussinnes Eghezée Ellezelles Enghien Engis Erezée Erquelinnes Esneux Estaimpuis Estinnes Etalle Eupen Faimes Farciennes Fauvillers Fernelmont Ferrières Fexhe-le-Haut-Clocher Flemalle Fleurus Flobecq Floreffe Florennes Florenville Fléron Fontaine-l'Evêque Fosses-la-Ville Frameries Frasnes-lez-Anvaing Froidchapelle Gedinne Geer Gembloux Genappe Gerpinnes Gesves Gouvy Grace-Hollogne Grez-Doiceau Habay Ham-sur-Heure-Nalinnes Hamois Hannut Hastière Havelange Hensies Herbeumont Herstal Herve Honnelles Hotton Houffalize Houyet Huy Hélecine Héron Incourt Ittre Jalhay Jemeppe-sur-Sambre Jodoigne Juprelle Jurbise Kelmis La Bruyère La Hulpe La Louvière La Roche-en-Ardenne Lasne Le Roeulx Lens Les-Bons-Villers Lessines Leuze-en-Hainaut Libramont-Chevigny Lierneux Limbourg Lincent Liège Lobbes Lontzen Malmedy Manage Manhay Marche-en-Famenne Marchin Martelange Meix-devant-Virton Merbes-le-Château Messancy Mettet Modave Momignies Mons Mont-St-Guibert Mont-de-l'Enclus Montigny-le-Tilleul Morlanwelz Mouscron Musson Namur Nandrin Nassogne Neufchâteau Neupré Nivelles Ohey Olne Onhaye Oreye Orp-Jauche Ottignies-LLN Ouffet Oupeye Paliseul Pecq Pepinster Perwez Philippeville Plombières Pont-à-Celles Profondeville Péruwelz Quaregnon Quiévrain Quévy Raeren Ramilies Rebecq Remicourt Rixensart Rochefort Rouvroy Rumes Saint Nicolas Saint-Georges-sur-Meuse Saint-Ghislain Saint-Hubert Sainte-Ode Sambreville Sankt Vith Seneffe Seraing Silly Sivry-Rance Soignies Sombreffe Somme-Leuze Soumagne Spa Sprimont Stavelot Stoumont Tellin Theux Thimister-Clermont Thuin Tinlot Tintigny Tournai Trooz Tubize Vaux-sur-Sûre Verlaine Verviers Vielsalm Villers-la-Ville Villers-le-Bouillet Viroinval Virton Visé Vresse-sur-Semois Walcourt Walhain Wanze Waremme Wasseiges Waterloo Wavre Welkenraedt Wellin Yvoir |
---|
Number of Observations Read | 804 |
---|---|
Number of Observations Used | 803 |
1 | 0 | 476 |
---|---|---|
2 | 1 | 327 |
R-side Cov. Parameters | 1 |
---|---|
Columns in X | 257 |
Columns in Z per Subject | 0 |
Subjects (Blocks in V) | 252 |
Max Obs per Subject | 14 |
Optimization Technique | None |
---|---|
Parameters | 0 |
Lower Boundaries | 0 |
Upper Boundaries | 0 |
Fixed Effects | Profiled |
Residual Variance | Profiled |
Starting From | Data |
0 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
---|---|---|---|---|---|
1 | 0 | 0 | 1.340781E154 | 1.13896683 | . |
2 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
3 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
4 | 0 | 0 | 1.340781E154 | 0.91900698 | . |
5 | 0 | 0 | 3460.7243613 | 2.00000000 | . |
6 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
7 | 0 | 0 | 3728.5751363 | 2.00000000 | . |
8 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
9 | 0 | 0 | 3993.8654206 | 2.00000000 | . |
10 | 0 | 0 | 4127.2354391 | 2.00000000 | . |
11 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
12 | 0 | 0 | 4394.1129597 | 2.00000000 | . |
13 | 0 | 0 | 4525.2340423 | 2.00000000 | . |
14 | 0 | 0 | 4658.3500927 | 2.00000000 | . |
15 | 0 | 0 | 4791.7156 | 2.00000000 | . |
16 | 0 | 0 | 4924.1913727 | 2.00000000 | . |
17 | 0 | 0 | 5059.8010277 | 2.00000000 | . |
18 | 0 | 0 | 5191.3961115 | 2.00000000 | . |
19 | 0 | 0 | 5324.1823992 | 2.00000000 | . |
20 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
21 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
22 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
23 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
24 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
25 | 0 | 0 | 1.340781E154 | 0.99810273 | . |
26 | 0 | 0 | 1.340781E154 | 0.81393176 | . |
27 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
28 | 0 | 0 | 3148.7088811 | 2.00000000 | . |
29 | 0 | 0 | 3281.2624666 | 2.00000000 | . |
30 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
31 | 0 | 0 | 3547.6660221 | 2.00000000 | . |
32 | 0 | 0 | 3677.9846413 | 2.00000000 | . |
33 | 0 | 0 | 3814.0718304 | 2.00000000 | . |
34 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
35 | 0 | 0 | 1.340781E154 | 0.14868120 | . |
36 | 0 | 0 | 4210.5072254 | 2.00000000 | . |
37 | 0 | 0 | 4346.0003696 | 2.00000000 | . |
38 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
39 | 0 | 0 | 1.340781E154 | 0.09425822 | . |
40 | 0 | 0 | 1.340781E154 | 0.09072392 | . |
41 | 0 | 0 | 4877.3197427 | 2.00000000 | . |
42 | 0 | 0 | 5009.6182614 | 2.00000000 | . |
43 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
44 | 0 | 0 | 1.340781E154 | 0.06120650 | . |
45 | 0 | 0 | 5409.7912614 | 2.00000000 | . |
46 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
47 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
48 | 0 | 0 | 16935.289247 | 2.00000000 | . |
49 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
50 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
51 | 0 | 0 | 1.340781E154 | 0.99810273 | . |
52 | 0 | 0 | 1.340781E154 | 0.81393176 | . |
53 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
54 | 0 | 0 | 3148.7088811 | 2.00000000 | . |
55 | 0 | 0 | 3281.2624666 | 2.00000000 | . |
56 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
57 | 0 | 0 | 3547.6660221 | 2.00000000 | . |
58 | 0 | 0 | 3677.9846413 | 2.00000000 | . |
59 | 0 | 0 | 3814.0718304 | 2.00000000 | . |
60 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
61 | 0 | 0 | 1.340781E154 | 0.14868120 | . |
62 | 0 | 0 | 4210.5072254 | 2.00000000 | . |
63 | 0 | 0 | 4346.0003696 | 2.00000000 | . |
64 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
65 | 0 | 0 | 1.340781E154 | 0.09425822 | . |
66 | 0 | 0 | 1.340781E154 | 0.09072392 | . |
67 | 0 | 0 | 4877.3197427 | 2.00000000 | . |
68 | 0 | 0 | 5009.6182614 | 2.00000000 | . |
69 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
70 | 0 | 0 | 1.340781E154 | 0.06120650 | . |
71 | 0 | 0 | 5409.7912614 | 2.00000000 | . |
72 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
73 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
74 | 0 | 0 | 16935.289247 | 2.00000000 | . |
75 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
76 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
77 | 0 | 0 | 1.340781E154 | 0.99810273 | . |
78 | 0 | 0 | 1.340781E154 | 0.81393176 | . |
79 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
80 | 0 | 0 | 3148.7088811 | 2.00000000 | . |
81 | 0 | 0 | 3281.2624666 | 2.00000000 | . |
82 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
83 | 0 | 0 | 3547.6660221 | 2.00000000 | . |
84 | 0 | 0 | 3677.9846413 | 2.00000000 | . |
85 | 0 | 0 | 3814.0718304 | 2.00000000 | . |
86 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
87 | 0 | 0 | 1.340781E154 | 0.14868120 | . |
88 | 0 | 0 | 4210.5072254 | 2.00000000 | . |
89 | 0 | 0 | 4346.0003696 | 2.00000000 | . |
90 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
91 | 0 | 0 | 1.340781E154 | 0.09425822 | . |
92 | 0 | 0 | 1.340781E154 | 0.09072392 | . |
93 | 0 | 0 | 4877.3197427 | 2.00000000 | . |
94 | 0 | 0 | 5009.6182614 | 2.00000000 | . |
95 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
96 | 0 | 0 | 1.340781E154 | 0.06120650 | . |
97 | 0 | 0 | 5409.7912614 | 2.00000000 | . |
98 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
99 | 0 | 0 | 1.340781E154 | 2.00000000 | . |
Did not converge. |
Residual (VC) | 1.0328 | . |
---|
I may have spoken too hastily. This has all the symptoms of quasi-separation--for at least some of the communes, all of the values are either 1 or zero, and all of the continuous covariates are identical. I think you will either have to relinquish the hope of finding marginal estimates (i.e., consider commune to be a random effect), or find a way to collapse the communes into some larger categorization that eliminates the quasi-separation. There is a major problem in trying to estimate 258 parameters from only 803 observations. A rule of thumb for getting decent estimates is at least 5, and preferably 10, observations per parameter. I think you may be able to build a respectable model if you could collapse the commune variable into 70 or 80 "super-commune" levels.
Steve Denham
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.