BookmarkSubscribeRSS Feed
AJ_Brien
Quartz | Level 8

Hello mentors,

 

Following is my univariate procedure and I'm trying to create a histogram for the 1st time, but something is missing since instead of a graph, all I see is text with histogram values. ods default is html5, and output goes to the result window. Please help, what am I missing?

 

proc univariate data=abc;
var balance;
id id;
histogram balance/normal ;
inset skewness kurtosis/position=ne;
run;

O/P:

The UNIVARIATE Procedure

Histogram for BALANCE2000.008000.0014000.0020000.0026000.0032000.0038000.0044000.0050000.0056000.0062000.000510152025303540PercentSkewness3.06128Kurtosis16.32121BALANCEHistogram for BALANCE

 

Log:

1 The SAS System 10:50 Friday, January 29, 2021

1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='Program';
4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5 %LET _CLIENTPROJECTPATH='aaa.egp';
6 %LET _CLIENTPROJECTPATHHOST='FB4B68626197A';
7 %LET _CLIENTPROJECTNAME='aaa.egp';
8 %LET _SASPROGRAMFILE='';
9 %LET _SASPROGRAMFILEHOST='';
10
11 ODS _ALL_ CLOSE;
12 OPTIONS DEV=SVG;
13 GOPTIONS XPIXELS=0 YPIXELS=0;
14 %macro HTML5AccessibleGraphSupported;
15 %if %_SAS_VERCOMP(9, 4, 4) >= 0 %then ACCESSIBLE_GRAPH;
16 %mend;
17 FILENAME EGHTML TEMP;
18 ODS HTML5(ID=EGHTML) FILE=EGHTML
19 OPTIONS(BITMAP_MODE='INLINE')
20 %HTML5AccessibleGraphSupported
MLOGIC(HTML5ACCESSIBLEGRAPHSUPPORTED): Beginning execution.
MLOGIC(_SAS_VERCOMP): Beginning execution.
MLOGIC(_SAS_VERCOMP): Parameter MAJOR has value 9
MLOGIC(_SAS_VERCOMP): Parameter MINOR has value 4
MLOGIC(_SAS_VERCOMP): Parameter MAINT has value 4
MLOGIC(_SAS_VERCOMP): %LOCAL CURMAJ
MLOGIC(_SAS_VERCOMP): %LOCAL CURMIN
MLOGIC(_SAS_VERCOMP): %LOCAL CURMNT
MLOGIC(_SAS_VERCOMP): %LET (variable name is CURMAJ)
SYMBOLGEN: Macro variable SYSVLONG resolves to A2
MLOGIC(_SAS_VERCOMP): %LET (variable name is CURMIN)
SYMBOLGEN: Macro variable SYSVLONG resolves to A3
MLOGIC(_SAS_VERCOMP): %LET (variable name is CURMNT)
SYMBOLGEN: Macro variable SYSVLONG resolves to A4
SYMBOLGEN: Macro variable MAJOR resolves to 9
SYMBOLGEN: Macro variable CURMAJ resolves to 9
MLOGIC(_SAS_VERCOMP): %IF condition %eval(&major NE &CurMaj) is FALSE
SYMBOLGEN: Macro variable MINOR resolves to 4
SYMBOLGEN: Macro variable CURMIN resolves to 04
MLOGIC(_SAS_VERCOMP): %IF condition %eval(&minor NE &CurMin) is FALSE
SYMBOLGEN: Macro variable MAINT resolves to 4
MLOGIC(_SAS_VERCOMP): %IF condition "&maint" = "" is FALSE
SYMBOLGEN: Macro variable CURMNT resolves to 6
SYMBOLGEN: Macro variable MAINT resolves to 4
MLOGIC(_SAS_VERCOMP): Ending execution.
MLOGIC(HTML5ACCESSIBLEGRAPHSUPPORTED): %IF condition %_SAS_VERCOMP(9, 4, 4) >= 0 is TRUE
MLOGIC(HTML5ACCESSIBLEGRAPHSUPPORTED): Ending execution.
21 ENCODING='utf-8'
22 STYLE=HtmlBlue
23 NOGTITLE
24 NOGFOOTNOTE
25 GPATH=&sasworklocation
SYMBOLGEN: Macro variable SASWORKLOCATION resolves to
"/saswork1/"
26 ;
NOTE: Writing HTML5(EGHTML) Body file: EGHTML
27
2 The SAS System 10:50 Friday, January 29, 2021

