BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
nassimsa
Obsidian | Level 7

Hi 

 

I am new student using SAS, i used the same code few months ag o and always received the results and since few days no output is generated even when i use the example from SAS and no errors are showed, all code used never generates output. I really need to have the results as soon as possible to send it to my professor , please help me if you have any idea on how to solve it.

 

Thank you in advance.

 

Begining of the code : 

 

/** Import an XLSX file.  **/

PROC IMPORT DATAFILE="/home/nassimsa0/sasuser.v94/ENA.xlsx"
              OUT=WORK.ENA
              DBMS=XLSX
              REPLACE;
RUN;

/** Print the results. **/

PROC PRINT DATA=WORK.ENA; RUN;
data WORK.ENA;
set WORK.ENA;
   array values {6} c g f h e s;
   array costshares {6} sc sg sf sh se ss;
   cost = sum(c,g,f,h,e,s);
   do i = 1 to 6;
      costshares{i} = values{i}/cost;
   end;
run;

data WORK.ENA;
set WORK.ENA;
 run;
proc sgplot data = WORK.ENA;
   series x = year y = sc / markers markerattrs =(symbol=circle);
   series x = year y = sg / markers markerattrs =(symbol=square);
   series x = year y = sf / markers markerattrs =(symbol=star);
   series x = year y = sh / markers markerattrs =(symbol=diamond);
   series x = year y = se / markers markerattrs =(symbol=hash);
   series x = year y = ss / markers markerattrs =(symbol=dot);
   title 'Factor Cost Shares';
   yaxis label = 'Cost Share';


1 ACCEPTED SOLUTION

Accepted Solutions
PeterClemmensen
Tourmaline | Level 20

This log is from running more code than you initially posted. So I have not read it thoroughly. 

 

However, you have a PROC IML step at the bottom. PROC IML must be terminated by a QUIT; statement and not RUN;.

View solution in original post

7 REPLIES 7
PeterClemmensen
Tourmaline | Level 20

Can you post the log please?

nassimsa
Obsidian | Level 7

Thank you very much for your quick reply. 

Please find below the LOG , its very long;

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 /** Import an XLSX file. **/
74
75 PROC IMPORT DATAFILE="/home/nassimsa0/ER.xlsx"
76 OUT=WORK.ER
77 DBMS=XLSX
78 REPLACE;
79 RUN;
 
NOTE: The import data set has 16 observations and 14 variables.
NOTE: WORK.ER data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 2774.28k
OS Memory 39336.00k
Timestamp 18/07/2019 10:49:26 AM
Step Count 66 Switch Count 2
Page Faults 0
Page Reclaims 660
Page Swaps 0
Voluntary Context Switches 15
Involuntary Context Switches 0
Block Input Operations 24
Block Output Operations 264
 
 
80
81 /** Print the results. **/
82
83 PROC PRINT DATA=WORK.ER; RUN;
 
NOTE: There were 16 observations read from the data set WORK.ER.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.07 seconds
user cpu time 0.08 seconds
system cpu time 0.00 seconds
memory 2658.46k
OS Memory 37544.00k
Timestamp 18/07/2019 10:49:26 AM
Step Count 67 Switch Count 0
Page Faults 0
Page Reclaims 89
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 24
 
 
84 data WORK.ER;
85 set WORK.ER;
86 array values {6} c g f h e s;
87 array costshares {6} sc sg sf sh se ss;
88 cost = sum(c,g,f,h,e,s);
89 do i = 1 to 6;
90 costshares{i} = values{i}/cost;
91 end;
92 run;
 
