BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Show your code for the graph

What is the format for the x-axis variable.

This sort of behavior usually points to a format that does not display decimals and the axis wants to use decimals because of the range of values.

Fixes could be supply a Values= list on an xaxis statement, make the axis discrete which is often appropriate for Code values, change the format to display decimals

Which is best depends on the actual data involved.

 

 

View solution in original post

3 REPLIES 3
ballardw
Super User

Show your code for the graph

What is the format for the x-axis variable.

This sort of behavior usually points to a format that does not display decimals and the axis wants to use decimals because of the range of values.

Fixes could be supply a Values= list on an xaxis statement, make the axis discrete which is often appropriate for Code values, change the format to display decimals

Which is best depends on the actual data involved.

 

 

hlamoureux
Obsidian | Level 7

data LUscores;
set WORK.'lu scores'n;
format sid 8.6;
format fpdtop 8.6;


sid=sidscore*1;

FPDtop=fpdScoreTOP*1;







run;
proc univariate data=luscores;
var

SID

fpdTOP
converted_PBJ_FUNDED_RATE

Factor_trust_BAI_score
DNAccountValidationScore
FraudPoint
FPDMIDScore
NCGNSMIDScore
FTCheckAdvisorScore
LendProtectScore
PMTScore
FPDScore
;
histogram;
run;
ballardw
Super User

If you want Proc Univariate to only display single values try adding the MIDPOINT option to your Histogram statement.

I think from your given picture this might work if your values are only integers 0 to 6.

 

Histogram  /midpoints=0  1 2 3 4 5 6;

 

If your variables have different ranges of values you would specify a separate histogram statement listing the variables before the / and the specific values for those variables.

 

Note: if your data is originating from a 0 to 10 scale or similar for ALL the variables and you just don't have some values for some variables you could set the midpoints to use the entire scale and then all the graphs would use the same midpoints.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 3 replies
  • 146 views
  • 0 likes
  • 2 in conversation