28 proc univariate data=abc;
29 var BALANCE;
30 id id;
31 histogram BALANCE/normal ;
32 inset skewness kurtosis/position=ne;
33 run;

NOTE: PROCEDURE UNIVARIATE used (Total process time):
real time 0.32 seconds
user cpu time 0.17 seconds
system cpu time 0.03 seconds
memory 7246.00k
OS Memory 44280.00k
Timestamp 01/29/2021 11:55:16 AM
Step Count 545 Switch Count 5
Page Faults 10
Page Reclaims 1635
Page Swaps 0
Voluntary Context Switches 239
Involuntary Context Switches 1
Block Input Operations 18648
Block Output Operations 328

34
35 %LET _CLIENTTASKLABEL=;
36 %LET _CLIENTPROCESSFLOWNAME=;
37 %LET _CLIENTPROJECTPATH=;
38 %LET _CLIENTPROJECTPATHHOST=;
39 %LET _CLIENTPROJECTNAME=;
40 %LET _SASPROGRAMFILE=;
41 %LET _SASPROGRAMFILEHOST=;
42
43 ;*';*";*/;quit;run;
44 ODS _ALL_ CLOSE;
45
46
47 QUIT; RUN;
48

6 REPLIES 6
AJ_Brien
Quartz | Level 8
Also tried with ods graphics on, but that didn't help either.
Would appreciate any suggestions.
Rick_SAS
SAS Super FREQ

Please post the complete SAS log.

AJ_Brien
Quartz | Level 8
Hello, log updated in the post, doesn't really say much though.
Thank you for your kind attention
Rick_SAS
SAS Super FREQ

Is that macro code something that you wrote, or is it coming from a SAS product (such as Enterprise Guide) in which you are running SAS?

 

I don't see anything obviously wrong, but it could be the data rather than the SAS syntax. Let's try two tests. The first test repeats your call to PROC UNIVARIATE on some data that we know is suitable for graphing. The second tries to create a histogram of your data by using PROC SGPOT.  Let us know what happens when you submit these statements.

 

/* TEST 1: Is it the DATA? Can you see the histogram of this test data? */
data Have;
do id = 1 to 10;
   BALANCE = rand("Normal");
   output;
   end;
run;
ods graphics on;
proc univariate data=Have;
 var BALANCE;
 id id;
 histogram BALANCE/normal ;
 inset skewness kurtosis/position=ne;
run;

/* TEST 2: Can you see the histogram created by PROC SGPLOT on the ABC data? */
proc sgplot data=abc;
   histogram BALANCE;
   density BALANCE;
run;
AJ_Brien
Quartz | Level 8
those macro codes are by default, theys show up on their own.
when I run test1, it gives me a bunch of univariate report tables, but for the histogram, it gives me this:
PIF_FUN (BKRPT_CD = 'P' ONLY) - After Exclusion

The UNIVARIATE Procedure

Histogram for BALANCE -1.2 -0.4 0.4 1.2 BALANCE 0 10 20 30 40 Percent -0.83195 Kurtosis 0.046136 Skewness Normal(Mu=0.0611 Sigma=0.8445) Curve Distribution of BALANCE Histogram for BALANCE

when I run test2, it gives me this:
PIF_FUN (BKRPT_CD = 'P' ONLY) - After Exclusion

The SGPlot Procedure -2 -1 0 1 2 BALANCE 0 10 20 30 40 Percent Normal The SGPlot Procedure

I feel like there is some setting in sas eg that I'm missing!? there is definitely nothing wrong with the codes being used.
AJ_Brien
Quartz | Level 8

i checked my graph settings, and this is what it looks like:

 

AJ_Brien_0-1612195407573.png

 

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1252 views
  • 0 likes
  • 2 in conversation