NOTE: There were 16 observations read from the data set WORK.ER.
NOTE: The data set WORK.ER has 16 observations and 22 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 995.12k
OS Memory 38060.00k
Timestamp 18/07/2019 10:49:26 AM
Step Count 68 Switch Count 2
Page Faults 0
Page Reclaims 148
Page Swaps 0
Voluntary Context Switches 14
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 264
 
 
93
94 data WORK.ER;
95 set WORK.ER;
96 label a_c = "SC Intercept"
97 a_g = "SG Intercept"
98 a_f = "SF Intercept"
99 a_h = "SH Intercept"
100 a_e = "SE Intercept"
101 a_s = "SS Intercept"
102 gcc = "SC C Price"
103 gcg = "SC G Price"
104 gcf = "SC F Price"
105 gch = "SC H Price"
106 gce = "SC E Price"
107 gcs = "SC S Price"
108 gcy = "SC Output"
109 ggc = "SG C Price"
110 ggg = "SG G Price"
111 ggf = "SG F Price"
112 ggh = "SG H Price"
113 gge = "SG E Price"
114 ggs = "SG S Price"
115 ggy = "SG Output"
116 gfc = "SF C Price"
117 gfg = "SF G Price"
118 gff = "SF F Price"
119 gfh = "SF H Price"
120 gfe = "SF E Price"
121 gfs = "SF S Price"
122 gfy = "SF Output"
123 ghc = "SH C Price"
124 ghg = "SH G Price"
125 ghf = "SH F Price"
126 ghh = "SH H Price"
127 ghe = "SH E Price"
128 ghs = "SH S Price"
129 ghy = "SH Output"
130 gec = "SE C Price"
131 geg = "SE G Price"
132 gef = "SE F Price"
133 geh = "SE H Price"
134 gee = "SE E Price"
135 ges = "SE S Price"
136 gey = "SE Output"
137 gsc = "SS C Price"
138 gsg = "SS G Price"
139 gsf = "SS F Price"
140 gsh = "SS H Price"
141 gse = "SS E Price"
142 gss = "SS S Price"
143 gsy = "SS Output";
144 run;
 
NOTE: Variable a_c is uninitialized.
NOTE: Variable a_g is uninitialized.
NOTE: Variable a_f is uninitialized.
NOTE: Variable a_h is uninitialized.
NOTE: Variable a_e is uninitialized.
NOTE: Variable a_s is uninitialized.
NOTE: Variable gcc is uninitialized.
NOTE: Variable gcg is uninitialized.
NOTE: Variable gcf is uninitialized.
NOTE: Variable gch is uninitialized.
NOTE: Variable gce is uninitialized.
NOTE: Variable gcs is uninitialized.
NOTE: Variable gcy is uninitialized.
NOTE: Variable ggc is uninitialized.
NOTE: Variable ggg is uninitialized.
NOTE: Variable ggf is uninitialized.
NOTE: Variable ggh is uninitialized.
NOTE: Variable gge is uninitialized.
NOTE: Variable ggs is uninitialized.
NOTE: Variable ggy is uninitialized.
NOTE: Variable gfc is uninitialized.
NOTE: Variable gfg is uninitialized.
NOTE: Variable gff is uninitialized.
NOTE: Variable gfh is uninitialized.
NOTE: Variable gfe is uninitialized.
NOTE: Variable gfs is uninitialized.
NOTE: Variable gfy is uninitialized.
NOTE: Variable ghc is uninitialized.
NOTE: Variable ghg is uninitialized.
NOTE: Variable ghf is uninitialized.
NOTE: Variable ghh is uninitialized.
NOTE: Variable ghe is uninitialized.
NOTE: Variable ghs is uninitialized.
NOTE: Variable ghy is uninitialized.
NOTE: Variable gec is uninitialized.
NOTE: Variable geg is uninitialized.
NOTE: Variable gef is uninitialized.
NOTE: Variable geh is uninitialized.
NOTE: Variable gee is uninitialized.
NOTE: Variable ges is uninitialized.
NOTE: Variable gey is uninitialized.
NOTE: Variable gsc is uninitialized.
NOTE: Variable gsg is uninitialized.
NOTE: Variable gsf is uninitialized.
NOTE: Variable gsh is uninitialized.
NOTE: Variable gse is uninitialized.
NOTE: Variable gss is uninitialized.
NOTE: Variable gsy is uninitialized.
NOTE: There were 16 observations read from the data set WORK.ER.
NOTE: The data set WORK.ER has 16 observations and 22 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.01 seconds
system cpu time 0.00 seconds
memory 1052.46k
OS Memory 38060.00k
Timestamp 18/07/2019 10:49:26 AM
Step Count 69 Switch Count 2
Page Faults 0
Page Reclaims 133
Page Swaps 0
Voluntary Context Switches 11
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 264
 
 
145 proc sgplot data = WORK.ER;
146 series x = year y = sc / markers markerattrs =(symbol=circle);
147 series x = year y = sg / markers markerattrs =(symbol=square);
148 series x = year y = sf / markers markerattrs =(symbol=star);
149 series x = year y = sh / markers markerattrs =(symbol=diamond);
150 series x = year y = se / markers markerattrs =(symbol=hash);
151 series x = year y = ss / markers markerattrs =(symbol=dot);
152 title 'Factor Cost Shares';
153 yaxis label = 'Cost Share';
154 run;
 
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.30 seconds
user cpu time 0.13 seconds
system cpu time 0.02 seconds
memory 18532.03k
OS Memory 53420.00k
Timestamp 18/07/2019 10:49:26 AM
Step Count 70 Switch Count 2
Page Faults 0
Page Reclaims 4724
Page Swaps 0
Voluntary Context Switches 349
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 1232
 
