1 The SAS System 17:30 Wednesday, October 2, 2013
NOTE: Copyright (c) 2002-2010 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.3 (TS1M0)
Licensed to UNIVERSITY OF CALIFORNIA SYSTEM-SFA-T&R, Site 70081487.
NOTE: This session is executing on the Linux 3.2.0-43-generic (LIN X64) platform.
You are running SAS 9. Some SAS 8 files will be automatically converted
by the V9 engine; others are incompatible. Please see
http://support.sas.com/rnd/migration/planning/platform/64bit.html
PROC MIGRATE will preserve current SAS file attributes and is
recommended for converting all your SAS libraries from any
SAS 8 release to SAS 9. For details and examples, please see
http://support.sas.com/rnd/migration/index.html
This message is contained in the SAS news file, and is presented upon
initialization. Edit the file "news" in the "misc/base" directory to
display site-specific news and information in the program log.
The command line option "-nonews" will prevent this display.
NOTE: SAS initialization used:
real time 0.04 seconds
cpu time 0.03 seconds
1 options ls=130 nocenter nofmterr;
2
3 libname here '.';
NOTE: Libref HERE was successfully assigned as follows:
Engine: V9
Physical Name: /accounts/projects/decomposition/SIAB/dakm
3 !
4
5
6 * set up to put out residual covariances of indicators and single y outcome;
7 * Plus the var-cov matrix of the residual covariances;
8
9 * main output = rescov1.dat (66 row vector of residual covariances (LTR format) ;
10 * vrescov1.dat = 66*66 matrix output in vec format (1 column) ;
11
12
13
14 data one;
15 set here.wagedata;
16
17
18 *** next 2 lines change for males n=12024, for females n=4468;
19
20 if female=0;
21 %let n=12024;
22
23
24 array cage (*) cage1-cage11;
25 array cagesq (*) cagesq1-cagesq11;
2 The SAS System 17:30 Wednesday, October 2, 2013
26 array cagecu (*) cagecu1-cagecu11;
27
28
29 do i=1 to 11;
30 cage(i)=startage+(i-1);
31 cagesq(i)=cage(i)**2;
32 cagecu(i)=cage(i)**3;
33 end;
34
NOTE: There were 16492 observations read from the data set HERE.WAGEDATA.
NOTE: The data set WORK.ONE has 12024 observations and 72 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.04 seconds
35 proc means;
36 var w1-w11 cage1-cage11 cagesq1-cagesq11 cagecu1-cagecu11
37 schooling;
38
39 *step 1 = get residuals from indicators and y var (last in list);
40
41
42
NOTE: There were 12024 observations read from the data set WORK.ONE.
NOTE: The PROCEDURE MEANS printed page 1.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.05 seconds
cpu time 0.08 seconds
43 proc reg;
44 model w1=schooling cage1 cagesq1 cagecu1 ;
45 output out=new
46 r=r1;
47
NOTE: The data set WORK.NEW has 12024 observations and 73 variables.
NOTE: The PROCEDURE REG printed page 2.
NOTE: PROCEDURE REG used (Total process time):
real time 0.06 seconds
cpu time 0.06 seconds
48 proc reg;
49 model w2=schooling cage2 cagesq2 cagecu2 ;
50 output out=new
51 r=r2;
52
NOTE: The data set WORK.NEW has 12024 observations and 74 variables.
NOTE: The PROCEDURE REG printed page 3.
NOTE: PROCEDURE REG used (Total process time):
real time 0.06 seconds
cpu time 0.06 seconds
3 The SAS System 17:30 Wednesday, October 2, 2013
53 proc reg;
54 model w3=schooling cage3 cagesq3 cagecu3 ;
55 output out=new
56 r=r3;
57
NOTE: The data set WORK.NEW has 12024 observations and 75 variables.
NOTE: The PROCEDURE REG printed page 4.
NOTE: PROCEDURE REG used (Total process time):
real time 0.14 seconds
cpu time 0.06 seconds
58 proc reg;
59 model w4=schooling cage4 cagesq4 cagecu4 ;
60 output out=new
61 r=r4;
62
NOTE: The data set WORK.NEW has 12024 observations and 76 variables.
NOTE: The PROCEDURE REG printed page 5.
NOTE: PROCEDURE REG used (Total process time):
real time 0.13 seconds
cpu time 0.06 seconds
63 proc reg;
64 model w5=schooling cage5 cagesq5 cagecu5 ;
65 output out=new
66 r=r5;
67
NOTE: The data set WORK.NEW has 12024 observations and 77 variables.
NOTE: The PROCEDURE REG printed page 6.
NOTE: PROCEDURE REG used (Total process time):
real time 0.14 seconds
cpu time 0.07 seconds
68 proc reg;
69 model w6=schooling cage6 cagesq6 cagecu6 ;
70 output out=new
71 r=r6;
72
NOTE: The data set WORK.NEW has 12024 observations and 78 variables.
NOTE: The PROCEDURE REG printed page 7.
NOTE: PROCEDURE REG used (Total process time):
real time 0.13 seconds
cpu time 0.06 seconds
73 proc reg;
74 model w7=schooling cage7 cagesq7 cagecu7 ;
75 output out=new
76 r=r7;
77
4 The SAS System 17:30 Wednesday, October 2, 2013
NOTE: The data set WORK.NEW has 12024 observations and 79 variables.
NOTE: The PROCEDURE REG printed page 8.
NOTE: PROCEDURE REG used (Total process time):
real time 0.14 seconds
cpu time 0.07 seconds
78 proc reg;
79 model w8=schooling cage8 cagesq8 cagecu8 ;
80 output out=new
81 r=r8;
82
NOTE: The data set WORK.NEW has 12024 observations and 80 variables.
NOTE: The PROCEDURE REG printed page 9.
NOTE: PROCEDURE REG used (Total process time):
real time 0.15 seconds
cpu time 0.07 seconds
83 proc reg;
84 model w9=schooling cage9 cagesq9 cagecu9 ;
85 output out=new
86 r=r9;
87
NOTE: The data set WORK.NEW has 12024 observations and 81 variables.
NOTE: The PROCEDURE REG printed page 10.
NOTE: PROCEDURE REG used (Total process time):
real time 0.15 seconds
cpu time 0.07 seconds
88 proc reg;
89 model w10=schooling cage10 cagesq10 cagecu10 ;
90 output out=new
91 r=r10;
92
NOTE: The data set WORK.NEW has 12024 observations and 82 variables.
NOTE: The PROCEDURE REG printed page 11.
NOTE: PROCEDURE REG used (Total process time):
real time 0.15 seconds
cpu time 0.06 seconds
93 proc reg;
94 model w11=schooling cage11 cagesq11 cagecu11 ;
95 output out=new
96 r=r11;
97
98
NOTE: The data set WORK.NEW has 12024 observations and 83 variables.
NOTE: The PROCEDURE REG printed page 12.
NOTE: PROCEDURE REG used (Total process time):
real time 0.20 seconds
5 The SAS System 17:30 Wednesday, October 2, 2013
cpu time 0.07 seconds
99 proc corr cov;
100 var r1-r11;
101
102 *step 2: construct m = ltr format residual covariance elements;
103
NOTE: The PROCEDURE CORR printed pages 13-14.
NOTE: PROCEDURE CORR used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
104 data covs;
105 set new (keep=r1-r11);
106 array res (*) r1-r11;
107 array m (*) m1-m66;
108
109 index=1;
110 do j=1 to 11;
111 do k=1 to j;
112 m(index)=res(k)*res(j);
113 index=index+1;
114 end;
115 end;
116
NOTE: There were 12024 observations read from the data set WORK.NEW.
NOTE: The data set WORK.COVS has 12024 observations and 80 variables.
NOTE: DATA statement used (Total process time):
real time 0.06 seconds
cpu time 0.08 seconds
117 proc means n mean stderr;
118 var m1-m66;
119 output out=m2
120 mean=;
121
NOTE: There were 12024 observations read from the data set WORK.COVS.
NOTE: The data set WORK.M2 has 1 observations and 68 variables.
NOTE: The PROCEDURE MEANS printed pages 15-16.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.02 seconds
cpu time 0.06 seconds
122 data m2b;
123 set m2;
124 keep m1-m66;
125
NOTE: There were 1 observations read from the data set WORK.M2.
NOTE: The data set WORK.M2B has 1 observations and 66 variables.
NOTE: DATA statement used (Total process time):
6 The SAS System 17:30 Wednesday, October 2, 2013
real time 0.00 seconds
cpu time 0.00 seconds
126 proc transpose data=m2b out=m2t;
NOTE: There were 1 observations read from the data set WORK.M2B.
NOTE: The data set WORK.M2T has 66 observations and 2 variables.
NOTE: PROCEDURE TRANSPOSE used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
127 proc print data=m2t;
128 var col1; /*this is now a row vector of the LTR mean residual covariances*/
129
130
131 *step 3: construct outer product Sum { m(i) m(i)'} / N = var-cov of m;
132
133
134
NOTE: There were 66 observations read from the data set WORK.M2T.
NOTE: The PROCEDURE PRINT printed pages 17-18.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
135 proc corr cov nocorr nosimple data=covs outp=m4;
136 var m1-m66;
137
NOTE: The data set WORK.M4 has 69 observations and 68 variables.
NOTE: The PROCEDURE CORR printed pages 19-30.
NOTE: PROCEDURE CORR used (Total process time):
real time 0.06 seconds
cpu time 0.05 seconds
138 data m4b;
139 set m4;
140 if _type_="COV";
141 id=_n_;
142 keep id m1-m66;
143
NOTE: There were 69 observations read from the data set WORK.M4.
NOTE: The data set WORK.M4B has 66 observations and 67 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
144 data check;
145 set m4b;
146 array m (*) m1-m66;
147
7 The SAS System 17:30 Wednesday, October 2, 2013
148 se=sqrt( m(id)/&n. );
149 keep id se;
150
151 *check of calculations - note df = N;
NOTE: There were 66 observations read from the data set WORK.M4B.
NOTE: The data set WORK.CHECK has 66 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
152 proc print data=check;
153
154
155 *step 4: output the res-covs and their var-cov matrix;
156
NOTE: There were 66 observations read from the data set WORK.CHECK.
NOTE: The PROCEDURE PRINT printed pages 31-32.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
157 data o1;
158 set m2t;
159 file '~/rescov-male.dat';
160 put col1 12.9;
161
NOTE: The file '~/rescov-male.dat' is:
Filename=/accounts/projects/decomposition/rescov-male.dat,
Owner Name=decomposition,Group Name=root,
Access Permission=rw-r--r--,
Last Modified=Wed Oct 2 17:30:44 2013
NOTE: 66 records were written to the file '~/rescov-male.dat'.
The minimum record length was 12.
The maximum record length was 12.
NOTE: There were 66 observations read from the data set WORK.M2T.
NOTE: The data set WORK.O1 has 66 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
162 data o2;
163 set m4b;
164 file '~/vrescov-male.dat';
165 array m (*) m1-m66;
166 do j=1 to 66;
167 y=m(j)/&n. ;
168 put y 12.9;
169 end;
170
171
8 The SAS System 17:30 Wednesday, October 2, 2013
NOTE: The file '~/vrescov-male.dat' is:
Filename=/accounts/projects/decomposition/vrescov-male.dat,
Owner Name=decomposition,Group Name=root,
Access Permission=rw-r--r--,
Last Modified=Wed Oct 2 17:30:44 2013
NOTE: 4356 records were written to the file '~/vrescov-male.dat'.
The minimum record length was 12.
The maximum record length was 12.
NOTE: There were 66 observations read from the data set WORK.M4B.
NOTE: The data set WORK.O2 has 66 observations and 69 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 1.85 seconds
cpu time 1.10 seconds