1 The SAS System 15:26 Tuesday, January 26, 1993 NOTE: Copyright(c) 1989 by SAS Institute Inc., Cary, NC USA. NOTE: SAS (r) Proprietary Software Release 6.06.03 Licensed to UNC - CHAPEL HILL, Site 0003944003. NOTE: AUTOEXEC processing beginning; file is D:\SAS\AUTOEXEC.SAS. NOTE: AUTOEXEC processing completed. 1 %put &SYSDATE &SYSTIME; 26JAN93 15:26 2 options ls=175 ps=50 pageno=1; 3 4 ************************************************************** 5 * "Power Calculations..." -- Table 11 * 6 * Muller, LaVange, Ramey & Ramey * 7 * * 8 * Approximate power for test of interaction between * 9 * Time and Mother's IQ. * 10 * Based on 4-group ANOVA model predicting * 11 * Child IQ from Mother's IQ. * 12 * Observation with standardized IQ > 3.0 deleted. * 13 * IHDP distribution of Mother's IQ * 14 * <=70, 71-85, 86-100, >100 * 15 * Beta, unstructured Sigma estimates obtained from the * 16 * 4-group ANOVA model. * 17 * Times: 12, 24, 36 months * 18 * N = 100 * 19 * Time contrasts: Last time, Linear, Linear & Quadratic * 20 * * 21 * PROGRAM: j:\powerpgm\tables\pgm\TBL11P02.pgm * 22 * MAINFRAME REF: ulisala.ihdp.cntl(p0402, p0404, p0407) * 23 * * 24 * DATE: 1/20/93 PROGRAMMER: Bethel Fetterman * 25 **************************************************************; 26 27 footnote 'j:\powerpgm\tables\pgm\TBL11P02.pgm'; 28 29 **************************************************************; 30 title 'Power Calculations for Table 11'; 31 title2 '4-Group ANOVA, Unbalanced Intervals'; 32 title3 'By Time Contrast. N=100'; 33 proc iml workspace=300; Worksize = 307200 Symbol size = 65520 2 The SAS System 15:26 Tuesday, January 26, 1993 IML Ready 34 %include 'j:\powerlib\powerlib.iml' / nosource2; NOTE: Module _INPTCHK defined. NOTE: Module _OPTCHK defined. NOTE: Module _SNGRCHK defined. NOTE: Module _SIZECHK defined. NOTE: Module _TYPECHK defined. NOTE: Module _SETOPT defined. NOTE: Module _PROBF defined. NOTE: Module _HLTMOD defined. NOTE: Module _PBTMOD defined. NOTE: Module _WLKMOD defined. NOTE: Module _SPECIAL defined. NOTE: Module _UNIMOD defined. NOTE: Module _GGEXEPS defined. NOTE: Module _HFEXEPS defined. NOTE: Module _LASTUNI defined. NOTE: Module _SASDS defined. NOTE: Module _POWER defined. NOTE: Module POWER defined. 1758 1759 opt_off = {rhoscal sigscal collapse}; 1760 1761 BETA = {105.136 86.426 76.173, 1762 110.295 91.604 81.667, 1763 113.213 96.787 91.978, 1764 114.596 111.436 105.532}; 1765 1766 rho = {1 .3741 .3292, 1767 .3741 1 .6526, 1768 .3292 .6526 1 }; 1769 var = {219.13 257.73 254.61}; 1770 d = diag(sqrt(var)); 1771 SIGMA = d*rho*d; 1772 print SIGMA; 1773 1774 BETASCAL = {.5 1 2}; 1775 1776 ***** Distribution of Mother's IQ *****; 1777 * prop = {.25 .25 .25 .25}`; ** Balanced design **; 1778 prop = {.342 .272 .188 .198}`; 1778 ** Unbalanced design **; 1779 1780 ***** Creation of Essence(X) *****; 1781 nplan = 100; 1782 freq = round(nplan#prop, 1); 1782 ** Frequency dist'n of IQ **; 1783 ** based on N and PROP **; 3 The SAS System 15:26 Tuesday, January 26, 1993 1784 ESSENCEX = repeat({1 0 0 0},freq[1],1) // repeat({0 1 0 0},freq[2],1) // 1785 repeat({0 0 1 0},freq[3],1) // repeat({0 0 0 1},freq[4],1); 1786 ** Cell mean coding of design matrix. **; 1787 ** Contains FREQ[i] rows for each **; 1788 ** of the four IQ groups. **; 1789 1790 ALPHA = 0.05; 1791 REPN = 1; 1792 1793 **** Contrasts for Time by Predictor Interaction ****; 1794 C = i(3) || j(3,1,-1); 1794 ** Mother's IQ trend coefficients **; 1795 1796 ***** Contrasts for hypotheses about *****; 1797 ***** degree of trend in child IQ over time. *****; 1798 timesobs = {12 24 36}`; 1799 polytobs = orpol(timesobs); 1800 utime = polytobs[,2:3]; 1800 ** Linear & Quadratic **; 1801 ulin = polytobs[,2]; 1801 ** Linear Only **; 1802 ulast = {0 0 1}`; 1802 ** Last time (36 mo.) **; 1803 1804 do i=1 to 3; 1805 if i=1 then U=ulast; 1806 else if i=2 then U=ulin; 1807 else if i=3 then U=utime; 1808 1809 run power; 1810 names = {"Contrast"} || _holdnm; 1811 pow = j(nrow(_holdpow),1,i) || _holdpow; 1812 outpower = outpower // pow; 1813 if (i ^= 3) then print /; 1814 end; 1815 1816 create outdata var names; 1817 append from outpower; 1818 close outdata; NOTE: The data set WORK.OUTDATA has 9 observations and 9 variables. 1819 quit; Exiting IML. NOTE: The PROCEDURE IML printed pages 1-10. NOTE: The PROCEDURE IML used 37.65 seconds. 1820 1821 proc sort data=outdata; 4 The SAS System 15:26 Tuesday, January 26, 1993 1822 by contrast betascal; 1823 run; NOTE: SAS sort was used. NOTE: The data set WORK.OUTDATA has 9 observations and 9 variables. NOTE: The PROCEDURE SORT used .71 seconds. 1824 1825 proc format; 1826 value contfmt 1='Last Time (36 mo.)' 1827 2='Linear Only' 1828 3='Linear & Quadratic'; NOTE: Format CONTFMT has been output. 1829 NOTE: The PROCEDURE FORMAT used 1.59 seconds. 1830 proc print data=outdata noobs; 1831 var contrast betascal wlk_pwr gg_pwr; 1832 format wlk_pwr gg_pwr 4.2 contrast contfmt.; 1833 title 'Table 11: 4-Group ANOVA, Unbalanced Intervals'; 1834 title2 'By Time Contrast. N=100'; 1835 run; NOTE: The PROCEDURE PRINT printed page 11. NOTE: The PROCEDURE PRINT used .68 seconds. 1836 **************************************************************; NOTE: SAS Institute Inc., SAS Circle, PO Box 8000, Cary, NC 27512-8000 Power Calculations for Table 11 15:26 Tuesday, January 26, 1993 1 4-Group ANOVA, Unbalanced Intervals By Time Contrast. N=100 SIGMA 219.13 88.903962 77.758607 88.903962 257.73 167.17344 77.758607 167.17344 254.61 j:\powerpgm\tables\pgm\TBL11P02.pgm Power Calculations for Table 11 15:26 Tuesday, January 26, 1993 2 4-Group ANOVA, Unbalanced Intervals By Time Contrast. N=100 BETA 105.136 86.426 76.173 110.295 91.604 81.667 113.213 96.787 91.978 114.596 111.436 105.532 SIGMA 219.13 88.903962 77.758607 88.903962 257.73 167.17344 77.758607 167.17344 254.61 _RHO_ 1 0.3741 0.3292 0.3741 1 0.6526 0.3292 0.6526 1 C 1 0 0 -1 0 1 0 -1 0 0 1 -1 U 0 0 1 CBETAU C*BETA*U = -29.359 -23.865 -13.554 WARNING: j:\powerpgm\tables\pgm\TBL11P02.pgm Power Calculations for Table 11 15:26 Tuesday, January 26, 1993 3 4-Group ANOVA, Unbalanced Intervals By Time Contrast. N=100 One or more power values rounded to 1. For example, with ROUND=3, power=1 should be reported as power>.999 j:\powerpgm\tables\pgm\TBL11P02.pgm Power Calculations for Table 11 15:26 Tuesday, January 26, 1993 4 4-Group ANOVA, Unbalanced Intervals By Time Contrast. N=100 _HOLDPOW CASE ALPHA BETASCAL TOTAL_N WLK_PWR EPSILON GG_EXEPS GG_PWR 1 0.05 0.5 100 0.818 1 1 0.818 2 0.05 1 100 1 1 1 1 3 0.05 2 100 1 1 1 1 j:\powerpgm\tables\pgm\TBL11P02.pgm Power Calculations for Table 11 15:26 Tuesday, January 26, 1993 5 4-Group ANOVA, Unbalanced Intervals By Time Contrast. N=100 BETA 105.136 86.426 76.173 110.295 91.604 81.667 113.213 96.787 91.978 114.596 111.436 105.532 SIGMA 219.13 88.903962 77.758607 88.903962 257.73 167.17344 77.758607 167.17344 254.61 _RHO_ 1 0.3741 0.3292 0.3741 1 0.6526 0.3292 0.6526 1 C 1 0 0 -1 0 1 0 -1 0 0 1 -1 U -0.707107 1.923E-16 0.7071068 CBETAU C*BETA*U = -14.07072 -13.83384 -8.606197 WARNING: j:\powerpgm\tables\pgm\TBL11P02.pgm Power Calculations for Table 11 15:26 Tuesday, January 26, 1993 6 4-Group ANOVA, Unbalanced Intervals By Time Contrast. N=100 One or more power values rounded to 1. For example, with ROUND=3, power=1 should be reported as power>.999 j:\powerpgm\tables\pgm\TBL11P02.pgm Power Calculations for Table 11 15:26 Tuesday, January 26, 1993 7 4-Group ANOVA, Unbalanced Intervals By Time Contrast. N=100 _HOLDPOW CASE ALPHA BETASCAL TOTAL_N WLK_PWR EPSILON GG_EXEPS GG_PWR 1 0.05 0.5 100 0.401 1 1 0.401 2 0.05 1 100 0.96 1 1 0.96 3 0.05 2 100 1 1 1 1 j:\powerpgm\tables\pgm\TBL11P02.pgm Power Calculations for Table 11 15:26 Tuesday, January 26, 1993 8 4-Group ANOVA, Unbalanced Intervals By Time Contrast. N=100 BETA 105.136 86.426 76.173 110.295 91.604 81.667 113.213 96.787 91.978 114.596 111.436 105.532 SIGMA 219.13 88.903962 77.758607 88.903962 257.73 167.17344 77.758607 167.17344 254.61 _RHO_ 1 0.3741 0.3292 0.3741 1 0.6526 0.3292 0.6526 1 C 1 0 0 -1 0 1 0 -1 0 0 1 -1 U -0.707107 0.4082483 1.923E-16 -0.816497 0.7071068 0.4082483 CBETAU C*BETA*U = -14.07072 4.5727891 -13.83384 4.6940388 -8.606197 5.8628537 WARNING: j:\powerpgm\tables\pgm\TBL11P02.pgm Power Calculations for Table 11 15:26 Tuesday, January 26, 1993 9 4-Group ANOVA, Unbalanced Intervals By Time Contrast. N=100 One or more power values rounded to 1. For example, with ROUND=3, power=1 should be reported as power>.999 j:\powerpgm\tables\pgm\TBL11P02.pgm Power Calculations for Table 11 15:26 Tuesday, January 26, 1993 10 4-Group ANOVA, Unbalanced Intervals By Time Contrast. N=100 _HOLDPOW CASE ALPHA BETASCAL TOTAL_N WLK_PWR EPSILON GG_EXEPS GG_PWR 1 0.05 0.5 100 0.326 0.901 0.891 0.39 2 0.05 1 100 0.925 0.901 0.891 0.968 3 0.05 2 100 1 0.901 0.891 1 j:\powerpgm\tables\pgm\TBL11P02.pgm Table 11: 4-Group ANOVA, Unbalanced Intervals 15:26 Tuesday, January 26, 1993 11 By Time Contrast. N=100 CONTRAST BETASCAL WLK_PWR GG_PWR Last Time (36 mo.) 0.5 0.82 0.82 Last Time (36 mo.) 1.0 1.00 1.00 Last Time (36 mo.) 2.0 1.00 1.00 Linear Only 0.5 0.40 0.40 Linear Only 1.0 0.96 0.96 Linear Only 2.0 1.00 1.00 Linear & Quadratic 0.5 0.33 0.39 Linear & Quadratic 1.0 0.93 0.97 Linear & Quadratic 2.0 1.00 1.00 j:\powerpgm\tables\pgm\TBL11P02.pgm