NOTE: SYMBOL=DOT n'est pas valide. La valeur par défaut sera utilisée.
NOTE: SYMBOL=DOT n'est pas valide. La valeur par défaut sera utilisée.
NOTE: SYMBOL=DOT n'est pas valide. La valeur par défaut sera utilisée.
NOTE: There were 16 observations read from the data set WORK.ER.
 
155 proc sgplot data = WORK.ER;
156 series x = year y = c / markers markerattrs =(symbol=circle);
157 series x = year y = g / markers markerattrs =(symbol=square);
158 series x = year y = f / markers markerattrs =(symbol=star);
159 series x = year y = h / markers markerattrs =(symbol=diamond);
160 series x = year y = e / markers markerattrs =(symbol=hash);
161 series x = year y = s / markers markerattrs =(symbol=dot);
162 title 'Factor Quantities';
163 yaxis label = 'Quantity';
164 run;
 
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.21 seconds
user cpu time 0.07 seconds
system cpu time 0.01 seconds
memory 3095.31k
OS Memory 54956.00k
Timestamp 18/07/2019 10:49:26 AM
Step Count 71 Switch Count 2
Page Faults 0
Page Reclaims 675
Page Swaps 0
Voluntary Context Switches 326
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 992
 
NOTE: SYMBOL=DOT n'est pas valide. La valeur par défaut sera utilisée.
NOTE: SYMBOL=DOT n'est pas valide. La valeur par défaut sera utilisée.
NOTE: SYMBOL=DOT n'est pas valide. La valeur par défaut sera utilisée.
NOTE: There were 16 observations read from the data set WORK.ER.
 
165 proc sgplot data = WORK.ER;
166 series x = year y = pc / markers markerattrs =(symbol=circle);
167 series x = year y = pg / markers markerattrs =(symbol=square);
168 series x = year y = pf / markers markerattrs =(symbol=star);
169 series x = year y = ph / markers markerattrs =(symbol=diamond);
170 series x = year y = pe / markers markerattrs =(symbol=hash);
171 series x = year y = ps / markers markerattrs =(symbol=dot);
172 title 'Factor Prices';
173 yaxis label = 'Price';
174 run;
 
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.21 seconds
user cpu time 0.08 seconds
system cpu time 0.01 seconds
memory 3053.93k
OS Memory 54956.00k
Timestamp 18/07/2019 10:49:27 AM
Step Count 72 Switch Count 2
Page Faults 0
Page Reclaims 637
Page Swaps 0
Voluntary Context Switches 330
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 976
 
