OPTIONS LS=80 ; TITLE1 RIESBY DATA - Hamilton Depression Scores Across Time; DATA ONE; INPUT ID HamD Intcpt Week Endog EndWeek ; WEEKC = WEEK + 1; CARDS; 106 21 1 0 1 0 106 25 1 1 1 1 106 23 1 2 1 2 106 18 1 3 1 3 106 20 1 4 1 4 106 . 1 5 1 5 107 21 1 0 1 0 107 21 1 1 1 1 107 16 1 2 1 2 107 19 1 3 1 3 107 . 1 4 1 4 107 6 1 5 1 5 ..... more data ...... ; PROC MIXED METHOD=ML COVTEST; CLASS ID; MODEL HAMD = WEEK ENDOG ENDWEEK /SOLUTION; RANDOM INTERCEPT /SUB=ID TYPE=UN G; TITLE 'Random Intercept Model'; PROC MIXED METHOD=ML COVTEST; CLASS ID WEEKC; MODEL HAMD = WEEK ENDOG ENDWEEK /SOLUTION; REPEATED WEEKC /SUB=ID TYPE=AR(1) R RCORR; TITLE 'AR(1) Model'; PROC MIXED METHOD=ML COVTEST; CLASS ID WEEKC; MODEL HAMD = WEEK ENDOG ENDWEEK /SOLUTION; REPEATED WEEKC /SUB=ID TYPE=UN R RCORR; TITLE 'Unstructured Model'; RUN; PROC GENMOD; CLASS ID WEEKC; MODEL HAMD = WEEK ENDOG ENDWEEK / DIST=NORMAL LINK=IDENTITY; REPEATED SUBJECT=ID / WITHIN=WEEKC CORRW TYPE=EXCH; TITLE 'Exchangeable Model'; PROC GENMOD; CLASS ID WEEKC; MODEL HAMD = WEEK ENDOG ENDWEEK / DIST=NORMAL LINK=IDENTITY; REPEATED SUBJECT=ID / WITHIN=WEEKC CORRW TYPE=AR(1); TITLE 'AR(1) Model'; PROC GENMOD; CLASS ID WEEKC; MODEL HAMD = WEEK ENDOG ENDWEEK / DIST=NORMAL LINK=IDENTITY; REPEATED SUBJECT=ID / WITHIN=WEEKC CORRW TYPE=MDEP(5); TITLE 'Toeplitz (5) Model'; PROC GENMOD; CLASS ID WEEKC; MODEL HAMD = WEEK ENDOG ENDWEEK / DIST=NORMAL LINK=IDENTITY; REPEATED SUBJECT=ID / WITHIN=WEEKC CORRW TYPE=UN MAXIT=200; TITLE 'Unstructured Model'; RUN; Random Intercept Model The MIXED Procedure G Matrix Effect ID Row COL1 INTERCEPT 101 1 15.28474645 Covariance Parameter Estimates (MLE) Cov Parm Subject Estimate Std Error Z Pr > |Z| UN(1,1) ID 15.28474645 3.25770195 4.69 0.0001 Residual 19.03509762 1.53129013 12.43 0.0001 Model Fitting Information for HAMD Description Value Observations 375.0000 Log Likelihood -1141.07 Akaike's Information Criterion -1143.07 Schwarz's Bayesian Criterion -1147.00 -2 Log Likelihood 2282.137 Null Model LRT Chi-Square 108.3017 Null Model LRT DF 1.0000 Null Model LRT P-Value 0.0000 Solution for Fixed Effects Effect Estimate Std Error DF t Pr > |t| INTERCEPT 22.44162996 0.93906232 64 23.90 0.0001 WEEK -2.35184269 0.19801780 307 -11.88 0.0001 ENDOG 1.99287252 1.26341082 307 1.58 0.1157 ENDWEEK -0.04417597 0.27058959 307 -0.16 0.8704 Tests of Fixed Effects Source NDF DDF Type III F Pr > F WEEK 1 307 141.06 0.0001 ENDOG 1 307 2.49 0.1157 ENDWEEK 1 307 0.03 0.8704 AR(1) Model The MIXED Procedure R Correlation Matrix for ID 101 Row COL1 COL2 COL3 COL4 COL5 1 1.00000000 0.65823607 0.43327472 0.28519705 0.18772699 2 0.65823607 1.00000000 0.65823607 0.43327472 0.28519705 3 0.43327472 0.65823607 1.00000000 0.65823607 0.43327472 4 0.28519705 0.43327472 0.65823607 1.00000000 0.65823607 5 0.18772699 0.28519705 0.43327472 0.65823607 1.00000000 6 0.12356867 0.18772699 0.28519705 0.43327472 0.65823607 R Correlation Matrix for ID 101 COL6 0.12356867 0.18772699 0.28519705 0.43327472 0.65823607 1.00000000 Covariance Parameter Estimates (MLE) Cov Parm Subject Estimate Std Error Z Pr > |Z| AR(1) ID 0.65823607 0.03896015 16.90 0.0001 Residual 35.17196129 3.65203402 9.63 0.0001 Model Fitting Information for HAMD Description Value Observations 375.0000 Log Likelihood -1113.35 Akaike's Information Criterion -1115.35 Schwarz's Bayesian Criterion -1119.28 -2 Log Likelihood 2226.702 Null Model LRT Chi-Square 163.7369 Null Model LRT DF 1.0000 Null Model LRT P-Value 0.0000 Solution for Fixed Effects Effect Estimate Std Error DF t Pr > |t| INTERCEPT 22.48635225 1.06779020 64 21.06 0.0001 WEEK -2.30090974 0.29477607 307 -7.81 0.0001 ENDOG 1.70730910 1.43556089 64 1.19 0.2387 ENDWEEK 0.00154675 0.39810576 307 0.00 0.9969 Tests of Fixed Effects Source NDF DDF Type III F Pr > F WEEK 1 307 60.93 0.0001 ENDOG 1 64 1.41 0.2387 ENDWEEK 1 307 0.00 0.9969 Unstructured Model The MIXED Procedure R Correlation Matrix for ID 101 Row COL1 COL2 COL3 COL4 COL5 1 1.00000000 0.47976942 0.36513358 0.30226872 0.22574497 2 0.47976942 1.00000000 0.45045673 0.38973541 0.25287715 3 0.36513358 0.45045673 1.00000000 0.71374267 0.65224858 4 0.30226872 0.38973541 0.71374267 1.00000000 0.80024805 5 0.22574497 0.25287715 0.65224858 0.80024805 1.00000000 6 0.15336192 0.18110694 0.48557289 0.61413012 0.66606080 R Correlation Matrix for ID 101 COL6 0.15336192 0.18110694 0.48557289 0.61413012 0.66606080 1.00000000 Covariance Parameter Estimates (MLE) Cov Parm Subject Estimate Std Error Z Pr > |Z| UN(1,1) ID 19.84269269 3.58883525 5.53 0.0001 UN(2,1) ID 9.85073130 2.97501680 3.31 0.0009 UN(2,2) ID 21.24570789 3.93461605 5.40 0.0001 UN(3,1) ID 8.71313130 3.28302428 2.65 0.0080 UN(3,2) ID 11.12271628 3.48135945 3.19 0.0014 UN(3,3) ID 28.69751949 5.06443083 5.67 0.0001 UN(4,1) ID 8.44981120 3.62876051 2.33 0.0199 UN(4,2) ID 11.27350502 3.87761689 2.91 0.0036 UN(4,3) ID 23.99481120 5.16933899 4.64 0.0001 UN(4,4) ID 39.38283683 6.87422437 5.73 0.0001 UN(5,1) ID 6.85366169 3.94222706 1.74 0.0821 UN(5,2) ID 7.94418728 4.07786315 1.95 0.0514 UN(5,3) ID 23.81439752 5.51663218 4.32 0.0001 UN(5,4) ID 34.22806889 6.78256066 5.05 0.0001 UN(5,5) ID 46.45244251 8.19512400 5.67 0.0001 UN(6,1) ID 5.09012668 4.33133261 1.18 0.2399 UN(6,2) ID 6.21987207 4.51201051 1.38 0.1680 UN(6,3) ID 19.38149873 5.68974223 3.41 0.0007 UN(6,4) ID 28.71604631 7.24952080 3.96 0.0001 UN(6,5) ID 33.82430662 8.07436607 4.19 0.0001 UN(6,6) ID 55.51642556 10.77057405 5.15 0.0001 Model Fitting Information for HAMD Description Value Observations 375.0000 Log Likelihood -1094.37 Akaike's Information Criterion -1115.37 Schwarz's Bayesian Criterion -1156.61 -2 Log Likelihood 2188.748 Null Model LRT Chi-Square 201.6905 Null Model LRT DF 20.0000 Null Model LRT P-Value 0.0000 Solution for Fixed Effects Effect Estimate Std Error DF t Pr > |t| INTERCEPT 22.58436517 0.76794811 64 29.41 0.0001 WEEK -2.32497898 0.29152024 64 -7.98 0.0001 ENDOG 1.77546843 1.03409531 64 1.72 0.0908 ENDWEEK 0.07646670 0.39368439 64 0.19 0.8466 Tests of Fixed Effects Source NDF DDF Type III F Pr > F WEEK 1 64 63.61 0.0001 ENDOG 1 64 2.95 0.0908 ENDWEEK 1 64 0.04 0.8466 Exchangeable Model The GENMOD Procedure Model Information Description Value Data Set WORK.ONE Distribution NORMAL Link Function IDENTITY Dependent Variable HAMD Observations Used 375 Missing Values 21 GEE Model Information Description Value Correlation Structure Exchangeable Within-Subject Effect WEEKC (6 levels) Subject Effect ID (66 levels) Number of Clusters 66 Clusters With Missing Values 20 Correlation Matrix Dimension 6 Maximum Cluster Size 6 Minimum Cluster Size 4 Working Correlation Matrix COL1 COL2 COL3 COL4 COL5 COL6 ROW1 1.0000 0.4398 0.4398 0.4398 0.4398 0.4398 ROW2 0.4398 1.0000 0.4398 0.4398 0.4398 0.4398 ROW3 0.4398 0.4398 1.0000 0.4398 0.4398 0.4398 ROW4 0.4398 0.4398 0.4398 1.0000 0.4398 0.4398 ROW5 0.4398 0.4398 0.4398 0.4398 1.0000 0.4398 ROW6 0.4398 0.4398 0.4398 0.4398 0.4398 1.0000 Analysis Of GEE Parameter Estimates Empirical Standard Error Estimates Empirical 95% Confidence Limits Parameter Estimate Std Err Lower Upper Z Pr>|Z| INTERCEPT 22.4420 0.6324 21.2025 23.6814 35.488 0.0000 WEEK -2.3520 0.2811 -2.9029 -1.8010 -8.367 0.0000 ENDOG 1.9928 1.0248 -0.0157 4.0013 1.9446 0.0518 ENDWEEK -0.0442 0.4022 -0.8325 0.7441 -.1099 0.9125 Scale 5.8746 . . . . . NOTE: The scale parameter for GEE estimation was computed as the square root of the normalized Pearson's chi-square. AR(1) Model The GENMOD Procedure GEE Model Information Description Value Correlation Structure AR(1) Within-Subject Effect WEEKC (6 levels) Subject Effect ID (66 levels) Number of Clusters 66 Clusters With Missing Values 20 Correlation Matrix Dimension 6 Maximum Cluster Size 6 Minimum Cluster Size 4 Working Correlation Matrix COL1 COL2 COL3 COL4 COL5 COL6 ROW1 1.0000 0.6368 0.4056 0.2583 0.1645 0.1047 ROW2 0.6368 1.0000 0.6368 0.4056 0.2583 0.1645 ROW3 0.4056 0.6368 1.0000 0.6368 0.4056 0.2583 ROW4 0.2583 0.4056 0.6368 1.0000 0.6368 0.4056 ROW5 0.1645 0.2583 0.4056 0.6368 1.0000 0.6368 ROW6 0.1047 0.1645 0.2583 0.4056 0.6368 1.0000 Analysis Of GEE Parameter Estimates Empirical Standard Error Estimates Empirical 95% Confidence Limits Parameter Estimate Std Err Lower Upper Z Pr>|Z| INTERCEPT 22.4835 0.6595 21.1909 23.7761 34.092 0.0000 WEEK -2.3036 0.2683 -2.8295 -1.7776 -8.585 0.0000 ENDOG 1.7223 1.0330 -0.3023 3.7468 1.6673 0.0955 ENDWEEK -0.0001 0.3938 -0.7719 0.7717 -.0002 0.9998 Scale 5.8785 . . . . . NOTE: The scale parameter for GEE estimation was computed as the square root of the normalized Pearson's chi-square. Toeplitz (5) Model The GENMOD Procedure GEE Model Information Description Value Correlation Structure 5-Dependent Within-Subject Effect WEEKC (6 levels) Subject Effect ID (66 levels) Number of Clusters 66 Clusters With Missing Values 20 Correlation Matrix Dimension 6 Maximum Cluster Size 6 Minimum Cluster Size 4 Working Correlation Matrix COL1 COL2 COL3 COL4 COL5 COL6 ROW1 1.0000 0.6369 0.4657 0.3133 0.1620 0.1328 ROW2 0.6369 1.0000 0.6369 0.4657 0.3133 0.1620 ROW3 0.4657 0.6369 1.0000 0.6369 0.4657 0.3133 ROW4 0.3133 0.4657 0.6369 1.0000 0.6369 0.4657 ROW5 0.1620 0.3133 0.4657 0.6369 1.0000 0.6369 ROW6 0.1328 0.1620 0.3133 0.4657 0.6369 1.0000 Analysis Of GEE Parameter Estimates Empirical Standard Error Estimates Empirical 95% Confidence Limits Parameter Estimate Std Err Lower Upper Z Pr>|Z| INTERCEPT 22.5110 0.6677 21.2023 23.8197 33.713 0.0000 WEEK -2.3103 0.2707 -2.8409 -1.7798 -8.535 0.0000 ENDOG 1.6753 1.0341 -0.3514 3.7021 1.6201 0.1052 ENDWEEK 0.0273 0.3962 -0.7492 0.8037 0.0689 0.9451 Scale 5.8793 . . . . . NOTE: The scale parameter for GEE estimation was computed as the square root of the normalized Pearson's chi-square. Unstructured Model The GENMOD Procedure GEE Model Information Description Value Correlation Structure Unstructured Within-Subject Effect WEEKC (6 levels) Subject Effect ID (66 levels) Number of Clusters 66 Clusters With Missing Values 20 Correlation Matrix Dimension 6 Maximum Cluster Size 6 Minimum Cluster Size 4 Working Correlation Matrix COL1 COL2 COL3 COL4 COL5 COL6 ROW1 1.0000 0.4803 0.2691 -0.1805 -0.4261 -0.7712 ROW2 0.4803 1.0000 0.1795 -0.0828 -0.2303 -0.4329 ROW3 0.2691 0.1795 1.0000 0.0102 -0.0924 -0.2068 ROW4 -0.1805 -0.0828 0.0102 1.0000 0.1890 0.2408 ROW5 -0.4261 -0.2303 -0.0924 0.1890 1.0000 0.4565 ROW6 -0.7712 -0.4329 -0.2068 0.2408 0.4565 1.0000 Analysis Of GEE Parameter Estimates Empirical Standard Error Estimates Empirical 95% Confidence Limits Parameter Estimate Std Err Lower Upper Z Pr>|Z| INTERCEPT 22.8204 0.7111 21.4266 24.2142 32.090 0.0000 WEEK -2.4007 0.2728 -2.9354 -1.8660 -8.800 0.0000 ENDOG 1.5787 1.0841 -0.5461 3.7035 1.4562 0.1453 ENDWEEK 0.0160 0.3881 -0.7446 0.7767 0.0413 0.9670 Scale 15.8856 . . . . . NOTE: The scale parameter for GEE estimation was computed as the square root of the normalized Pearson's chi-square. HOWEVER from LOG file --------------------- NOTE: The working correlation has been ridged with a maximum value of 0.079120397 to avoid singularity. NOTE: The working correlation has been ridged with a maximum value of 1.1230780424 to avoid singularity. NOTE: The working correlation has been ridged with a maximum value of 0.084793656 to avoid singularity. NOTE: The working correlation has been ridged with a maximum value of 1.4977902015 to avoid singularity. NOTE: The working correlation has been ridged with a maximum value of 0.079120397 to avoid singularity. NOTE: The working correlation has been ridged with a maximum value of 1.1230780424 to avoid singularity. NOTE: The working correlation has been ridged with a maximum value of 0.084793656 to avoid singularity. NOTE: The working correlation has been ridged with a maximum value of 1.4977902015 to avoid singularity. NOTE: No convergence of GEE parameter estimates after 200 iterations.