NEED TO ADD DATA TO SITE data pain2; infile 'i:atswebtextbookmlddatapain2.txt'; input id ses age_years age_months gender tmt0 cs0 helpful easy tol11 tol12 rat11 rat12 tol13 tol14 rat13 rat14 senscat1 cpantic1 ; run; DATA pain2_long1 ; set pain2; array rat(4) rat11 rat12 rat13 rat14; array tol(4) tol11 tol12 tol13 tol14; do trial = 1 to 4; if rat(trial) = -999 then rat(trial)=.; if tol(trial) = -999 then tol(trial)=.; rating = rat(trial); tolerance = tol(trial); log_tol = log2(tol(trial)); output; end; drop rat11 rat12 rat13 rat14 tol11 tol12 tol13 tol14; RUN ;
Table 13.1, page 380.
proc sql; create table pain2_long2 as select *, mean(rating) as mean_rating, rating-mean(rating) as dev_rating, count(rating) as freq_rating, count(tolerance) as freq_tol, (tmt0=1)*(trial = 4) as tmt1, (tmt0=2)*(trial = 4) as tmt2, (tmt0=3)*(trial = 4) as tmt3 from pain2_long1 group by id order by id, trial; quit; *Model 1; proc mixed data = pain2_long2 method = reml noclprint noitprint; class trial id cs0; model log_tol = rating cs0 tmt1 tmt2 tmt3 cs0*tmt1 cs0*tmt2 cs0*tmt3/solution notest; repeated trial / subject = id type = un; run;The Mixed Procedure Model Information Data Set WORK.PAIN2_LONG2 Dependent Variable log_tol Covariance Structure Unstructured Subject Effect id Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Between-Within Dimensions Covariance Parameters 10 Columns in X 13 Columns in Z 0 Subjects 64 Max Obs Per Subject 4 Number of Observations Number of Observations Read 256 Number of Observations Used 245 Number of Observations Not Used 11 Covariance Parameter Estimates Cov Parm Subject Estimate UN(1,1) id 0.9556 UN(2,1) id 0.7248 UN(2,2) id 1.1155 UN(3,1) id 0.9023 UN(3,2) id 0.8619 UN(3,3) id 1.3036 UN(4,1) id 0.5477 UN(4,2) id 0.7351 UN(4,3) id 0.8760 UN(4,4) id 1.0821 Fit Statistics -2 Res Log Likelihood 559.5 AIC (smaller is better) 579.5 AICC (smaller is better) 580.5 BIC (smaller is better) 601.1 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 9 163.83 <.0001 Solution for Fixed Effects Standard Effect cs0 Estimate Error DF t Value Pr > |t| Intercept 5.3852 0.2158 62 24.96 <.0001 rating -0.05543 0.02450 62 -2.26 0.0272 cs0 1 -0.5127 0.2336 62 -2.19 0.0320 cs0 2 0 . . . . tmt1 -0.08829 0.2161 62 -0.41 0.6842 tmt2 0.6980 0.2015 62 3.46 0.0010 tmt3 -0.4761 0.2172 62 -2.19 0.0321 tmt1*cs0 1 0.2591 0.2997 62 0.86 0.3908 tmt1*cs0 2 0 . . . . tmt2*cs0 1 -0.5352 0.2937 62 -1.82 0.0732 tmt2*cs0 2 0 . . . . tmt3*cs0 1 0.4578 0.3044 62 1.50 0.1377 tmt3*cs0 2 0 . . . . *Model 2; proc mixed data = pain2_long2 method = reml noclprint noitprint; where freq_tol = freq_rating =4; class trial id cs0; model log_tol = mean_rating cs0 tmt1 tmt2 tmt3 cs0*tmt1 cs0*tmt2 cs0*tmt3/solution notest; repeated trial / subject = id type = un; run; The Mixed Procedure Model Information Data Set WORK.PAIN2_LONG2 Dependent Variable log_tol Covariance Structure Unstructured Subject Effect id Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Between-Within Dimensions Covariance Parameters 10 Columns in X 13 Columns in Z 0 Subjects 58 Max Obs Per Subject 4 Number of Observations Number of Observations Read 232 Number of Observations Used 232 Number of Observations Not Used 0 Covariance Parameter Estimates Cov Parm Subject Estimate UN(1,1) id 1.0329 UN(2,1) id 0.7712 UN(2,2) id 1.1759 UN(3,1) id 0.9612 UN(3,2) id 0.8813 UN(3,3) id 1.3342 UN(4,1) id 0.5877 UN(4,2) id 0.7646 UN(4,3) id 0.8921 UN(4,4) id 1.1140 Fit Statistics -2 Res Log Likelihood 533.9 AIC (smaller is better) 553.9 AICC (smaller is better) 554.9 BIC (smaller is better) 574.5 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 9 157.91 <.0001 Solution for Fixed Effects Standard Effect cs0 Estimate Error DF t Value Pr > |t| Intercept 5.5215 0.4389 55 12.58 <.0001 mean_rating -0.07018 0.07229 55 -0.97 0.3359 cs0 1 -0.6438 0.2533 55 -2.54 0.0139 cs0 2 0 . . . . tmt1 -0.2115 0.2154 55 -0.98 0.3304 tmt2 0.6754 0.2062 55 3.28 0.0018 tmt3 -0.4573 0.2395 55 -1.91 0.0615 tmt1*cs0 1 0.3509 0.3053 55 1.15 0.2554 tmt1*cs0 2 0 . . . . tmt2*cs0 1 -0.5479 0.2992 55 -1.83 0.0725 tmt2*cs0 2 0 . . . . tmt3*cs0 1 0.4156 0.3296 55 1.26 0.2126 tmt3*cs0 2 0 . . . . *Model 3; proc mixed data = pain2_long2 method = reml noclprint noitprint; where freq_tol = freq_rating =4; class trial id cs0; model log_tol = dev_rating cs0 tmt1 tmt2 tmt3 cs0*tmt1 cs0*tmt2 cs0*tmt3/solution notest; repeated trial / subject = id type = un; run; The Mixed Procedure Model Information Data Set WORK.PAIN2_LONG2 Dependent Variable log_tol Covariance Structure Unstructured Subject Effect id Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Between-Within Dimensions Covariance Parameters 10 Columns in X 13 Columns in Z 0 Subjects 58 Max Obs Per Subject 4 Number of Observations Number of Observations Read 232 Number of Observations Used 232 Number of Observations Not Used 0 Covariance Parameter Estimates Cov Parm Subject Estimate UN(1,1) id 1.0140 UN(2,1) id 0.7635 UN(2,2) id 1.1538 UN(3,1) id 0.9728 UN(3,2) id 0.9151 UN(3,3) id 1.3898 UN(4,1) id 0.5985 UN(4,2) id 0.7645 UN(4,3) id 0.9463 UN(4,4) id 1.1417 Fit Statistics -2 Res Log Likelihood 532.7 AIC (smaller is better) 552.7 AICC (smaller is better) 553.7 BIC (smaller is better) 573.3 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 9 162.64 <.0001 Solution for Fixed Effects Standard Effect cs0 Estimate Error DF t Value Pr > |t| Intercept 5.1457 0.1775 56 29.00 <.0001 dev_rating -0.05545 0.02678 56 -2.07 0.0430 cs0 1 -0.6363 0.2510 56 -2.53 0.0141 cs0 2 0 . . . . tmt1 -0.1115 0.2208 56 -0.50 0.6156 tmt2 0.6755 0.2051 56 3.29 0.0017 tmt3 -0.4158 0.2389 56 -1.74 0.0873 tmt1*cs0 1 0.3104 0.3047 56 1.02 0.3128 tmt1*cs0 2 0 . . . . tmt2*cs0 1 -0.5125 0.2980 56 -1.72 0.0910 tmt2*cs0 2 0 . . . . tmt3*cs0 1 0.3821 0.3282 56 1.16 0.2492 tmt3*cs0 2 0 . . . . *Model 4; proc mixed data = pain2_long2 method = reml noclprint noitprint; where freq_tol = freq_rating =4; class trial id cs0; model log_tol = dev_rating mean_rating cs0 tmt1 tmt2 tmt3 cs0*tmt1 cs0*tmt2 cs0*tmt3/solution notest; repeated trial / subject = id type = un; estimate 'deviation - average' dev_rating 1 mean_rating -1; run; The Mixed Procedure Model Information Data Set WORK.PAIN2_LONG2 Dependent Variable log_tol Covariance Structure Unstructured Subject Effect id Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Between-Within Dimensions Covariance Parameters 10 Columns in X 14 Columns in Z 0 Subjects 58 Max Obs Per Subject 4 Number of Observations Number of Observations Read 232 Number of Observations Used 232 Number of Observations Not Used 0 Covariance Parameter Estimates Cov Parm Subject Estimate UN(1,1) id 1.0041 UN(2,1) id 0.7675 UN(2,2) id 1.1717 UN(3,1) id 0.9490 UN(3,2) id 0.9051 UN(3,3) id 1.3521 UN(4,1) id 0.5856 UN(4,2) id 0.7659 UN(4,3) id 0.9202 UN(4,4) id 1.1269 Fit Statistics -2 Res Log Likelihood 535.3 AIC (smaller is better) 555.3 AICC (smaller is better) 556.3 BIC (smaller is better) 575.9 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 9 159.50 <.0001 Solution for Fixed Effects Standard Effect cs0 Estimate Error DF t Value Pr > |t| Intercept 5.5208 0.4345 55 12.71 <.0001 dev_rating -0.05527 0.02688 55 -2.06 0.0445 mean_rating -0.06863 0.07152 55 -0.96 0.3415 cs0 1 -0.6337 0.2515 55 -2.52 0.0147 cs0 2 0 . . . . tmt1 -0.1071 0.2209 55 -0.49 0.6295 tmt2 0.6707 0.2053 55 3.27 0.0019 tmt3 -0.4139 0.2390 55 -1.73 0.0889 tmt1*cs0 1 0.2903 0.3053 55 0.95 0.3458 tmt1*cs0 2 0 . . . . tmt2*cs0 1 -0.4906 0.2992 55 -1.64 0.1068 tmt2*cs0 2 0 . . . . tmt3*cs0 1 0.3791 0.3282 55 1.16 0.2531 tmt3*cs0 2 0 . . . . Estimates Standard Label Estimate Error DF t Value Pr > |t| deviation - average 0.01335 0.07605 55 0.18 0.8612
Table 13.2, page 383.
data pain2_tol (rename=log_tol=response) pain2_rating (rename=rating=response); set pain2_long2; type = "t"; output pain2_tol; type = "r"; output pain2_rating; run; data bi_pain2; set pain2_tol pain2_rating; drop rating tolerance log_tol; run; proc sort data = bi_pain2; by id trial type; run; proc mixed data = bi_pain2 method = reml noclprint noitprint covtest; class trial id type cs0; model response = type*cs0 type*tmt1 type*tmt2 type*tmt3 type*cs0*tmt1 type*cs0*tmt2 type*cs0*tmt3/ notest; random type /subject =id type = un; repeated / subject = id(trial) type = un; run; The Mixed Procedure Model Information Data Set WORK.BI_PAIN2 Dependent Variable response Covariance Structure Unstructured Subject Effects id, id(trial) Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Containment Dimensions Covariance Parameters 6 Columns in X 23 Columns in Z Per Subject 2 Subjects 64 Max Obs Per Subject 8 Number of Observations Number of Observations Read 512 Number of Observations Used 490 Number of Observations Not Used 22 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) id 2.1317 0.5059 4.21 <.0001 UN(2,1) id -0.2740 0.2045 -1.34 0.1804 UN(2,2) id 0.7936 0.1598 4.97 <.0001 UN(1,1) id(trial) 2.3931 0.2557 9.36 <.0001 UN(2,1) id(trial) -0.1279 0.06916 -1.85 0.0645 UN(2,2) id(trial) 0.3432 0.03667 9.36 <.0001 Fit Statistics -2 Res Log Likelihood 1568.8 AIC (smaller is better) 1580.8 AICC (smaller is better) 1581.0 BIC (smaller is better) 1593.8 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 5 310.59 <.0001
Table 13.3, page 384.
*Model 1; proc mixed data = bi_pain2 method = reml noclprint noitprint covtest ; class trial id type cs0; model response = type*cs0 type*tmt1 type*tmt2 type*tmt3 type*cs0*tmt1 type*cs0*tmt2 type*cs0*tmt3/ notest; random type /subject =id type = un; repeated / subject = id(trial) type = un; run; The Mixed Procedure Model Information Data Set WORK.BI_PAIN2 Dependent Variable response Covariance Structure Unstructured Subject Effects id, id(trial) Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Containment Dimensions Covariance Parameters 6 Columns in X 23 Columns in Z Per Subject 2 Subjects 64 Max Obs Per Subject 8 Number of Observations Number of Observations Read 512 Number of Observations Used 490 Number of Observations Not Used 22 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) id 2.1317 0.5059 4.21 <.0001 UN(2,1) id -0.2740 0.2045 -1.34 0.1804 UN(2,2) id 0.7936 0.1598 4.97 <.0001 UN(1,1) id(trial) 2.3931 0.2557 9.36 <.0001 UN(2,1) id(trial) -0.1279 0.06916 -1.85 0.0645 UN(2,2) id(trial) 0.3432 0.03667 9.36 <.0001 Fit Statistics -2 Res Log Likelihood 1568.8 AIC (smaller is better) 1580.8 AICC (smaller is better) 1581.0 BIC (smaller is better) 1593.8 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 5 310.59 <.0001 *Model 2; proc mixed data = bi_pain2 method = reml noclprint noitprint covtest; class trial id type cs0; model response = type*cs0 type*tmt1 type*tmt2 type*tmt3 type*cs0*tmt1 type*cs0*tmt2 type*cs0*tmt3/ notest; random type /subject =id type = un; repeated / subject = id(trial) type = un(1); run; The Mixed Procedure Model Information Data Set WORK.BI_PAIN2 Dependent Variable response Covariance Structure Unstructured Subject Effects id, id(trial) Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Containment Dimensions Covariance Parameters 6 Columns in X 23 Columns in Z Per Subject 2 Subjects 64 Max Obs Per Subject 8 Number of Observations Number of Observations Read 512 Number of Observations Used 490 Number of Observations Not Used 22 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) id 2.1369 0.5068 4.22 <.0001 UN(2,1) id -0.3083 0.2039 -1.51 0.1306 UN(2,2) id 0.7955 0.1601 4.97 <.0001 UN(1,1) id(trial) 2.3916 0.2554 9.37 <.0001 UN(2,1) id(trial) 0 . . . UN(2,2) id(trial) 0.3430 0.03662 9.37 <.0001 Fit Statistics -2 Res Log Likelihood 1572.3 AIC (smaller is better) 1582.3 AICC (smaller is better) 1582.5 BIC (smaller is better) 1593.1 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 4 307.06 <.0001 *Model 3; proc mixed data = bi_pain2 method = reml noclprint noitprint covtest; class trial id type cs0; model response = type*cs0 type*tmt1 type*tmt2 type*tmt3 type*cs0*tmt1 type*cs0*tmt2 type*cs0*tmt3/ notest; random type /subject =id type = un(1); repeated / subject = id(trial) type = un; run; The Mixed Procedure Model Information Data Set WORK.BI_PAIN2 Dependent Variable response Covariance Structure Banded Subject Effects id, id(trial) Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Containment Dimensions Covariance Parameters 6 Columns in X 23 Columns in Z Per Subject 2 Subjects 64 Max Obs Per Subject 8 Number of Observations Number of Observations Read 512 Number of Observations Used 490 Number of Observations Not Used 22 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) id 2.0976 0.5001 4.19 <.0001 UN(2,1) id 0 . . . UN(2,2) id 0.7846 0.1582 4.96 <.0001 UN(1,1) id(trial) 2.4029 0.2576 9.33 <.0001 UN(2,1) id(trial) -0.1370 0.06961 -1.97 0.0491 UN(2,2) id(trial) 0.3444 0.03693 9.33 <.0001 Fit Statistics -2 Res Log Likelihood 1570.7 AIC (smaller is better) 1580.7 AICC (smaller is better) 1580.8 BIC (smaller is better) 1591.5 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 4 308.67 <.0001 *Model 4; proc mixed data = bi_pain2 method = reml noclprint noitprint covtest; class trial id type cs0; model response = type*cs0 type*tmt1 type*tmt2 type*tmt3 type*cs0*tmt1 type*cs0*tmt2 type*cs0*tmt3/ notest; random type /subject =id type = un(1); repeated / subject = id(trial) type = un(1); run; The Mixed Procedure Model Information Data Set WORK.BI_PAIN2 Dependent Variable response Covariance Structure Banded Subject Effects id, id(trial) Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Containment Dimensions Covariance Parameters 6 Columns in X 23 Columns in Z Per Subject 2 Subjects 64 Max Obs Per Subject 8 Number of Observations Number of Observations Read 512 Number of Observations Used 490 Number of Observations Not Used 22 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) id 2.1264 0.5050 4.21 <.0001 UN(2,1) id 0 . . . UN(2,2) id 0.7938 0.1598 4.97 <.0001 UN(1,1) id(trial) 2.3947 0.2560 9.36 <.0001 UN(2,1) id(trial) 0 . . . UN(2,2) id(trial) 0.3432 0.03667 9.36 <.0001 Fit Statistics -2 Res Log Likelihood 1574.8 AIC (smaller is better) 1582.8 AICC (smaller is better) 1582.8 BIC (smaller is better) 1591.4 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 3 304.63 <.0001
Table 13.4, page 384.
data cog_arith (rename=arithmetic=response) cog_ravens (rename=ravens=response); set cognitive; type = "a"; output cog_arith; type = "r"; output cog_ravens; run; data bi_cog; set cog_arith cog_ravens; drop arithmetic ravens; newtmt = treatment; if relyear<0 then newtmt = "control"; run; proc sort data = bi_cog; by id relmonth type; run; proc mixed data = bi_cog method = reml noclprint noitprint covtest; class sex id treatment newtmt type rn; model response = type*sex type*relyear type*newtmt*relyear/ notest; random type /subject =id type = un; repeated / subject = id(rn) type = un; run; The Mixed Procedure Model Information Data Set WORK.BI_COG Dependent Variable response Covariance Structure Unstructured Subject Effects id, id(rn) Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Containment Dimensions Covariance Parameters 6 Columns in X 15 Columns in Z Per Subject 2 Subjects 546 Max Obs Per Subject 10 Number of Observations Number of Observations Read 5460 Number of Observations Used 5196 Number of Observations Not Used 264 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) id 1.4977 0.1083 13.83 <.0001 UN(2,1) id 1.1602 0.1231 9.42 <.0001 UN(2,2) id 2.4601 0.2284 10.77 <.0001 UN(1,1) id(rn) 1.2662 0.03960 31.97 <.0001 UN(2,1) id(rn) 0.3370 0.06053 5.57 <.0001 UN(2,2) id(rn) 5.8398 0.1824 32.02 <.0001 Fit Statistics -2 Res Log Likelihood 21414.9 AIC (smaller is better) 21426.9 AICC (smaller is better) 21426.9 BIC (smaller is better) 21452.7 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 5 2221.59 <.0001
Table 13.5, page 386.
proc mixed data = bi_cog method = reml noclprint noitprint covtest; class sex id treatment newtmt type rn; model response = type*sex type*relyear type*newtmt*relyear/ notest; random type type*relyear /subject =id type = un; repeated / subject = id(rn) type = un; run; The Mixed Procedure Model Information Data Set WORK.BI_COG Dependent Variable response Covariance Structure Unstructured Subject Effects id, id(rn) Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Containment Dimensions Covariance Parameters 13 Columns in X 15 Columns in Z Per Subject 4 Subjects 546 Max Obs Per Subject 10 Number of Observations Number of Observations Read 5460 Number of Observations Used 5196 Number of Observations Not Used 264 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) id 1.5650 0.1250 12.52 <.0001 UN(2,1) id 1.1499 0.1423 8.08 <.0001 UN(2,2) id 2.2916 0.2792 8.21 <.0001 UN(3,1) id -0.08745 0.05491 -1.59 0.1112 UN(3,2) id -0.07814 0.07596 -1.03 0.3036 UN(3,3) id 0.1483 0.04283 3.46 0.0003 UN(4,1) id 0.04597 0.1115 0.41 0.6800 UN(4,2) id -0.03737 0.1807 -0.21 0.8362 UN(4,3) id 0.1099 0.06656 1.65 0.0986 UN(4,4) id 0.7748 0.2021 3.83 <.0001 UN(1,1) id(rn) 1.1756 0.04235 27.76 <.0001 UN(2,1) id(rn) 0.2697 0.06447 4.18 <.0001 UN(2,2) id(rn) 5.3625 0.1941 27.63 <.0001 Fit Statistics -2 Res Log Likelihood 21370.9 AIC (smaller is better) 21396.9 AICC (smaller is better) 21396.9 BIC (smaller is better) 21452.8
Table 13.7, page 388.
proc sort data = bi_pain2; by id type trial; run; proc mixed data = bi_pain2 method = reml noclprint noitprint covtest; class trial id type cs0; model response = type*cs0 type*tmt1 type*tmt2 type*tmt3 type*cs0*tmt1 type*cs0*tmt2 type*cs0*tmt3/ notest; repeated / subject = id type = un rcorr; run;The Mixed Procedure Model Information Data Set WORK.BI_PAIN2 Dependent Variable response Covariance Structure Unstructured Subject Effect id Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Between-Within Dimensions Covariance Parameters 36 Columns in X 23 Columns in Z 0 Subjects 64 Max Obs Per Subject 8 Number of Observations Number of Observations Read 512 Number of Observations Used 490 Number of Observations Not Used 22 Estimated R Correlation Matrix for id 1 Row Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 1 1.0000 0.6372 0.4770 0.3226 -0.2843 -0.1466 -0.3092 -0.1942 2 0.6372 1.0000 0.4501 0.3414 -0.1433 -0.1321 -0.1906 -0.1650 3 0.4770 0.4501 1.0000 0.5349 -0.09852 0.09599 -0.1650 -0.01596 4 0.3226 0.3414 0.5349 1.0000 -0.06124 0.009164 -0.09867 -0.1009 5 -0.2843 -0.1433 -0.09852 -0.06124 1.0000 0.7041 0.8212 0.5543 6 -0.1466 -0.1321 0.09599 0.009164 0.7041 1.0000 0.7121 0.6774 7 -0.3092 -0.1906 -0.1650 -0.09867 0.8212 0.7121 1.0000 0.7378 8 -0.1942 -0.1650 -0.01596 -0.1009 0.5543 0.6774 0.7378 1.0000 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) id 4.7331 0.8639 5.48 <.0001 UN(2,1) id 3.0201 0.7255 4.16 <.0001 UN(2,2) id 4.7462 0.8579 5.53 <.0001 UN(3,1) id 2.2001 0.6563 3.35 0.0008 UN(3,2) id 2.0786 0.6736 3.09 0.0020 UN(3,3) id 4.4937 0.8517 5.28 <.0001 UN(4,1) id 1.4039 0.6264 2.24 0.0250 UN(4,2) id 1.4876 0.6127 2.43 0.0152 UN(4,3) id 2.2682 0.6467 3.51 0.0005 UN(4,4) id 4.0014 0.7625 5.25 <.0001 UN(5,1) id -0.6197 0.2908 -2.13 0.0331 UN(5,2) id -0.3128 0.2848 -1.10 0.2721 UN(5,3) id -0.2092 0.2805 -0.75 0.4557 UN(5,4) id -0.1227 0.2683 -0.46 0.6473 UN(5,5) id 1.0037 0.1807 5.55 <.0001 UN(6,1) id -0.3409 0.3029 -1.13 0.2603 UN(6,2) id -0.3077 0.3032 -1.01 0.3102 UN(6,3) id 0.2176 0.2988 0.73 0.4666 UN(6,4) id 0.01960 0.2834 0.07 0.9449 UN(6,5) id 0.7541 0.1683 4.48 <.0001 UN(6,6) id 1.1430 0.2100 5.44 <.0001 UN(7,1) id -0.7806 0.3402 -2.29 0.0218 UN(7,2) id -0.4817 0.3378 -1.43 0.1539 UN(7,3) id -0.4058 0.3282 -1.24 0.2164 UN(7,4) id -0.2290 0.3142 -0.73 0.4660 UN(7,5) id 0.9546 0.1927 4.95 <.0001 UN(7,6) id 0.8834 0.1981 4.46 <.0001 UN(7,7) id 1.3463 0.2472 5.45 <.0001 UN(8,1) id -0.4443 0.3124 -1.42 0.1550 UN(8,2) id -0.3781 0.3076 -1.23 0.2190 UN(8,3) id -0.03559 0.2982 -0.12 0.9050 UN(8,4) id -0.2123 0.2854 -0.74 0.4570 UN(8,5) id 0.5841 0.1577 3.70 0.0002 UN(8,6) id 0.7619 0.1788 4.26 <.0001 UN(8,7) id 0.9005 0.2005 4.49 <.0001 UN(8,8) id 1.1066 0.2101 5.27 <.0001 Fit Statistics -2 Res Log Likelihood 1524.4 AIC (smaller is better) 1596.4 AICC (smaller is better) 1602.5 BIC (smaller is better) 1674.2 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 35 354.96 <.0001
Table 13.8, page 389.
*Bivar RI; proc mixed data = bi_pain2 method = reml noclprint noitprint covtest; class trial id type cs0; model response = type*cs0 type*tmt1 type*tmt2 type*tmt3 type*cs0*tmt1 type*cs0*tmt2 type*cs0*tmt3/ notest; random type /subject =id type = un; repeated / subject = id(trial) type = un; run; The Mixed Procedure Model Information Data Set WORK.BI_PAIN2 Dependent Variable response Covariance Structure Unstructured Subject Effects id, id(trial) Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Containment Dimensions Covariance Parameters 6 Columns in X 23 Columns in Z Per Subject 2 Subjects 64 Max Obs Per Subject 8 Number of Observations Number of Observations Read 512 Number of Observations Used 490 Number of Observations Not Used 22 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) id 2.1317 0.5059 4.21 <.0001 UN(2,1) id -0.2740 0.2045 -1.34 0.1804 UN(2,2) id 0.7936 0.1598 4.97 <.0001 UN(1,1) id(trial) 2.3931 0.2557 9.36 <.0001 UN(2,1) id(trial) -0.1279 0.06916 -1.85 0.0645 UN(2,2) id(trial) 0.3432 0.03667 9.36 <.0001 Fit Statistics -2 Res Log Likelihood 1568.8 AIC (smaller is better) 1580.8 AICC (smaller is better) 1581.0 BIC (smaller is better) 1593.8 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 5 310.59 <.0001 *Ind RI; proc mixed data = bi_pain2 method = reml noclprint noitprint covtest; class trial id type cs0; model response = type*cs0 type*tmt1 type*tmt2 type*tmt3 type*cs0*tmt1 type*cs0*tmt2 type*cs0*tmt3/ notest; random type /subject =id type = un(1); repeated / subject = id(trial) type = un(1); run; The Mixed Procedure Model Information Data Set WORK.BI_PAIN2 Dependent Variable response Covariance Structure Banded Subject Effects id, id(trial) Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Containment Dimensions Covariance Parameters 6 Columns in X 23 Columns in Z Per Subject 2 Subjects 64 Max Obs Per Subject 8 Number of Observations Number of Observations Read 512 Number of Observations Used 490 Number of Observations Not Used 22 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) id 2.1264 0.5050 4.21 <.0001 UN(2,1) id 0 . . . UN(2,2) id 0.7938 0.1598 4.97 <.0001 UN(1,1) id(trial) 2.3947 0.2560 9.36 <.0001 UN(2,1) id(trial) 0 . . . UN(2,2) id(trial) 0.3432 0.03667 9.36 <.0001 Fit Statistics -2 Res Log Likelihood 1574.8 AIC (smaller is better) 1582.8 AICC (smaller is better) 1582.8 BIC (smaller is better) 1591.4 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 3 304.63 <.0001 *PCUN: proc mixed data = bi_pain2 method = reml noclprint noitprint covtest; class trial id type cs0; model response = type*cs0 type*tmt1 type*tmt2 type*tmt3 type*cs0*tmt1 type*cs0*tmt2 type*cs0*tmt3/ noint notest; repeated trial type/ subject = id type = un@un; run; The Mixed Procedure Model Information Data Set WORK.BI_PAIN2 Dependent Variable response Covariance Structure Unstructured @ Unstructured Subject Effect id Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Between-Within Dimensions Covariance Parameters 13 Columns in X 22 Columns in Z 0 Subjects 64 Max Obs Per Subject 8 Number of Observations Number of Observations Read 512 Number of Observations Used 490 Number of Observations Not Used 22 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z trial UN(1,1) id 5.2498 0.7804 6.73 <.0001 UN(2,1) id 3.6753 0.6647 5.53 <.0001 UN(2,2) id 5.7007 0.8563 6.66 <.0001 UN(3,1) id 3.8333 0.7274 5.27 <.0001 UN(3,2) id 3.6546 0.7317 4.99 <.0001 UN(3,3) id 6.2221 0.9756 6.38 <.0001 UN(4,1) id 2.3249 0.5826 3.99 <.0001 UN(4,2) id 2.9566 0.6463 4.57 <.0001 UN(4,3) id 3.7839 0.7365 5.14 <.0001 UN(4,4) id 5.2698 0.8302 6.35 <.0001 type UN(1,1) id 1.0000 0 . . UN(2,1) id -0.06394 0.02678 -2.39 0.0170 UN(2,2) id 0.1688 0.02253 7.50 <.0001 Fit Statistics -2 Res Log Likelihood 1553.4 AIC (smaller is better) 1577.4 AICC (smaller is better) 1578.0 BIC (smaller is better) 1603.3 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 11 326.04 <.0001 *INDUN; proc sort data = bi_pain2; by type id trial; run; proc mixed data = bi_pain2 method = reml noclprint noitprint covtest; by type; class id trial type cs0; model response = type*cs0 type*tmt1 type*tmt2 type*tmt3 type*cs0*tmt1 type*cs0*tmt2 type*cs0*tmt3/ notest; repeated / subject = id type = un; run; type=r The Mixed Procedure Model Information Data Set WORK.BI_PAIN2 Dependent Variable response Covariance Structure Unstructured Subject Effect id Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Between-Within Dimensions Covariance Parameters 10 Columns in X 12 Columns in Z 0 Subjects 64 Max Obs Per Subject 4 Number of Observations Number of Observations Read 256 Number of Observations Used 245 Number of Observations Not Used 11 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) id 4.7499 0.8688 5.47 <.0001 UN(2,1) id 3.0182 0.7255 4.16 <.0001 UN(2,2) id 4.7280 0.8528 5.54 <.0001 UN(3,1) id 2.2391 0.6631 3.38 0.0007 UN(3,2) id 2.0756 0.6736 3.08 0.0021 UN(3,3) id 4.5148 0.8583 5.26 <.0001 UN(4,1) id 1.4049 0.6278 2.24 0.0252 UN(4,2) id 1.4891 0.6093 2.44 0.0145 UN(4,3) id 2.2617 0.6485 3.49 0.0005 UN(4,4) id 4.0015 0.7625 5.25 <.0001 Fit Statistics -2 Res Log Likelihood 981.7 AIC (smaller is better) 1001.7 AICC (smaller is better) 1002.7 BIC (smaller is better) 1023.3 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 9 68.77 <.0001 type=t The Mixed Procedure Model Information Data Set WORK.BI_PAIN2 Dependent Variable response Covariance Structure Unstructured Subject Effect id Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Between-Within Dimensions Covariance Parameters 10 Columns in X 12 Columns in Z 0 Subjects 64 Max Obs Per Subject 4 Number of Observations Number of Observations Read 256 Number of Observations Used 245 Number of Observations Not Used 11 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) id 1.0088 0.1825 5.53 <.0001 UN(2,1) id 0.7478 0.1663 4.50 <.0001 UN(2,2) id 1.1262 0.2046 5.50 <.0001 UN(3,1) id 0.9500 0.1915 4.96 <.0001 UN(3,2) id 0.8660 0.1932 4.48 <.0001 UN(3,3) id 1.3317 0.2429 5.48 <.0001 UN(4,1) id 0.5752 0.1556 3.70 0.0002 UN(4,2) id 0.7448 0.1733 4.30 <.0001 UN(4,3) id 0.8820 0.1954 4.51 <.0001 UN(4,4) id 1.0885 0.2040 5.33 <.0001 Fit Statistics -2 Res Log Likelihood 558.8 AIC (smaller is better) 578.8 AICC (smaller is better) 579.8 BIC (smaller is better) 600.4 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 9 166.04 <.0001 *UN; proc sort data = bi_pain2; by id trial type; run; proc mixed data = bi_pain2 method = reml noclprint noitprint covtest; class trial id type cs0; model response = type*cs0 type*tmt1 type*tmt2 type*tmt3 type*cs0*tmt1 type*cs0*tmt2 type*cs0*tmt3/ notest; repeated / subject = id type = un; run; The Mixed Procedure Model Information Data Set WORK.BI_PAIN2 Dependent Variable response Covariance Structure Unstructured Subject Effect id Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Between-Within Dimensions Covariance Parameters 36 Columns in X 23 Columns in Z 0 Subjects 64 Max Obs Per Subject 8 Number of Observations Number of Observations Read 512 Number of Observations Used 490 Number of Observations Not Used 22 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) id 4.7331 0.8639 5.48 <.0001 UN(2,1) id -0.6197 0.2908 -2.13 0.0331 UN(2,2) id 1.0037 0.1807 5.55 <.0001 UN(3,1) id 3.0201 0.7255 4.16 <.0001 UN(3,2) id -0.3128 0.2848 -1.10 0.2721 UN(3,3) id 4.7462 0.8579 5.53 <.0001 UN(4,1) id -0.3409 0.3029 -1.13 0.2603 UN(4,2) id 0.7541 0.1683 4.48 <.0001 UN(4,3) id -0.3077 0.3032 -1.01 0.3102 UN(4,4) id 1.1430 0.2100 5.44 <.0001 UN(5,1) id 2.2001 0.6563 3.35 0.0008 UN(5,2) id -0.2092 0.2805 -0.75 0.4557 UN(5,3) id 2.0786 0.6736 3.09 0.0020 UN(5,4) id 0.2176 0.2988 0.73 0.4666 UN(5,5) id 4.4937 0.8517 5.28 <.0001 UN(6,1) id -0.7806 0.3402 -2.29 0.0218 UN(6,2) id 0.9546 0.1927 4.95 <.0001 UN(6,3) id -0.4817 0.3378 -1.43 0.1539 UN(6,4) id 0.8834 0.1981 4.46 <.0001 UN(6,5) id -0.4058 0.3282 -1.24 0.2164 UN(6,6) id 1.3463 0.2472 5.45 <.0001 UN(7,1) id 1.4039 0.6264 2.24 0.0250 UN(7,2) id -0.1227 0.2683 -0.46 0.6473 UN(7,3) id 1.4876 0.6127 2.43 0.0152 UN(7,4) id 0.01960 0.2834 0.07 0.9449 UN(7,5) id 2.2682 0.6467 3.51 0.0005 UN(7,6) id -0.2290 0.3142 -0.73 0.4660 UN(7,7) id 4.0014 0.7625 5.25 <.0001 UN(8,1) id -0.4443 0.3124 -1.42 0.1550 UN(8,2) id 0.5841 0.1577 3.70 0.0002 UN(8,3) id -0.3781 0.3076 -1.23 0.2190 UN(8,4) id 0.7619 0.1788 4.26 <.0001 UN(8,5) id -0.03559 0.2982 -0.12 0.9050 UN(8,6) id 0.9005 0.2005 4.49 <.0001 UN(8,7) id -0.2123 0.2854 -0.74 0.4570 UN(8,8) id 1.1066 0.2101 5.27 <.0001 Fit Statistics -2 Res Log Likelihood 1524.4 AIC (smaller is better) 1596.4 AICC (smaller is better) 1602.5 BIC (smaller is better) 1674.2 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 35 354.96 <.0001
Table 13.9, page 391.
proc sort data = bi_pain2; by id type trial; run; proc mixed data = bi_pain2 method = reml noclprint noitprint covtest; class trial id type cs0; model response = type*cs0 type*tmt1 type*tmt2 type*tmt3 type*cs0*tmt1 type*cs0*tmt2 type*cs0*tmt3/ noint notest; repeated trial type/ subject = id type = un@un rcorr; run; The Mixed Procedure Model Information Data Set WORK.BI_PAIN2 Dependent Variable response Covariance Structure Unstructured @ Unstructured Subject Effect id Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Between-Within Dimensions Covariance Parameters 13 Columns in X 22 Columns in Z 0 Subjects 64 Max Obs Per Subject 8 Number of Observations Number of Observations Read 512 Number of Observations Used 490 Number of Observations Not Used 22 Estimated R Correlation Matrix for id 1 Row Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 1 1.0000 0.6718 0.6707 0.4420 -0.1556 -0.1045 -0.1044 -0.06878 2 0.6718 1.0000 0.6136 0.5394 -0.1045 -0.1556 -0.09548 -0.08393 3 0.6707 0.6136 1.0000 0.6608 -0.1044 -0.09548 -0.1556 -0.1028 4 0.4420 0.5394 0.6608 1.0000 -0.06878 -0.08393 -0.1028 -0.1556 5 -0.1556 -0.1045 -0.1044 -0.06878 1.0000 0.6718 0.6707 0.4420 6 -0.1045 -0.1556 -0.09548 -0.08393 0.6718 1.0000 0.6136 0.5394 7 -0.1044 -0.09548 -0.1556 -0.1028 0.6707 0.6136 1.0000 0.6608 8 -0.06878 -0.08393 -0.1028 -0.1556 0.4420 0.5394 0.6608 1.0000 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z trial UN(1,1) id 5.2498 0.7804 6.73 <.0001 UN(2,1) id 3.6753 0.6647 5.53 <.0001 UN(2,2) id 5.7007 0.8563 6.66 <.0001 UN(3,1) id 3.8333 0.7274 5.27 <.0001 UN(3,2) id 3.6546 0.7317 4.99 <.0001 UN(3,3) id 6.2221 0.9756 6.38 <.0001 UN(4,1) id 2.3249 0.5826 3.99 <.0001 UN(4,2) id 2.9566 0.6463 4.57 <.0001 UN(4,3) id 3.7839 0.7365 5.14 <.0001 UN(4,4) id 5.2698 0.8302 6.35 <.0001 type UN(1,1) id 1.0000 0 . . UN(2,1) id -0.06394 0.02678 -2.39 0.0170 UN(2,2) id 0.1688 0.02253 7.50 <.0001 Fit Statistics -2 Res Log Likelihood 1553.4 AIC (smaller is better) 1577.4 AICC (smaller is better) 1578.0 BIC (smaller is better) 1603.3 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 11 326.04 <.0001