NOTE: SYMBOL=DOT n'est pas valide. La valeur par défaut sera utilisée.
NOTE: SYMBOL=DOT n'est pas valide. La valeur par défaut sera utilisée.
NOTE: SYMBOL=DOT n'est pas valide. La valeur par défaut sera utilisée.
NOTE: There were 16 observations read from the data set WORK.ER.
 
175 proc model data = WORK.ER;
176 parameters a_c gcc gcg gcf gch gce gcs gcy
177 a_g ggc ggg ggf ggh gge ggs ggy
178 a_h ghc ghg ghf ghh ghe ghs ghy
179 a_e gec geg gef geh gee ges gey
180 a_s gsc gsg gsf gsh gse gss gsy;
181 endogenous sc sg sh se ss;
182 exogenous pc pg pf ph pe ps y;
183
184 /*System of Derived Demand Equations*/
185 sc = a_c + gcc*log(pc) + gcg*log(pg) + gcf*log(pf) + gch*log(ph) + gce*log(pe)
186 + gcs*log(ps) + gcy*log(y);
187 sg = a_g + ggc*log(pc) + ggg*log(pg) + ggf*log(pf) + ggh*log(ph) + gge*log(pe)
188 + ggs*log(ps) + ggy*log(y);
189 sh = a_h + ghc*log(pc) + ghg*log(pg) + ghf*log(pf) + ghh*log(ph) + ghe*log(pe)
190 + ghs*log(ps) + ghy*log(y);
191 se = a_e + gec*log(pc) + geg*log(pg) + gef*log(pf) + geh*log(ph) + gee*log(pe)
192 + ges*log(ps) + gey*log(y);
193 ss = a_s + gsc*log(pc) + gsg*log(pg) + gsf*log(pf) + gsh*log(ph) + gse*log(pe)
194 + gss*log(ps) + gsy*log(y);
195
196
 
197 fit sc sg sh se ss / itsur;
198
199 label a_c = "SC Intercept"
200 a_g = "SG Intercept"
201 a_f = "SF Intercept"
202 a_h = "SH Intercept"
203 a_e = "SE Intercept"
204 a_s = "SS Intercept"
205 gcc = "SC C Price"
206 gcg = "SC G Price"
207 gcf = "SC F Price"
208 gch = "SC H Price"
209 gce = "SC E Price"
210 gcs = "SC S Price"
211 gcy = "SC Output"
212 ggc = "SG C Price"
213 ggg = "SG G Price"
214 ggf = "SG F Price"
215 ggh = "SG H Price"
216 gge = "SG E Price"
217 ggs = "SG S Price"
218 ggy = "SG Output"
219 gfc = "SF C Price"
220 gfg = "SF G Price"
221 gff = "SF F Price"
222 gfh = "SF H Price"
223 gfe = "SF E Price"
224 gfs = "SF S Price"
225 gfy = "SF Output"
226 ghc = "SH C Price"
227 ghg = "SH G Price"
228 ghf = "SH F Price"
229 ghh = "SH H Price"
230 ghe = "SH E Price"
231 ghs = "SH S Price"
232 ghy = "SH Output"
233 gec = "SE C Price"
234 geg = "SE G Price"
235 gef = "SE F Price"
236 geh = "SE H Price"
237 gee = "SE E Price"
238 ges = "SE S Price"
239 gey = "SE Output"
240 gsc = "SS C Price"
241 gsg = "SS G Price"
242 gsf = "SS F Price"
243 gsh = "SS H Price"
244 gse = "SS E Price"
245 gss = "SS S Price"
246 gsy = "SS Output";
247
248
249 test "Homogeneity"
250 gcc+gcg+gcf+gch+gce+gcs=0,
251 ggc+ggg+ggf+ggh+gge+ggs=0,
252 ghc+ghg+ghf+ghh+ghe+ghs=0,
253 gec+geg+gef+geh+gee+ges=0,
254 gsc+gsg+gsf+gsh+gse+gss=0, / lr;
255
256 test "Symmetry"
257 gcg=ggc,
258 gch=ghc,
259 gce=gec,
260 gcs=ges,
261 ggh=ghg,
262 gge=geg,
263 ggs=gsg,
264 ghe=geh,
265 ghs=gsh,
266 ges=gse, / lr;
267
268 test "Joint Homogeneity and Symmetry"
269 gcc+gcg+gcf+gch+gce+gcs=0,
270 ggc+ggg+ggf+ggh+gge+ggs=0,
271 ghc+ghg+ghf+ghh+ghe+ghs=0,
272 gec+geg+gef+geh+gee+ges=0,
273 gsc+gsg+gsf+gsh+gse+gss=0,
274 gcg=ggc,
275 gch=ghc,
276 gce=gec,
277 gcs=ges,
278 ggh=ghg,
279 gge=geg,
280 ggs=gsg,
281 ghe=geh,
282 ghs=gsh,
283 ges=gse, / lr;
284 run;
 
