BookmarkSubscribeRSS Feed
mukeshmehata1
Fluorite | Level 6

Hi

I have facing problem to produce box plot for wide range dataset. Please give me some hints. So, that I can produce box plot. I have attached my data. Thanks

 

12 REPLIES 12
ballardw
Super User

Have you brought your data into SAS?

 

After you have data in SAS, Proc Sgplot would be one way to start. One example is here : http://support.sas.com/kb/43/090.html

mukeshmehata1
Fluorite | Level 6

Actually, I want to produce box plot with the different months (png file is attached which I produced using by r). If you have any ideas to produce such kind of plots, I will be grateful. Thanks

Jay54
Meteorite | Level 14

See article:  http://blogs.sas.com/content/graphicallyspeaking/2016/12/08/getting-started-sgplot-part-3-vbox/

You will need to convert your multi-column data into grouped data, with two columns, Month and Temperature.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Go to this blog, there is examples with code on pretty much any graph you can think of:

http://blogs.sas.com/content/graphicallyspeaking/

Reeza
Super User

@mukeshmehata1 Please post what you've tried so far and we'll be happy to help you. This looks like homework, so you're unlikely to find someone to provide the exact answer. 

mukeshmehata1
Fluorite | Level 6

Hi 

I have transposed the data. I got Jan to Dec under _NAME_ and produced COL1 to COl 66 as temperature obs. If I can arrange those data then I can produce box plot with the different month. I Don't know how to arrange these columns. So that I will have 66 temp points in each month. Attached file is here.

 

Thanks

mukeshmehata1
Fluorite | Level 6
Yeah It's a homework. But I don't expect to get all the solution. I just need hints. Then, I can do remaining portion.
Reeza
Super User

@mukeshmehata1 wrote:
Yeah It's a homework. But I don't expect to get all the solution. I just need hints. Then, I can do remaining portion.

This is now different from your original question, so it's getting hard to follow. What do you need answered how?

Please post what you ahve and what you want as examples. For reformatting data from wide to long, look into PROC TRANSPOSE

mukeshmehata1
Fluorite | Level 6
Yeah I want helping to generate simple code so that I will have 2 columns. One column is with Jan to Dec and another col is temp value
Reeza
Super User

https://stats.idre.ucla.edu/sas/modules/reshaping-data-wide-to-long-using-a-data-step/

 

Follow the examples above.

 

EDIT: the first example is manual the second array method is probably what you'll find the easiest to understand. 

mukeshmehata1
Fluorite | Level 6
Thank you! It worked.
mukeshmehata1
Fluorite | Level 6
I Just want two columns only..one is Month and another is temp value. So, I will have total rows = 12*66

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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
  • 12 replies
  • 2108 views
  • 3 likes
  • 5 in conversation