1 The SAS System 11:19 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:19 2 options ls=175 ps=50 pageno=1; 3 4 ************************************************************** 5 * "Power Calculations..." -- Table 5 * 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 * IHDP ratios of 4 intervals: IHDP spread within * 17 * Beta and Sigma estimates from Table 2. * 18 * * 19 * PROGRAM: j:\powerpgm\tables\pgm\TBL05.pgm * 20 * MAINFRAME REF: ulisala.ihdp.cntl(p0101) * 21 * * 22 * DATE: 1/20/93 PROGRAMMER: Bethel Fetterman * 23 **************************************************************; 24 25 26 footnote 'j:\powerpgm\tables\pgm\TBL05.pgm'; 27 28 **************************************************************; 29 title 'Power Calculations for Table 5'; 30 proc iml workspace=300; Worksize = 307200 Symbol size = 65520 IML Ready 31 %include 'j:\powerlib\powerlib.iml' / nosource2; NOTE: Module _INPTCHK defined. 2 The SAS System 11:19 Tuesday, January 26, 1993 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. 1755 1756 opt_off = {rhoscal collapse}; 1757 1758 BETA = {114.463 104.658 98.827 , 1759 2.882 8.768 10.674 , 1760 -.7097 -.8962 -1.297 , 1761 -.2056 -.5440 -.7182}; 1762 1763 SIGMA = {218.478 83.662 72.191, 1764 83.662 251.916 158.603, 1765 72.191 158.603 244.578}; 1766 1767 BETASCAL = {.5 1 2}; 1768 SIGSCAL = {.5 1 2}; 1769 1770 **** Contrasts for Time by Predictor Interaction ****; 1771 C = j(3,1,0) || i(3); 1771 ** Mother's IQ trend coefficients **; 1772 1773 timesobs = {12 24 36}`; 1773 ** Degree of trend in child IQ over time **; 1774 polytobs = orpol(timesobs); 1775 U = polytobs[,2:3]; 1775 ** Linear & Quadratic **; 1776 1777 ***** Distribution of Mother's IQ *****; 1778 ***** IHDP Ratios of 21 Intervals *****; 1779 percent = { 0.6 1.8 4.7 7.1 6.5 11.8 10.0 1780 13.5 7.1 8.8 8.8 5.3 1.8 2.9 1781 1.2 4.1 0.6 1.8 0.6 0.6 0.6}`; 1782 sumpct = sum(percent); 3 The SAS System 11:19 Tuesday, January 26, 1993 1783 prop = percent / sumpct; 1783 ** Proportion of Mother's IQ **; 1784 ** in each of 21 categories **; 1785 1786 zscore = j(21,1,-4.25) + 0.25#(1:21)`; 1786 ** Correspond to IQ **; 1787 ** values 40-115 **; 1788 1789 ***** Creation of Essence(X) *****; 1790 nplanvec = {100 200 400}`; 1790 ** Desired sample size N **; 1791 do inplan=1 to nrow(nplanvec); 1792 nplan = nplanvec[inplan,1]; 1793 freq = round(nplan#prop, 1); 1793 ** Frequency dist'n of IQ **; 1794 nobs = sum(freq); 1794 ** based on N and PROP **; 1795 ziq={.}; 1796 ** Create a vector containing FREQ[i] occurrences **; 1797 ** of the score ZSCORE[i]. This is the expected **; 1798 ** vector of Z-scores. **; 1799 do iz = 1 to nrow(zscore); 1800 if freq[iz,1]>0 then 1801 ziq = ziq // j(freq[iz,1],1,zscore[iz,1]); 1802 end; 1803 ziq = ziq[2:nrow(ziq),1]; 1804 ESSENCEX = j(nobs,1,1) || ziq || ziq##2 || ziq##3; 1805 1806 ALPHA = 0.05; 1807 REPN = 1; 1808 1809 RUN POWER; 1810 outpower = outpower // _holdpow; 1811 if inplan ^= nrow(nplanvec) then print /; 1812 end; 1813 1814 create outdata var _holdnm; 1815 append from outpower; 1816 close outdata; NOTE: The data set WORK.OUTDATA has 27 observations and 9 variables. 1817 quit; Exiting IML. NOTE: The PROCEDURE IML printed pages 1-9. NOTE: The PROCEDURE IML used 42.34 seconds. 1818 1819 proc sort data=outdata; 4 The SAS System 11:19 Tuesday, January 26, 1993 1820 by sigscal total_n betascal; 1821 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. 1822 1823 proc print data=outdata noobs; 1824 var sigscal total_n betascal wlk_pwr gg_pwr; 1825 title 'Table 5'; 1826 format wlk_pwr gg_pwr 4.2; 1827 run; NOTE: The PROCEDURE PRINT printed page 10. NOTE: The PROCEDURE PRINT used .56 seconds. 1828 **************************************************************; NOTE: SAS Institute Inc., SAS Circle, PO Box 8000, Cary, NC 27512-8000 Power Calculations for Table 5 11:19 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\TBL05.pgm Power Calculations for Table 5 11:19 Tuesday, January 26, 1993 2 power=1 should be reported as power>.999 j:\powerpgm\tables\pgm\TBL05.pgm Power Calculations for Table 5 11:19 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 102 0.252 0.902 0.892 0.301 2 0.05 0.5 1 102 0.829 0.902 0.892 0.906 3 0.05 0.5 2 102 1 0.902 0.892 1 4 0.05 1 0.5 102 0.139 0.902 0.892 0.16 5 0.05 1 1 102 0.493 0.902 0.892 0.585 6 0.05 1 2 102 0.99 0.902 0.892 0.998 7 0.05 2 0.5 102 0.091 0.902 0.892 0.099 8 0.05 2 1 102 0.252 0.902 0.892 0.301 9 0.05 2 2 102 0.829 0.902 0.892 0.906 j:\powerpgm\tables\pgm\TBL05.pgm Power Calculations for Table 5 11:19 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\TBL05.pgm Power Calculations for Table 5 11:19 Tuesday, January 26, 1993 5 power=1 should be reported as power>.999 j:\powerpgm\tables\pgm\TBL05.pgm Power Calculations for Table 5 11:19 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 201 0.409 0.902 0.897 0.484 2 0.05 0.5 1 201 0.974 0.902 0.897 0.991 3 0.05 0.5 2 201 1 0.902 0.897 1 4 0.05 1 0.5 201 0.209 0.902 0.897 0.246 5 0.05 1 1 201 0.742 0.902 0.897 0.825 6 0.05 1 2 201 1 0.902 0.897 1 7 0.05 2 0.5 201 0.121 0.902 0.897 0.136 8 0.05 2 1 201 0.409 0.902 0.897 0.484 9 0.05 2 2 201 0.974 0.902 0.897 0.991 j:\powerpgm\tables\pgm\TBL05.pgm Power Calculations for Table 5 11:19 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\TBL05.pgm Power Calculations for Table 5 11:19 Tuesday, January 26, 1993 8 power=1 should be reported as power>.999 j:\powerpgm\tables\pgm\TBL05.pgm Power Calculations for Table 5 11:19 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 397 0.74 0.902 0.899 0.82 2 0.05 0.5 1 397 1 0.902 0.899 1 3 0.05 0.5 2 397 1 0.902 0.899 1 4 0.05 1 0.5 397 0.406 0.902 0.899 0.478 5 0.05 1 1 397 0.974 0.902 0.899 0.991 6 0.05 1 2 397 1 0.902 0.899 1 7 0.05 2 0.5 397 0.208 0.902 0.899 0.244 8 0.05 2 1 397 0.74 0.902 0.899 0.82 9 0.05 2 2 397 1 0.902 0.899 1 j:\powerpgm\tables\pgm\TBL05.pgm Table 5 11:19 Tuesday, January 26, 1993 10 SIGSCAL TOTAL_N BETASCAL WLK_PWR GG_PWR 0.5 102 0.5 0.25 0.30 0.5 102 1.0 0.83 0.91 0.5 102 2.0 1.00 1.00 0.5 201 0.5 0.41 0.48 0.5 201 1.0 0.97 0.99 0.5 201 2.0 1.00 1.00 0.5 397 0.5 0.74 0.82 0.5 397 1.0 1.00 1.00 0.5 397 2.0 1.00 1.00 1.0 102 0.5 0.14 0.16 1.0 102 1.0 0.49 0.59 1.0 102 2.0 0.99 1.00 1.0 201 0.5 0.21 0.25 1.0 201 1.0 0.74 0.83 1.0 201 2.0 1.00 1.00 1.0 397 0.5 0.41 0.48 1.0 397 1.0 0.97 0.99 1.0 397 2.0 1.00 1.00 2.0 102 0.5 0.09 0.10 2.0 102 1.0 0.25 0.30 2.0 102 2.0 0.83 0.91 2.0 201 0.5 0.12 0.14 2.0 201 1.0 0.41 0.48 2.0 201 2.0 0.97 0.99 2.0 397 0.5 0.21 0.24 2.0 397 1.0 0.74 0.82 2.0 397 2.0 1.00 1.00 j:\powerpgm\tables\pgm\TBL05.pgm