WARNING: The variable a_f is not defined in the program.
WARNING: The variable gfc is not defined in the program.
WARNING: The variable gfg is not defined in the program.
WARNING: The variable gff is not defined in the program.
WARNING: The variable gfh is not defined in the program.
WARNING: The variable gfe is not defined in the program.
WARNING: The variable gfs is not defined in the program.
WARNING: The variable gfy is not defined in the program.
NOTE: A l'itération ITSUR 2 CONVERGE=0.001 Criteria Met.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
 
NOTE: PROCEDURE MODEL used (Total process time):
real time 4.54 seconds
user cpu time 2.73 seconds
system cpu time 0.29 seconds
memory 38898.78k
OS Memory 89336.00k
Timestamp 18/07/2019 10:49:31 AM
Step Count 73 Switch Count 140
Page Faults 0
Page Reclaims 125004
Page Swaps 0
Voluntary Context Switches 6419
Involuntary Context Switches 13
Block Input Operations 0
Block Output Operations 13440
 
 
285 proc model data = WORK.ER;
286 parameters a_c gcc gcg gcf gch gce gcs gcy
287 a_g ggc ggg ggf ggh gge ggs ggy
288 a_h ghc ghg ghf ghh ghe ghs ghy
289 a_e gec geg gef geh gee ges gey
290 a_s gsc gsg gsf gsh gse gss gsy;
291 endogenous sc sg se ss;
292 exogenous pc pg pf ph pe ps y;
293 restrict /*Homogeneity Restrictions*/
294 gcf=0-gcc-gcg-gch-gce-gcs,
295 ggf=0-gcg-ggg-ggh-gge-ggs,
296 ghf=0-gch-ghg-ghh-ghe-ghs,
297 gef=0-gce-geg-geh-gee-ges,
298 gsf=0-gcs-gsg-gsh-gse-gss,
299 /*Symmetry Restrictions*/
300 gcg=ggc, gch=ghc, gce=gec, gcs=ges, ggh=ghg, gge=geg, ggs=gsg, ghe=geh, ghs=gsh, ges=gse;
301
302
303 /*System of Derived Demand Equations*/
304 sc = a_c + gcc*log(pc) + gcg*log(pg) + gcf*log(pf) + gch*log(ph) + gce*log(pe)
305 + gcs*log(ps) + gcy*log(y);
306 sg = a_g + ggc*log(pc) + ggg*log(pg) + ggf*log(pf) + ggh*log(ph) + gge*log(pe)
307 + ggs*log(ps) + ggy*log(y);
308 sh = a_h + ghc*log(pc) + ghg*log(pg) + ghf*log(pf) + ghh*log(ph) + ghe*log(pe)
309 + ghs*log(ps) + ghy*log(y);
310 se = a_e + gec*log(pc) + geg*log(pg) + gef*log(pf) + geh*log(ph) + gee*log(pe)
311 + ges*log(ps) + gey*log(y);
312 ss = a_s + gsc*log(pc) + gsg*log(pg) + gsf*log(pf) + gsh*log(ph) + gse*log(pe)
313 + gss*log(ps) + gsy*log(y);
314
315
 
