1 The SAS System 15:25 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:25 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 * Balanced distribution of Mother's IQ * 14 * <=70, 71-85, 86-100, >100 * 15 * Mother's IQ distribution is for high school dropouts * 16 * from IHDP follow-up groups * 17 * Beta, unstructured Sigma estimates obtained from the * 18 * 4-group ANOVA model. * 19 * Times: 12, 24, 36 months * 20 * N = 100 * 21 * Time contrasts: Last time, Linear, Linear & Quadratic * 22 * * 23 * PROGRAM: j:\powerpgm\tables\pgm\TBL11P01.pgm * 24 * MAINFRAME REF: ulisala.ihdp.cntl(p0403, p0405, p0406) * 25 * * 26 * DATE: 1/20/93 PROGRAMMER: Bethel Fetterman * 27 **************************************************************; 28 29 footnote 'j:\powerpgm\tables\pgm\TBL11P01.pgm'; 30 31 **************************************************************; 32 title 'Power Calculations for Table 11'; 33 title2 '4-Group ANOVA, Balanced Intervals'; 34 title3 'By Time Contrast. N=100'; 35 proc iml workspace=300; 2 The SAS System 15:25 Tuesday, January 26, 1993 Worksize = 307200 Symbol size = 65520 IML Ready 36 %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. 1760 1761 opt_off = {rhoscal sigscal collapse}; 1762 1763 BETA = {105.136 86.426 76.173, 1764 110.295 91.604 81.667, 1765 113.213 96.787 91.978, 1766 114.596 111.436 105.532}; 1767 1768 rho = {1 .3741 .3292, 1769 .3741 1 .6526, 1770 .3292 .6526 1 }; 1771 var = {219.13 257.73 254.61}; 1772 d = diag(sqrt(var)); 1773 SIGMA = d*rho*d; 1774 print SIGMA; 1775 1776 BETASCAL = {.5 1 2}; 1777 1778 ***** Distribution of Mother's IQ *****; 1779 prop = {.25 .25 .25 .25}`; 1779 ** Balanced design **; 1780 * prop = {.342 .272 .188 .198}`; ** Unbalanced design **; 1781 1782 ***** Creation of Essence(X) *****; 1783 nplan = 100; 1784 freq = round(nplan#prop, 1); 3 The SAS System 15:25 Tuesday, January 26, 1993 1784 ** Frequency dist'n of IQ **; 1785 ** based on N and PROP **; 1786 ESSENCEX = repeat({1 0 0 0},freq[1],1) // repeat({0 1 0 0},freq[2],1) // 1787 repeat({0 0 1 0},freq[3],1) // repeat({0 0 0 1},freq[4],1); 1788 ** Cell mean coding of design matrix. **; 1789 ** Contains FREQ[i] rows for each **; 1790 ** of the four IQ groups. **; 1791 1792 ALPHA = 0.05; 1793 REPN = 1; 1794 1795 **** Contrasts for Time by Predictor Interaction ****; 1796 C = i(3) || j(3,1,-1); 1796 ** Mother's IQ trend coefficients **; 1797 1798 ***** Contrasts for hypotheses about *****; 1799 ***** degree of trend in child IQ over time. *****; 1800 timesobs = {12 24 36}`; 1801 polytobs = orpol(timesobs); 1802 utime = polytobs[,2:3]; 1802 ** Linear & Quadratic **; 1803 ulin = polytobs[,2]; 1803 ** Linear Only **; 1804 ulast = {0 0 1}`; 1804 ** Last time (36 mo.) **; 1805 1806 do i=1 to 3; 1807 if i=1 then U=ulast; 1808 else if i=2 then U=ulin; 1809 else if i=3 then U=utime; 1810 1811 run power; 1812 names = {"Contrast"} || _holdnm; 1813 pow = j(nrow(_holdpow),1,i) || _holdpow; 1814 outpower = outpower // pow; 1815 if (i ^= 3) then print /; 1816 end; 1817 1818 create outdata var names; 1819 append from outpower; 1820 close outdata; NOTE: The data set WORK.OUTDATA has 9 observations and 9 variables. 1821 quit; Exiting IML. NOTE: The PROCEDURE IML printed pages 1-10. NOTE: The PROCEDURE IML used 36.90 seconds. 4 The SAS System 15:25 Tuesday, January 26, 1993 1822 1823 proc sort data=outdata; 1824 by contrast betascal; 1825 run; NOTE: SAS sort was used. NOTE: The data set WORK.OUTDATA has 9 observations and 9 variables. NOTE: The PROCEDURE SORT used .68 seconds. 1826 1827 proc format; 1828 value contfmt 1='Last Time (36 mo.)' 1829 2='Linear Only' 1830 3='Linear & Quadratic'; NOTE: Format CONTFMT has been output. 1831 NOTE: The PROCEDURE FORMAT used 1.65 seconds. 1832 proc print data=outdata noobs; 1833 var contrast betascal wlk_pwr gg_pwr; 1834 format wlk_pwr gg_pwr 4.2 contrast contfmt.; 1835 title 'Table 11: 4-Group ANOVA, Balanced Intervals'; 1836 title2 'By Time Contrast. N=100'; 1837 run; NOTE: The PROCEDURE PRINT printed page 11. NOTE: The PROCEDURE PRINT used .66 seconds. 1838 **************************************************************; NOTE: SAS Institute Inc., SAS Circle, PO Box 8000, Cary, NC 27512-8000 Power Calculations for Table 11 15:25 Tuesday, January 26, 1993 1 4-Group ANOVA, Balanced 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\TBL11P01.pgm Power Calculations for Table 11 15:25 Tuesday, January 26, 1993 2 4-Group ANOVA, Balanced 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\TBL11P01.pgm Power Calculations for Table 11 15:25 Tuesday, January 26, 1993 3 4-Group ANOVA, Balanced 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\TBL11P01.pgm Power Calculations for Table 11 15:25 Tuesday, January 26, 1993 4 4-Group ANOVA, Balanced 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.833 1 1 0.833 2 0.05 1 100 1 1 1 1 3 0.05 2 100 1 1 1 1 j:\powerpgm\tables\pgm\TBL11P01.pgm Power Calculations for Table 11 15:25 Tuesday, January 26, 1993 5 4-Group ANOVA, Balanced 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\TBL11P01.pgm Power Calculations for Table 11 15:25 Tuesday, January 26, 1993 6 4-Group ANOVA, Balanced 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\TBL11P01.pgm Power Calculations for Table 11 15:25 Tuesday, January 26, 1993 7 4-Group ANOVA, Balanced 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.433 1 1 0.433 2 0.05 1 100 0.973 1 1 0.973 3 0.05 2 100 1 1 1 1 j:\powerpgm\tables\pgm\TBL11P01.pgm Power Calculations for Table 11 15:25 Tuesday, January 26, 1993 8 4-Group ANOVA, Balanced 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\TBL11P01.pgm Power Calculations for Table 11 15:25 Tuesday, January 26, 1993 9 4-Group ANOVA, Balanced 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\TBL11P01.pgm Power Calculations for Table 11 15:25 Tuesday, January 26, 1993 10 4-Group ANOVA, Balanced 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.358 0.901 0.891 0.429 2 0.05 1 100 0.949 0.901 0.891 0.981 3 0.05 2 100 1 0.901 0.891 1 j:\powerpgm\tables\pgm\TBL11P01.pgm Table 11: 4-Group ANOVA, Balanced Intervals 15:25 Tuesday, January 26, 1993 11 By Time Contrast. N=100 CONTRAST BETASCAL WLK_PWR GG_PWR Last Time (36 mo.) 0.5 0.83 0.83 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.43 0.43 Linear Only 1.0 0.97 0.97 Linear Only 2.0 1.00 1.00 Linear & Quadratic 0.5 0.36 0.43 Linear & Quadratic 1.0 0.95 0.98 Linear & Quadratic 2.0 1.00 1.00 j:\powerpgm\tables\pgm\TBL11P01.pgm