1 The SAS System 11:20 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:20 2 options ls=175 ps=50 pageno=1; 3 4 ************************************************************** 5 * "Power Calculations..." -- Table 6 * 6 * Muller, LaVange, Ramey & Ramey * 7 * * 8 * Approximate power for test of interaction between * 9 * Time and Mother's IQ. * 10 * Based on multivariate regression model predicting * 11 * Child IQ from Mother's IQ. * 12 * Observation with standardized IQ > 3.0 deleted. * 13 * Times: 12, 24, 36 months * 14 * Mother's IQ distribution is for high school dropouts * 15 * from IHDP follow-up groups. * 16 * Balanced 4 intervals: IHDP spread within * 17 * Beta and Sigma estimates from Table 2. * 18 * * 19 * PROGRAM: j:\powerpgm\tables\pgm\TBL06.pgm * 20 * MAINFRAME REF: ulisala.ihdp.cntl(p0102) * 21 * * 22 * DATE: 1/20/93 PROGRAMMER: Bethel Fetterman * 23 **************************************************************; 24 25 footnote 'j:\powerpgm\tables\pgm\TBL06.pgm'; 26 27 **************************************************************; 28 title 'Power Calculations for Table 6'; 29 proc iml workspace=300; Worksize = 307200 Symbol size = 65520 IML Ready 30 %include 'j:\powerlib\powerlib.iml' / nosource2; NOTE: Module _INPTCHK defined. NOTE: Module _OPTCHK defined. 2 The SAS System 11:20 Tuesday, January 26, 1993 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. 1754 1755 opt_off = {rhoscal collapse}; 1756 1757 BETA = {114.463 104.658 98.827 , 1758 2.882 8.768 10.674 , 1759 -.7097 -.8962 -1.297 , 1760 -.2056 -.5440 -.7182}; 1761 1762 SIGMA = {218.478 83.662 72.191, 1763 83.662 251.916 158.603, 1764 72.191 158.603 244.578}; 1765 1766 BETASCAL = {.5 1 2}; 1767 SIGSCAL = {.5 1 2}; 1768 1769 **** Contrasts for Time by Predictor Interaction ****; 1770 C = j(3,1,0) || i(3); 1770 ** Mother's IQ trend coefficients **; 1771 1772 timesobs = {12 24 36}`; 1772 ** Degree of trend in child IQ over time **; 1773 polytobs = orpol(timesobs); 1774 U = polytobs[,2:3]; 1774 ** Linear & Quadratic **; 1775 1776 ***** Distribution of Mother's IQ *****; 1777 ***** Balanced Four Intervals *****; 1778 percent1 = { 0.6 1.8 4.7 7.1 6.5 11.8 10.0 13.5 7.1}`; 1778 ** IQ <= 70 **; 1779 percent2 = { 8.8 8.8 5.3 1.8}`; 1779 ** IQ 71-85 **; 1780 percent3 = {2.9 1.2 4.1 0.6}`; 3 The SAS System 11:20 Tuesday, January 26, 1993 1780 ** IQ 86-100 **; 1781 percent4 = {1.8 0.6 0.6 0.6}`; 1781 ** IQ >100 **; 1782 1783 sumpct1 = sum(percent1); 1783 ** Compute weighted proportions **; 1784 sumpct2 = sum(percent2); 1784 ** Step 1 **; 1785 sumpct3 = sum(percent3); 1786 sumpct4 = sum(percent4); 1787 1788 prop1 = percent1 / sumpct1 # 0.25; 1788 ** Step 2 **; 1789 prop2 = percent2 / sumpct2 # 0.25; 1790 prop3 = percent3 / sumpct3 # 0.25; 1791 prop4 = percent4 / sumpct4 # 0.25; 1792 1793 prop = prop1 // prop2 // prop3 // prop4; 1794 1795 zscore = j(21,1,-4.25) + 0.25#(1:21)`; 1795 ** Correspond to IQ **; 1796 ** values 40-115 **; 1797 ***** Creation of Essence(X) *****; 1798 nplanvec = {100 200 400}`; 1798 ** Desired sample size N **; 1799 do inplan=1 to nrow(nplanvec); 1800 nplan = nplanvec[inplan,1]; 1801 freq = round(nplan#prop, 1); 1801 ** Frequency dist'n of IQ **; 1802 nobs = sum(freq); 1802 ** based on N and PROP **; 1803 ziq={.}; 1804 ** Create a vector containing FREQ[i] occurrences **; 1805 ** of the score ZSCORE[i]. This is the expected **; 1806 ** vector of Z-scores. **; 1807 do iz = 1 to nrow(zscore); 1808 if freq[iz,1]>0 then 1809 ziq = ziq // j(freq[iz,1],1,zscore[iz,1]); 1810 end; 1811 ziq = ziq[2:nrow(ziq),1]; 1812 ESSENCEX = j(nobs,1,1) || ziq || ziq##2 || ziq##3; 1813 1814 ALPHA = 0.05; 1815 REPN = 1; 1816 1817 RUN POWER; 1818 outpower = outpower // _holdpow; 1819 if inplan ^= nrow(nplanvec) then print /; 4 The SAS System 11:20 Tuesday, January 26, 1993 1820 end; 1821 1822 create outdata var _holdnm; 1823 append from outpower; 1824 close outdata; NOTE: The data set WORK.OUTDATA has 27 observations and 9 variables. 1825 quit; Exiting IML. NOTE: The PROCEDURE IML printed pages 1-9. NOTE: The PROCEDURE IML used 43.03 seconds. 1826 1827 proc sort data=outdata; 1828 by sigscal total_n betascal; 1829 run; NOTE: SAS sort was used. NOTE: The data set WORK.OUTDATA has 27 observations and 9 variables. NOTE: The PROCEDURE SORT used .71 seconds. 1830 1831 proc print data=outdata noobs; 1832 var sigscal total_n betascal wlk_pwr gg_pwr; 1833 title 'Table 6'; 1834 format wlk_pwr gg_pwr 4.2; 1835 run; NOTE: The PROCEDURE PRINT printed page 10. 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 6 11:20 Tuesday, January 26, 1993 1 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 218.478 83.662 72.191 83.662 251.916 158.603 72.191 158.603 244.578 _RHO_ 1 0.3566125 0.3122989 0.3566125 1 0.6389617 0.3122989 0.6389617 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. For example, with ROUND=3, j:\powerpgm\tables\pgm\TBL06.pgm Power Calculations for Table 6 11:20 Tuesday, January 26, 1993 2 power=1 should be reported as power>.999 j:\powerpgm\tables\pgm\TBL06.pgm Power Calculations for Table 6 11:20 Tuesday, January 26, 1993 3 _HOLDPOW CASE ALPHA SIGSCAL BETASCAL TOTAL_N WLK_PWR EPSILON GG_EXEPS GG_PWR 1 0.05 0.5 0.5 101 0.509 0.902 0.892 0.606 2 0.05 0.5 1 101 0.992 0.902 0.892 0.999 3 0.05 0.5 2 101 1 0.902 0.892 1 4 0.05 1 0.5 101 0.261 0.902 0.892 0.314 5 0.05 1 1 101 0.843 0.902 0.892 0.919 6 0.05 1 2 101 1 0.902 0.892 1 7 0.05 2 0.5 101 0.143 0.902 0.892 0.165 8 0.05 2 1 101 0.509 0.902 0.892 0.606 9 0.05 2 2 101 0.992 0.902 0.892 0.999 j:\powerpgm\tables\pgm\TBL06.pgm Power Calculations for Table 6 11:20 Tuesday, January 26, 1993 4 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 218.478 83.662 72.191 83.662 251.916 158.603 72.191 158.603 244.578 _RHO_ 1 0.3566125 0.3122989 0.3566125 1 0.6389617 0.3122989 0.6389617 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. For example, with ROUND=3, j:\powerpgm\tables\pgm\TBL06.pgm Power Calculations for Table 6 11:20 Tuesday, January 26, 1993 5 power=1 should be reported as power>.999 j:\powerpgm\tables\pgm\TBL06.pgm Power Calculations for Table 6 11:20 Tuesday, January 26, 1993 6 _HOLDPOW CASE ALPHA SIGSCAL BETASCAL TOTAL_N WLK_PWR EPSILON GG_EXEPS GG_PWR 1 0.05 0.5 0.5 199 0.851 0.902 0.897 0.918 2 0.05 0.5 1 199 1 0.902 0.897 1 3 0.05 0.5 2 199 1 0.902 0.897 1 4 0.05 1 0.5 199 0.514 0.902 0.897 0.605 5 0.05 1 1 199 0.994 0.902 0.897 0.999 6 0.05 1 2 199 1 0.902 0.897 1 7 0.05 2 0.5 199 0.262 0.902 0.897 0.314 8 0.05 2 1 199 0.851 0.902 0.897 0.918 9 0.05 2 2 199 1 0.902 0.897 1 j:\powerpgm\tables\pgm\TBL06.pgm Power Calculations for Table 6 11:20 Tuesday, January 26, 1993 7 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 218.478 83.662 72.191 83.662 251.916 158.603 72.191 158.603 244.578 _RHO_ 1 0.3566125 0.3122989 0.3566125 1 0.6389617 0.3122989 0.6389617 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. For example, with ROUND=3, j:\powerpgm\tables\pgm\TBL06.pgm Power Calculations for Table 6 11:20 Tuesday, January 26, 1993 8 power=1 should be reported as power>.999 j:\powerpgm\tables\pgm\TBL06.pgm Power Calculations for Table 6 11:20 Tuesday, January 26, 1993 9 _HOLDPOW CASE ALPHA SIGSCAL BETASCAL TOTAL_N WLK_PWR EPSILON GG_EXEPS GG_PWR 1 0.05 0.5 0.5 401 0.996 0.902 0.899 0.999 2 0.05 0.5 1 401 1 0.902 0.899 1 3 0.05 0.5 2 401 1 0.902 0.899 1 4 0.05 1 0.5 401 0.866 0.902 0.899 0.926 5 0.05 1 1 401 1 0.902 0.899 1 6 0.05 1 2 401 1 0.902 0.899 1 7 0.05 2 0.5 401 0.53 0.902 0.899 0.619 8 0.05 2 1 401 0.996 0.902 0.899 0.999 9 0.05 2 2 401 1 0.902 0.899 1 j:\powerpgm\tables\pgm\TBL06.pgm Table 6 11:20 Tuesday, January 26, 1993 10 SIGSCAL TOTAL_N BETASCAL WLK_PWR GG_PWR 0.5 101 0.5 0.51 0.61 0.5 101 1.0 0.99 1.00 0.5 101 2.0 1.00 1.00 0.5 199 0.5 0.85 0.92 0.5 199 1.0 1.00 1.00 0.5 199 2.0 1.00 1.00 0.5 401 0.5 1.00 1.00 0.5 401 1.0 1.00 1.00 0.5 401 2.0 1.00 1.00 1.0 101 0.5 0.26 0.31 1.0 101 1.0 0.84 0.92 1.0 101 2.0 1.00 1.00 1.0 199 0.5 0.51 0.61 1.0 199 1.0 0.99 1.00 1.0 199 2.0 1.00 1.00 1.0 401 0.5 0.87 0.93 1.0 401 1.0 1.00 1.00 1.0 401 2.0 1.00 1.00 2.0 101 0.5 0.14 0.17 2.0 101 1.0 0.51 0.61 2.0 101 2.0 0.99 1.00 2.0 199 0.5 0.26 0.31 2.0 199 1.0 0.85 0.92 2.0 199 2.0 1.00 1.00 2.0 401 0.5 0.53 0.62 2.0 401 1.0 1.00 1.00 2.0 401 2.0 1.00 1.00 j:\powerpgm\tables\pgm\TBL06.pgm