316 fit sc sg sh se ss / itsur chow = (35) outest=est;
317
318 label a_c = "SC Intercept"
319 a_g = "SG Intercept"
320 a_f = "SF Intercept"
321 a_h = "SH Intercept"
322 a_e = "SE Intercept"
323 a_s = "SS Intercept"
324 gcc = "SC C Price"
325 gcg = "SC G Price"
326 gcf = "SC F Price"
327 gch = "SC H Price"
328 gce = "SC E Price"
329 gcs = "SC S Price"
330 gcy = "SC Output"
331 ggc = "SG C Price"
332 ggg = "SG G Price"
333 ggf = "SG F Price"
334 ggh = "SG H Price"
335 gge = "SG E Price"
336 ggs = "SG S Price"
337 ggy = "SG Output"
338 gfc = "SF C Price"
339 gfg = "SF G Price"
340 gff = "SF F Price"
341 gfh = "SF H Price"
342 gfe = "SF E Price"
343 gfs = "SF S Price"
344 gfy = "SF Output"
345 ghc = "SH C Price"
346 ghg = "SH G Price"
347 ghf = "SH F Price"
348 ghh = "SH H Price"
349 ghe = "SH E Price"
350 ghs = "SH S Price"
351 ghy = "SH Output"
352 gec = "SE C Price"
353 geg = "SE G Price"
354 gef = "SE F Price"
355 geh = "SE H Price"
356 gee = "SE E Price"
357 ges = "SE S Price"
358 gey = "SE Output"
359 gsc = "SS C Price"
360 gsg = "SS G Price"
361 gsf = "SS F Price"
362 gsh = "SS H Price"
363 gse = "SS E Price"
364 gss = "SS S Price"
365 gsy = "SS Output";
366
367 test "Constant Returns to Scale"
368 gcy=0,
369 ggy=0,
370 ghy=0,
371 gey=0,
372 gsy=0,/ lr;
373 run;
 
WARNING: The variable a_f is not defined in the program.
WARNING: The variable gfc is not defined in the program.
WARNING: The variable gfg is not defined in the program.
WARNING: The variable gff is not defined in the program.
WARNING: The variable gfh is not defined in the program.
WARNING: The variable gfe is not defined in the program.
WARNING: The variable gfs is not defined in the program.
WARNING: The variable gfy is not defined in the program.
NOTE: A l'itération ITSUR 85 CONVERGE=0.001 Criteria Met.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: The data set WORK.EST has 1 observations and 44 variables.
 
NOTE: PROCEDURE MODEL used (Total process time):
real time 4.39 seconds
user cpu time 2.75 seconds
system cpu time 0.29 seconds
memory 36998.76k
OS Memory 112108.00k
Timestamp 18/07/2019 10:49:36 AM
Step Count 74 Switch Count 147
Page Faults 0
Page Reclaims 124439
Page Swaps 0
Voluntary Context Switches 6411
Involuntary Context Switches 4
Block Input Operations 0
Block Output Operations 14216
 
 
374 proc means data = WORK.ER noprint mean;
375 variables sc sg sf sh se ss;
376 output out = meanshares mean = sc sg sf sh se ss;
377 run;
 
