1 The SAS System 11:31 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:31 2 options ls=175 ps=50 pageno=1; 3 ************************************************************** 4 * "Power Calculations..." -- Table 11 * 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 * Balanced 4 intervals: IHDP spread within * 16 * Beta and Sigma estimates from Table 2. * 17 * N = 100 * 18 * Time contrasts: Last time, Linear, Linear & Quadratic * 19 * * 20 * PROGRAM: j:\powerpgm\tables\pgm\TBL11P03.pgm * 21 * MAINFRAME REF: ulisala.ihdp.cntl(p0102), modified * 22 * * 23 * DATE: 1/20/93 PROGRAMMER: Bethel Fetterman * 24 **************************************************************; 25 26 footnote 'j:\powerpgm\tables\pgm\TBL11P03.pgm'; 27 28 **************************************************************; 29 title 'Power Calculations for Table 11'; 30 title2 'Cubic Polynomial, Balanced Intervals'; 31 title3 'By Time Contrast. N=100'; 32 proc iml workspace=300; Worksize = 307200 Symbol size = 65520 IML Ready 2 The SAS System 11:31 Tuesday, January 26, 1993 33 %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. 1757 1758 opt_off = {rhoscal sigscal collapse}; 1759 1760 BETA = {114.463 104.658 98.827 , 1761 2.882 8.768 10.674 , 1762 -.7097 -.8962 -1.297 , 1763 -.2056 -.5440 -.7182}; 1764 SIGMA = {218.478 83.662 72.191, 1765 83.662 251.916 158.603, 1766 72.191 158.603 244.578}; 1767 1768 BETASCAL = {.5 1 2}; 1769 1770 1771 ***** Distribution of Mother's IQ *****; 1772 ***** Balanced Four Intervals *****; 1773 percent1 = { 0.6 1.8 4.7 7.1 6.5 11.8 10.0 13.5 7.1}`; 1773 ** IQ <= 70 **; 1774 percent2 = { 8.8 8.8 5.3 1.8}`; 1774 ** IQ 71-85 **; 1775 percent3 = {2.9 1.2 4.1 0.6}`; 1775 ** IQ 86-100 **; 1776 percent4 = {1.8 0.6 0.6 0.6}`; 1776 ** IQ >100 **; 1777 1778 sumpct1 = sum(percent1); 1778 ** Compute weighted proportions **; 1779 sumpct2 = sum(percent2); 1779 ** Step 1 **; 3 The SAS System 11:31 Tuesday, January 26, 1993 1780 sumpct3 = sum(percent3); 1781 sumpct4 = sum(percent4); 1782 1783 prop1 = percent1 / sumpct1 # 0.25; 1783 ** Step 2 **; 1784 prop2 = percent2 / sumpct2 # 0.25; 1785 prop3 = percent3 / sumpct3 # 0.25; 1786 prop4 = percent4 / sumpct4 # 0.25; 1787 1788 prop = prop1 // prop2 // prop3 // prop4; 1789 1790 zscore = j(21,1,-4.25) + 0.25#(1:21)`; 1790 ** Correspond to IQ **; 1791 ** values 40-115 **; 1792 1793 ***** Creation of Essence(X) *****; 1794 nplan = 100; 1795 freq = round(nplan#prop, 1); 1795 ** Frequency dist'n of IQ **; 1796 nobs = sum(freq); 1796 ** based on N and PROP **; 1797 ziq={.}; 1798 ** Create a vector containing FREQ[i] occurrences **; 1799 ** of the score ZSCORE[i]. This is the expected **; 1800 ** vector of Z-scores. **; 1801 do iz = 1 to nrow(zscore); 1802 if freq[iz,1]>0 then 1803 ziq = ziq // j(freq[iz,1],1,zscore[iz,1]); 1804 end; 1805 ziq = ziq[2:nrow(ziq),1]; 1806 ESSENCEX = j(nobs,1,1) || ziq || ziq##2 || ziq##3; 1807 1808 ALPHA = 0.05; 1809 REPN = 1; 1810 1811 **** Contrasts for Time by Predictor Interaction ****; 1812 C = j(3,1,0) || i(3); 1812 ** Mother's IQ trend coefficients **; 1813 1814 ***** Contrasts for hypotheses about *****; 1815 ***** degree of trend in child IQ over time. *****; 1816 timesobs = {12 24 36}`; 1817 polytobs = orpol(timesobs); 1818 utime = polytobs[,2:3]; 1818 ** Linear & Quadratic **; 1819 ulin = polytobs[,2]; 1819 ** Linear Only **; 1820 ulast = {0 0 1}`; 4 The SAS System 11:31 Tuesday, January 26, 1993 1820 ** Last time (36 mo.) **; 1821 1822 do i=1 to 3; 1823 if i=1 then U=ulast; 1824 else if i=2 then U=ulin; 1825 else if i=3 then U=utime; 1826 1827 run power; 1828 names = {"CONTRAST"} || _holdnm; 1829 pow = j(nrow(_holdpow),1,i) || _holdpow; 1830 outpower = outpower // pow; 1831 if (i ^= 3) then print /; 1832 end; 1833 1834 create outdata var names; 1835 append from outpower; 1836 close outdata; NOTE: The data set WORK.OUTDATA has 9 observations and 9 variables. 1837 quit; Exiting IML. NOTE: The PROCEDURE IML printed pages 1-9. NOTE: The PROCEDURE IML used 38.84 seconds. 1838 1839 proc sort data=outdata; 1840 by contrast betascal; 1841 run; NOTE: SAS sort was used. NOTE: The data set WORK.OUTDATA has 9 observations and 9 variables. NOTE: The PROCEDURE SORT used .81 seconds. 1842 1843 proc format; 1844 value contfmt 1='Last Time (36 mo.)' 1845 2='Linear Only' 1846 3='Linear & Quadratic'; NOTE: Format CONTFMT has been output. 1847 run; NOTE: The PROCEDURE FORMAT used 1.60 seconds. 1848 1849 proc print data=outdata noobs; 1850 var contrast betascal wlk_pwr gg_pwr; 5 The SAS System 11:31 Tuesday, January 26, 1993 1851 format wlk_pwr gg_pwr 4.2 contrast contfmt.; 1852 title2 'Table 11: Cubic Polynomial, Balanced Intervals'; 1853 title3 'By Time Contrast. N=100'; 1854 run; NOTE: The PROCEDURE PRINT printed page 10. NOTE: The PROCEDURE PRINT used .65 seconds. 1855 **************************************************************; NOTE: SAS Institute Inc., SAS Circle, PO Box 8000, Cary, NC 27512-8000 Power Calculations for Table 11 11:31 Tuesday, January 26, 1993 1 Cubic Polynomial, Balanced Intervals By Time Contrast. N=100 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 0 1 CBETAU C*BETA*U = 10.674 -1.297 -0.7182 WARNING: j:\powerpgm\tables\pgm\TBL11P03.pgm Power Calculations for Table 11 11:31 Tuesday, January 26, 1993 2 Cubic Polynomial, 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\TBL11P03.pgm Power Calculations for Table 11 11:31 Tuesday, January 26, 1993 3 Cubic Polynomial, 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 101 0.834 1 1 0.834 2 0.05 1 101 1 1 1 1 3 0.05 2 101 1 1 1 1 j:\powerpgm\tables\pgm\TBL11P03.pgm Power Calculations for Table 11 11:31 Tuesday, January 26, 1993 4 Cubic Polynomial, Balanced Intervals By Time Contrast. N=100 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 1.923E-16 0.7071068 CBETAU C*BETA*U = 5.509776 -0.415284 -0.362463 WARNING: j:\powerpgm\tables\pgm\TBL11P03.pgm Power Calculations for Table 11 11:31 Tuesday, January 26, 1993 5 Cubic Polynomial, 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\TBL11P03.pgm Power Calculations for Table 11 11:31 Tuesday, January 26, 1993 6 Cubic Polynomial, 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 101 0.35 1 1 0.35 2 0.05 1 101 0.928 1 1 0.928 3 0.05 2 101 1 1 1 1 j:\powerpgm\tables\pgm\TBL11P03.pgm Power Calculations for Table 11 11:31 Tuesday, January 26, 1993 7 Cubic Polynomial, Balanced Intervals By Time Contrast. N=100 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: j:\powerpgm\tables\pgm\TBL11P03.pgm Power Calculations for Table 11 11:31 Tuesday, January 26, 1993 8 Cubic Polynomial, 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\TBL11P03.pgm Power Calculations for Table 11 11:31 Tuesday, January 26, 1993 9 Cubic Polynomial, 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 101 0.261 0.902 0.892 0.314 2 0.05 1 101 0.843 0.902 0.892 0.919 3 0.05 2 101 1 0.902 0.892 1 j:\powerpgm\tables\pgm\TBL11P03.pgm Power Calculations for Table 11 11:31 Tuesday, January 26, 1993 10 Table 11: Cubic Polynomial, Balanced Intervals 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.35 0.35 Linear Only 1.0 0.93 0.93 Linear Only 2.0 1.00 1.00 Linear & Quadratic 0.5 0.26 0.31 Linear & Quadratic 1.0 0.84 0.92 Linear & Quadratic 2.0 1.00 1.00 j:\powerpgm\tables\pgm\TBL11P03.pgm