1 The SAS System 15:08 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:08 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 * IHDP ratios of 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\TBL11P04.pgm * 21 * MAINFRAME REF: ulisala.ihdp.cntl(p0105), modified * 22 * * 23 * DATE: 1/20/93 PROGRAMMER: Bethel Fetterman * 24 **************************************************************; 25 26 footnote 'j:\powerpgm\tables\pgm\TBL11P04.pgm'; 27 28 **************************************************************; 29 title 'Power Calculations for Table 11'; 30 title2 'Cubic Polynomial, Unbalanced Intervals'; 31 title3 'By Time Contrast. N=100'; 32 proc iml workspace=300; Worksize = 307200 Symbol size = 65520 IML Ready 2 The SAS System 15:08 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 ***** IHDP Ratios of 21 Intervals *****; 1773 percent = { 0.6 1.8 4.7 7.1 6.5 11.8 10.0 1774 13.5 7.1 8.8 8.8 5.3 1.8 2.9 1775 1.2 4.1 0.6 1.8 0.6 0.6 0.6}`; 1776 sumpct = sum(percent); 1777 prop = percent / sumpct; 1777 ** Proportion of Mother's IQ **; 1778 ** in each of 21 categories **; 1779 1780 zscore = j(21,1,-4.25) + 0.25#(1:21)`; 1780 ** Correspond to IQ **; 1781 ** values 40-115 **; 1782 1783 ***** Creation of Essence(X) *****; 3 The SAS System 15:08 Tuesday, January 26, 1993 1784 nplan = 100; 1785 freq = round(nplan#prop, 1); 1785 ** Frequency dist'n of IQ **; 1786 nobs = sum(freq); 1786 ** based on N and PROP **; 1787 ziq={.}; 1788 ** Create a vector containing FREQ[i] occurrences **; 1789 ** of the score ZSCORE[i]. This is the expected **; 1790 ** vector of Z-scores. **; 1791 do iz = 1 to nrow(zscore); 1792 if freq[iz,1]>0 then 1793 ziq = ziq // j(freq[iz,1],1,zscore[iz,1]); 1794 end; 1795 ziq = ziq[2:nrow(ziq),1]; 1796 ESSENCEX = j(nobs,1,1) || ziq || ziq##2 || ziq##3; 1797 1798 ALPHA = 0.05; 1799 REPN = 1; 1800 1801 **** Contrasts for Time by Predictor Interaction ****; 1802 C = j(3,1,0) || i(3); 1802 ** Mother's IQ trend coefficients **; 1803 1804 ***** Contrasts for hypotheses about *****; 1805 ***** degree of trend in child IQ over time. *****; 1806 timesobs = {12 24 36}`; 1807 polytobs = orpol(timesobs); 1808 utime = polytobs[,2:3]; 1808 ** Linear & Quadratic **; 1809 ulin = polytobs[,2]; 1809 ** Linear Only **; 1810 ulast = {0 0 1}`; 1810 ** Last time (36 mo.) **; 1811 1812 do i=1 to 3; 1813 if i=1 then U=ulast; 1814 else if i=2 then U=ulin; 1815 else if i=3 then U=utime; 1816 1817 run power; 1818 names = {"CONTRAST"} || _holdnm; 1819 pow = j(nrow(_holdpow),1,i) || _holdpow; 1820 outpower = outpower // pow; 1821 if (i ^= 3) then print /; 1822 end; 1823 1824 create outdata var names; 1825 append from outpower; 4 The SAS System 15:08 Tuesday, January 26, 1993 1826 close outdata; NOTE: The data set WORK.OUTDATA has 9 observations and 9 variables. 1827 quit; Exiting IML. NOTE: The PROCEDURE IML printed pages 1-7. NOTE: The PROCEDURE IML used 36.96 seconds. 1828 1829 proc sort data=outdata; 1830 by contrast betascal; 1831 run; NOTE: SAS sort was used. NOTE: The data set WORK.OUTDATA has 9 observations and 9 variables. NOTE: The PROCEDURE SORT used .71 seconds. 1832 1833 proc format; 1834 value contfmt 1='Last Time (36 mo.)' 1835 2='Linear Only' 1836 3='Linear & Quadratic'; NOTE: Format CONTFMT has been output. 1837 run; NOTE: The PROCEDURE FORMAT used 1.59 seconds. 1838 1839 proc print data=outdata noobs; 1840 var contrast betascal wlk_pwr gg_pwr; 1841 format wlk_pwr gg_pwr 4.2 contrast contfmt.; 1842 title 'Table 11: Cubic Polynomial, Unbalanced Intervals'; 1843 title2 'By Time Contrast. N=100'; 1844 run; NOTE: The PROCEDURE PRINT printed page 8. NOTE: The PROCEDURE PRINT used .71 seconds. 1845 **************************************************************; NOTE: SAS Institute Inc., SAS Circle, PO Box 8000, Cary, NC 27512-8000 Power Calculations for Table 11 15:08 Tuesday, January 26, 1993 1 Cubic Polynomial, Unbalanced 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\TBL11P04.pgm Power Calculations for Table 11 15:08 Tuesday, January 26, 1993 2 Cubic Polynomial, Unbalanced 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\TBL11P04.pgm Power Calculations for Table 11 15:08 Tuesday, January 26, 1993 3 Cubic Polynomial, Unbalanced Intervals By Time Contrast. N=100 _HOLDPOW CASE ALPHA BETASCAL TOTAL_N WLK_PWR EPSILON GG_EXEPS GG_PWR 1 0.05 0.5 102 0.528 1 1 0.528 2 0.05 1 102 0.992 1 1 0.992 3 0.05 2 102 1 1 1 1 j:\powerpgm\tables\pgm\TBL11P04.pgm Power Calculations for Table 11 15:08 Tuesday, January 26, 1993 4 Cubic Polynomial, Unbalanced 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 j:\powerpgm\tables\pgm\TBL11P04.pgm Power Calculations for Table 11 15:08 Tuesday, January 26, 1993 5 Cubic Polynomial, Unbalanced Intervals By Time Contrast. N=100 _HOLDPOW CASE ALPHA BETASCAL TOTAL_N WLK_PWR EPSILON GG_EXEPS GG_PWR 1 0.05 0.5 102 0.183 1 1 0.183 2 0.05 1 102 0.624 1 1 0.624 3 0.05 2 102 0.998 1 1 0.998 j:\powerpgm\tables\pgm\TBL11P04.pgm Power Calculations for Table 11 15:08 Tuesday, January 26, 1993 6 Cubic Polynomial, Unbalanced 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 j:\powerpgm\tables\pgm\TBL11P04.pgm Power Calculations for Table 11 15:08 Tuesday, January 26, 1993 7 Cubic Polynomial, Unbalanced Intervals By Time Contrast. N=100 _HOLDPOW CASE ALPHA BETASCAL TOTAL_N WLK_PWR EPSILON GG_EXEPS GG_PWR 1 0.05 0.5 102 0.139 0.902 0.892 0.16 2 0.05 1 102 0.493 0.902 0.892 0.585 3 0.05 2 102 0.99 0.902 0.892 0.998 j:\powerpgm\tables\pgm\TBL11P04.pgm Table 11: Cubic Polynomial, Unbalanced Intervals 15:08 Tuesday, January 26, 1993 8 By Time Contrast. N=100 CONTRAST BETASCAL WLK_PWR GG_PWR Last Time (36 mo.) 0.5 0.53 0.53 Last Time (36 mo.) 1.0 0.99 0.99 Last Time (36 mo.) 2.0 1.00 1.00 Linear Only 0.5 0.18 0.18 Linear Only 1.0 0.62 0.62 Linear Only 2.0 1.00 1.00 Linear & Quadratic 0.5 0.14 0.16 Linear & Quadratic 1.0 0.49 0.59 Linear & Quadratic 2.0 0.99 1.00 j:\powerpgm\tables\pgm\TBL11P04.pgm