1 The SAS System 11: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 11:25 2 options ls=175 ps=50 pageno=1; 3 ************************************************************** 4 * "Power Calculations..." -- Table 9 * 5 * Muller, LaVange, Ramey & Ramey * 6 * * 7 * Approximate power for test of interaction between * 8 * Time and Mother's IQ. * 9 * Based on multivariate regression model predicting * 10 * Child IQ from Mother's IQ. * 11 * Observation with standardized IQ > 3.0 deleted. * 12 * Times: 12, 24, 36 months * 13 * Mother's IQ distribution is for high school dropouts * 14 * from IHDP follow-up groups * 15 * IHDP ratios of 4 intervals: IHDP spread within * 16 * Beta estimates from Table 2. * 17 * Compound Symmetric Sigma * 18 * variance = {119.162, 238.324, 476.648} rho = .4398 * 19 * * 20 * PROGRAM: j:\powerpgm\tables\pgm\TBL09.pgm * 21 * MAINFRAME REF: ulisala.ihdp.cntl(p0105) * 22 * * 23 * DATE: 1/20/93 PROGRAMMER: Bethel Fetterman * 24 **************************************************************; 25 26 footnote 'j:\powerpgm\tables\pgm\TBL09.pgm'; 27 28 **************************************************************; 29 title 'Power Calculations for Table 9'; 30 title2 'using times {12, 24, 36}'; 31 proc iml workspace=300; Worksize = 307200 Symbol size = 65520 IML Ready 32 %include 'j:\powerlib\powerlib.iml' / nosource2; 2 The SAS System 11:25 Tuesday, January 26, 1993 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. 1756 1757 opt_off = {rhoscal collapse}; 1758 1759 BETA = {114.463 104.658 98.827 , 1760 2.882 8.768 10.674 , 1761 -.7097 -.8962 -1.297 , 1762 -.2056 -.5440 -.7182}; 1763 1764 BETASCAL = {.5 1 2}; 1765 SIGSCAL = {.5 1 2}; 1766 1767 ***** Obtain Sigma assuming compound symmetry *****; 1768 rho = {1 0.4398 0.4398, 1769 0.4398 1 0.4398, 1770 0.4398 0.4398 1 }; 1771 var = j(3,1,238.324); 1772 d = diag(sqrt(var)); 1773 SIGMA = d*rho*d; 1774 print SIGMA; 1775 1776 **** Contrasts for Time by Predictor Interaction ****; 1777 C = j(3,1,0) || i(3); 1777 ** Mother's IQ trend coefficients **; 1778 1779 timesobs = {12 24 36}`; 1779 ** Degree of trend in child IQ over time **; 1780 polytobs = orpol(timesobs); 1781 U = polytobs[,2:3]; 1781 ** Linear & Quadratic **; 1782 3 The SAS System 11:25 Tuesday, January 26, 1993 1783 ***** Distribution of Mother's IQ *****; 1784 ***** IHDP Ratios of 21 Intervals *****; 1785 percent = { 0.6 1.8 4.7 7.1 6.5 11.8 10.0 1786 13.5 7.1 8.8 8.8 5.3 1.8 2.9 1787 1.2 4.1 0.6 1.8 0.6 0.6 0.6}`; 1788 sumpct = sum(percent); 1789 prop = percent / sumpct; 1789 ** Proportion of Mother's IQ **; 1790 ** in each of 21 categories **; 1791 1792 zscore = j(21,1,-4.25) + 0.25#(1:21)`; 1792 ** Correspond to IQ **; 1793 ** values 40-115 **; 1794 ***** Creation of Essence(X) *****; 1795 nplanvec = {100 200 400}`; 1795 ** Desired sample size N **; 1796 do inplan=1 to nrow(nplanvec); 1797 nplan = nplanvec[inplan,1]; 1798 freq = round(nplan#prop, 1); 1798 ** Frequency dist'n of IQ **; 1799 nobs = sum(freq); 1799 ** based on N and PROP **; 1800 ziq={.}; 1801 ** Create a vector containing FREQ[i] occurrences **; 1802 ** of the score ZSCORE[i]. This is the expected **; 1803 ** vector of Z-scores. **; 1804 do iz = 1 to nrow(zscore); 1805 if freq[iz,1]>0 then 1806 ziq = ziq // j(freq[iz,1],1,zscore[iz,1]); 1807 end; 1808 ziq = ziq[2:nrow(ziq),1]; 1809 ESSENCEX = j(nobs,1,1) || ziq || ziq##2 || ziq##3; 1810 1811 ALPHA = 0.05; 1812 REPN = 1; 1813 1814 RUN POWER; 1815 outpower = outpower // _holdpow; 1816 if inplan ^= nrow(nplanvec) then print /; 1817 end; 1818 1819 create outdata var _holdnm; 1820 append from outpower; 1821 close outdata; NOTE: The data set WORK.OUTDATA has 27 observations and 9 variables. 1822 quit; Exiting IML. NOTE: The PROCEDURE IML printed pages 1-10. 4 The SAS System 11:25 Tuesday, January 26, 1993 NOTE: The PROCEDURE IML used 43.03 seconds. 1823 1824 proc sort data=outdata; 1825 by sigscal total_n betascal; 1826 run; NOTE: SAS sort was used. NOTE: The data set WORK.OUTDATA has 27 observations and 9 variables. NOTE: The PROCEDURE SORT used .75 seconds. 1827 1828 proc print data=outdata noobs; 1829 var sigscal total_n betascal wlk_pwr gg_pwr; 1830 title 'Table 9'; 1831 title2 'using times {12, 24, 36}'; 1832 format wlk_pwr gg_pwr 4.2; 1833 run; NOTE: The PROCEDURE PRINT printed page 11. NOTE: The PROCEDURE PRINT used .71 seconds. 1834 **************************************************************; NOTE: SAS Institute Inc., SAS Circle, PO Box 8000, Cary, NC 27512-8000 Power Calculations for Table 9 11:25 Tuesday, January 26, 1993 1 using times {12, 24, 36} SIGMA 238.324 104.8149 104.8149 104.8149 238.324 104.8149 104.8149 104.8149 238.324 j:\powerpgm\tables\pgm\TBL09.pgm Power Calculations for Table 9 11:25 Tuesday, January 26, 1993 2 using times {12, 24, 36} BETA 114.463 104.658 98.827 2.882 8.768 10.674 -0.7097 -0.8962 -1.297 -0.2056 -0.544 -0.7182 SIGMA 238.324 104.8149 104.8149 104.8149 238.324 104.8149 104.8149 104.8149 238.324 _RHO_ 1 0.4398 0.4398 0.4398 1 0.4398 0.4398 0.4398 1 C 0 1 0 0 0 0 1 0 0 0 0 1 U -0.707107 0.4082483 1.923E-16 -0.816497 0.7071068 0.4082483 CBETAU C*BETA*U = 5.509776 -1.624828 -0.415284 -0.087488 -0.362463 0.0670344 WARNING: One or more power values rounded to 1. j:\powerpgm\tables\pgm\TBL09.pgm Power Calculations for Table 9 11:25 Tuesday, January 26, 1993 3 using times {12, 24, 36} For example, with ROUND=3, power=1 should be reported as power>.999 j:\powerpgm\tables\pgm\TBL09.pgm Power Calculations for Table 9 11:25 Tuesday, January 26, 1993 4 using times {12, 24, 36} _HOLDPOW CASE ALPHA SIGSCAL BETASCAL TOTAL_N WLK_PWR EPSILON GG_EXEPS GG_PWR 1 0.05 0.5 0.5 102 0.315 1 0.99 0.32 2 0.05 0.5 1 102 0.912 1 0.99 0.928 3 0.05 0.5 2 102 1 1 0.99 1 4 0.05 1 0.5 102 0.167 1 0.99 0.167 5 0.05 1 1 102 0.604 1 0.99 0.619 6 0.05 1 2 102 0.998 1 0.99 0.999 7 0.05 2 0.5 102 0.102 1 0.99 0.102 8 0.05 2 1 102 0.315 1 0.99 0.32 9 0.05 2 2 102 0.912 1 0.99 0.928 j:\powerpgm\tables\pgm\TBL09.pgm Power Calculations for Table 9 11:25 Tuesday, January 26, 1993 5 using times {12, 24, 36} BETA 114.463 104.658 98.827 2.882 8.768 10.674 -0.7097 -0.8962 -1.297 -0.2056 -0.544 -0.7182 SIGMA 238.324 104.8149 104.8149 104.8149 238.324 104.8149 104.8149 104.8149 238.324 _RHO_ 1 0.4398 0.4398 0.4398 1 0.4398 0.4398 0.4398 1 C 0 1 0 0 0 0 1 0 0 0 0 1 U -0.707107 0.4082483 1.923E-16 -0.816497 0.7071068 0.4082483 CBETAU C*BETA*U = 5.509776 -1.624828 -0.415284 -0.087488 -0.362463 0.0670344 WARNING: One or more power values rounded to 1. j:\powerpgm\tables\pgm\TBL09.pgm Power Calculations for Table 9 11:25 Tuesday, January 26, 1993 6 using times {12, 24, 36} For example, with ROUND=3, power=1 should be reported as power>.999 j:\powerpgm\tables\pgm\TBL09.pgm Power Calculations for Table 9 11:25 Tuesday, January 26, 1993 7 using times {12, 24, 36} _HOLDPOW CASE ALPHA SIGSCAL BETASCAL TOTAL_N WLK_PWR EPSILON GG_EXEPS GG_PWR 1 0.05 0.5 0.5 201 0.507 1 0.995 0.513 2 0.05 0.5 1 201 0.993 1 0.995 0.995 3 0.05 0.5 2 201 1 1 0.995 1 4 0.05 1 0.5 201 0.259 1 0.995 0.26 5 0.05 1 1 201 0.846 1 0.995 0.855 6 0.05 1 2 201 1 1 0.995 1 7 0.05 2 0.5 201 0.142 1 0.995 0.142 8 0.05 2 1 201 0.507 1 0.995 0.513 9 0.05 2 2 201 0.993 1 0.995 0.995 j:\powerpgm\tables\pgm\TBL09.pgm Power Calculations for Table 9 11:25 Tuesday, January 26, 1993 8 using times {12, 24, 36} BETA 114.463 104.658 98.827 2.882 8.768 10.674 -0.7097 -0.8962 -1.297 -0.2056 -0.544 -0.7182 SIGMA 238.324 104.8149 104.8149 104.8149 238.324 104.8149 104.8149 104.8149 238.324 _RHO_ 1 0.4398 0.4398 0.4398 1 0.4398 0.4398 0.4398 1 C 0 1 0 0 0 0 1 0 0 0 0 1 U -0.707107 0.4082483 1.923E-16 -0.816497 0.7071068 0.4082483 CBETAU C*BETA*U = 5.509776 -1.624828 -0.415284 -0.087488 -0.362463 0.0670344 WARNING: One or more power values rounded to 1. j:\powerpgm\tables\pgm\TBL09.pgm Power Calculations for Table 9 11:25 Tuesday, January 26, 1993 9 using times {12, 24, 36} For example, with ROUND=3, power=1 should be reported as power>.999 j:\powerpgm\tables\pgm\TBL09.pgm Power Calculations for Table 9 11:25 Tuesday, January 26, 1993 10 using times {12, 24, 36} _HOLDPOW CASE ALPHA SIGSCAL BETASCAL TOTAL_N WLK_PWR EPSILON GG_EXEPS GG_PWR 1 0.05 0.5 0.5 397 0.845 1 0.997 0.85 2 0.05 0.5 1 397 1 1 0.997 1 3 0.05 0.5 2 397 1 1 0.997 1 4 0.05 1 0.5 397 0.505 1 0.997 0.508 5 0.05 1 1 397 0.994 1 0.997 0.994 6 0.05 1 2 397 1 1 0.997 1 7 0.05 2 0.5 397 0.257 1 0.997 0.257 8 0.05 2 1 397 0.845 1 0.997 0.85 9 0.05 2 2 397 1 1 0.997 1 j:\powerpgm\tables\pgm\TBL09.pgm Table 9 11:25 Tuesday, January 26, 1993 11 using times {12, 24, 36} SIGSCAL TOTAL_N BETASCAL WLK_PWR GG_PWR 0.5 102 0.5 0.32 0.32 0.5 102 1.0 0.91 0.93 0.5 102 2.0 1.00 1.00 0.5 201 0.5 0.51 0.51 0.5 201 1.0 0.99 1.00 0.5 201 2.0 1.00 1.00 0.5 397 0.5 0.85 0.85 0.5 397 1.0 1.00 1.00 0.5 397 2.0 1.00 1.00 1.0 102 0.5 0.17 0.17 1.0 102 1.0 0.60 0.62 1.0 102 2.0 1.00 1.00 1.0 201 0.5 0.26 0.26 1.0 201 1.0 0.85 0.86 1.0 201 2.0 1.00 1.00 1.0 397 0.5 0.51 0.51 1.0 397 1.0 0.99 0.99 1.0 397 2.0 1.00 1.00 2.0 102 0.5 0.10 0.10 2.0 102 1.0 0.32 0.32 2.0 102 2.0 0.91 0.93 2.0 201 0.5 0.14 0.14 2.0 201 1.0 0.51 0.51 2.0 201 2.0 0.99 1.00 2.0 397 0.5 0.26 0.26 2.0 397 1.0 0.85 0.85 2.0 397 2.0 1.00 1.00 j:\powerpgm\tables\pgm\TBL09.pgm