NOTE: There were 16 observations read from the data set WORK.ER.
NOTE: The data set WORK.MEANSHARES has 1 observations and 8 variables.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 6382.31k
OS Memory 106656.00k
Timestamp 18/07/2019 10:49:36 AM
Step Count 75 Switch Count 3
Page Faults 0
Page Reclaims 1409
Page Swaps 0
Voluntary Context Switches 30
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 264
 
 
378
379 proc iml;
NOTE: IML Ready
380 /*Read in parameter estimates*/
381 use est;
382 read all var {gcc gcg gcf gch gce gcs ggc ggg ggf ggh gge ggs ghc ghg ghf ghh ghe ghs gec geg gef geh gee ges gsc
382 ! gsg gsf gsh gse gss};
383 read all var _NUM_ into gij;
384 close est;
385
386 /*Calculate S parameter based on homogeneity constraint*/
387 gff=0-gcf-ggf-ghf-gef-gsf;
388
389
390
391 /*Read in mean cost shares and construct vector*/
392 use meanshares;
393 read all var {sc sg sf sh se ss};
394 show names;
395 close meanshares;
396
397 w = sc//sg//sf//sh//se//ss;
398
399 print w;
400
401 /*Construct matrix of parameter estimates*/
402 gij = (gcc||ggc||gcf||gch||gce||gsc)//
403 (ggc||ggg||ggf||ggh||gge||ggs)//
404 (gcf||ggf||gff||ghf||gef||gsf)//
405 (gch||ggh||ghf||ghh||ghe||ghs)//
406 (gce||gge||gef||ghe||gee||ges)//
407 (gsc||ggs||gsf||ghs||ges||gss) ;
408
409 print gij;
410
411
412 nk=ncol(gij);
413 mi = -1#I(nk);
413 ! /*Initialize negative identity matrix*/
414 eos = j(nk,nk,0);
414 ! /*Initialize Marshallian EOS Matrix*/
415 mos = j(nk,nk,0);
415 ! /*Initialize Morishima EOS Matrix*/
416 ep = j(nk,nk,0);
416 ! /*Initialize Price EOD Matrix*/
417
418 /*Calculate Marshallian EOS and Price EOD Matrices*/
419 i=1;
420 do i=1 to nk;
421 j=1;
422 do j=1 to nk;
423 eos[i,j] = (gij[i,j]+w[i]#w[j]+mi[i,j]#w[i])/(w[i]#w[j]);
424 ep[i,j] = w[j]#eos[i,j];
425 end;
426 end;
427
428 /*Calculate Morishima EOS Matrix*/
429 i=1;
430 do i=1 to nk;
431 j=1;
432 do j=1 to nk;
433 mos[i,j] = ep[i,j]-ep[j,j];
434 end;
435 end;
436 /*Print Elasticity Matrices*/
437 factors = {"Coal" "Gas" "Fuel" "Hydraulic" "Wind" "Solar"};
438 print
439 ep[label="Price Elasticities of Demand" rowname=factors colname=factors
440 format=d7.3],
441 eos[label="Hicks-Allen Elasticities of Substitution" rowname=factors colname=factors
442 format=d7.3],
443 mos[label="Morishima Elasticities of Substitution" rowname=factors colname=factors
444 format=d7.3];
445
446 run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
447
448
449
450 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
463
PeterClemmensen
Tourmaline | Level 20

This log is from running more code than you initially posted. So I have not read it thoroughly. 

 

However, you have a PROC IML step at the bottom. PROC IML must be terminated by a QUIT; statement and not RUN;.

andreas_lds
Jade | Level 19

There are many notes about uninitialized variables. Please verify that those variable are intentionally not initialized.

ballardw
Super User

All the warnings of uninitializedvariables make me suspect this is the issue:

75 PROC IMPORT DATAFILE="/home/nassimsa0/ER.xlsx"
76 OUT=WORK.ER
77 DBMS=XLSX
78 REPLACE;
79 RUN;

Check that the 1) column headings were the same this XLSX file

2) the values look similar

 

Many people creating spreadsheets aren't consistent about keeping column names the same, which means that your imported data could well have different variable names. Similar with the values, you can get different variable types for the same named column which often causes problems with code expecting the previous data type.

nassimsa
Obsidian | Level 7

Thank you all for your reply.

 

I tried all your advices but the problem still the same. when i rn the code, the execution keeps running very very long time and nothing happens at the end. I tried with codes already done from sas with no error and still nothing happen. 

andreas_lds
Jade | Level 19

Run step by step and check the results.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 2189 views
  • 3 likes
  • 4 in conversation