01-07-2025
Kedarnath_M
Obsidian | Level 7
Member since
10-26-2019
- 13 Posts
- 9 Likes Given
- 0 Solutions
- 4 Likes Received
-
Latest posts by Kedarnath_M
Subject Views Posted 3732 09-15-2021 04:28 PM 3835 09-14-2021 02:23 PM 3861 09-14-2021 01:34 PM 3879 09-14-2021 01:07 PM 3923 09-14-2021 11:30 AM 2088 09-14-2021 10:01 AM 2214 09-12-2021 04:13 PM 2240 09-12-2021 03:41 PM 2325 09-12-2021 10:15 AM 1597 09-12-2021 09:33 AM -
Activity Feed for Kedarnath_M
- Got a Like for Re: importing a .dat file into sas. 01-06-2022 01:36 AM
- Posted Re: Adding a significance star in proc sgplot on SAS Programming. 09-15-2021 04:28 PM
- Liked Re: Adding a significance star in proc sgplot for Ksharp. 09-15-2021 03:46 PM
- Got a Like for Re: Need help in specifying the order of bars in a bar graph (proc sgplot and proc sgpanel). 09-15-2021 07:55 AM
- Posted Re: Adding a significance star in proc sgplot on SAS Programming. 09-14-2021 02:23 PM
- Posted Re: Adding a significance star in proc sgplot on SAS Programming. 09-14-2021 01:34 PM
- Posted Re: Adding a significance star in proc sgplot on SAS Programming. 09-14-2021 01:07 PM
- Posted Adding a significance star in proc sgplot on SAS Programming. 09-14-2021 11:30 AM
- Liked Adding significance star on VBAR in SGPLOT for lokerick. 09-14-2021 10:14 AM
- Tagged Adding significance star on VBAR in SGPLOT on Graphics Programming. 09-14-2021 10:14 AM
- Posted Re: Need help in specifying the order of bars in a bar graph (proc sgplot and proc sgpanel) on SAS Programming. 09-14-2021 10:01 AM
- Got a Like for Re: Web-based SAS studio and local disk?. 09-13-2021 10:43 PM
- Liked Re: Need help in specifying the order of bars in a bar graph (proc sgplot and proc sgpanel) for Ksharp. 09-13-2021 11:05 AM
- Posted Re: Need help in specifying the order of bars in a bar graph (proc sgplot and proc sgpanel) on SAS Programming. 09-12-2021 04:13 PM
- Posted Re: Need help in specifying the order of bars in a bar graph (proc sgplot and proc sgpanel) on SAS Programming. 09-12-2021 03:41 PM
- Liked Re: Need help in specifying the order of bars in a bar graph (proc sgplot and proc sgpanel) for sbxkoenk. 09-12-2021 03:34 PM
- Posted Need help in specifying the order of bars in a bar graph (proc sgplot and proc sgpanel) on SAS Programming. 09-12-2021 10:15 AM
- Posted Re: Web-based SAS studio and local disk? on SAS Software for Learning Community. 09-12-2021 09:33 AM
- Liked Re: SAS web forms - collect data directly into SAS datasets for Cynthia_sas. 12-30-2020 06:42 AM
- Posted Re: SAS web forms - collect data directly into SAS datasets on SAS Programming. 12-30-2020 06:41 AM
-
Posts I Liked
Subject Likes Author Latest Post 4 1 2 1 2 -
My Liked Posts
Subject Likes Posted 1 12-26-2020 08:28 AM 2 09-14-2021 10:01 AM 1 09-12-2021 09:33 AM
09-15-2021
04:28 PM
This sir, is straight genius.
... View more
09-14-2021
02:23 PM
1. I'm trying to get this graph to have the asterisks, the other 2 graphs (the pictures) aren't mine they were just examples of how I wanted the graph to look like.
2. yup that's the problem
Good idea! I'll try to use one of the sashelp data steps to represent it it might take awhile to do that though.
... View more
09-14-2021
01:34 PM
I already identified which groups are significant using the anova and the post hoc test but I just don't know how to translate that over to the proc sgplot.
Thats my anova code down below so I got the results for that
ods graphics on;
proc anova data = hedgehog.DATA;
class Experiment_Group;
model a b c d e f=Experiment_Group;
means Experiment_Group/hovtest=bf clm cldiff t tukey
alpha=.05;
ods output cldiffs=diffs;
run;
ods graphics off;
And these are all the significant differences between the groups
... View more
09-14-2021
01:07 PM
No the problem was with that code it included a significance star on the graph if the mean was greater than 30, but I only want it to include a star if the difference between the means is a significant amount, like if the error bars don't over lap. data dlabel;
set tempp;
if (uclm>30) then dlabel="*";
else dlabel="";
run; like these were the results of the post hoc test from the anova I ran and I want only these groups to have an asterisk. I guess another way of putting it for this data set is if the difference between the means is greater then 22 (not If the mean is above 22) then SAS should include a star on top of the bar that is higher.
... View more
09-14-2021
11:30 AM
I looked at another topic that discusses this but I'm still very lost. With the code at the bottom I understand how to put a star above a bar but I only want to put that star there if there is a significant difference in the means. So I'm a bit lost on how to tie all of that in together. I also ran a proc anova with a post hoc test (tukey) on my data so I know which bars are significant comparing them together. It'd be nice if there was a way to do it through the proc sgplot procedure itself. I'm try to get it to look like the images below. or This is the original code for the graph above ods graphics on / width=15in height=6in noborder ;
ods listing style =styles.mine;
title '[P]in X';
proc sgplot data=Narwhal.Narwhal_Data (where=(Location Contains 'X'));
vbar Dependant_V / response=N_Concentration group=Experiment_Group groupdisplay=cluster
stat=mean limitstat=stderr alpha=.05 ;
xaxis /*display=(nolabel noticks)*/ label="Package"
values=('X_A' 'X_C' 'X_D' 'X_E' 'X_B' 'X_F');
yaxis grid label="Concentration (pines/apples)";
run; And this is the code I made following the other topic Proc summary data=narwhal.narwhal_data nway;
Class Experiment_group Package;
var N_Concentration;
output out=tempp mean=uclm=uclm ;
run;
data dlabel;
set tempp;
if (uclm>30) then dlabel="*";
else dlabel="";
run;
proc sgplot data=dlabel;
vbarparm category=package response=N_Concentration / group=Experiment_Group datalabel=dlabel groupdisplay=cluster;
run;
I'm using SAS OnDemand for academics
... View more
09-14-2021
10:01 AM
2 Likes
Thank you Koen and KSharp! that worked At first I was confused because the letters wouldn't show up in the work.have data set at first. The length statement should have allowed there to be more characters in the column. When I ran proc contents I saw the format allowed only one character and so I had to go in and change that. I'm still new to SAS😅. data work.have;
length Experiment_Group $ 10;
format Experiment_Group $ char10.;
set Narwhal.Narwhal_Data;
if Experiment_Group='Q' then Experiment_Group=' Q';
if Experiment_Group='W' then Experiment_Group=' W';
if Experiment_Group='E' then Experiment_Group=' E';
if Experiment_Group='R' then Experiment_Group=' R';
if Experiment_Group='T' then Experiment_Group=' T';
if Experiment_Group='U' then Experiment_Group='U';
run;
PROC CONTENTS DATA=have;
/* Open the LISTING destination and assign the LISTING style to the graph */
*ods listing style=listing;
ods graphics / width=10in height=5in;
title '[P]in X';
proc sgplot data=work.have (where=(Dependant_V Contains 'X'));
vbar Dependant_V / response=N_Concentration group=Experiment_Group groupdisplay=cluster
stat=mean limitstat=clm;
xaxis /*display=(nolabel noticks)*/ label="Package"
values=('X_A' 'X_C' 'X_D' 'X_E' 'X_B' 'X_F');
yaxis grid label="Concentration (pines/apples)";
run;
... View more
09-12-2021
04:13 PM
My bad should have specified; I got the first part with the Value= option title '[P]in X';
proc sgplot data=Narwhal.Narwhal_Data (where=(Location Contains 'X'));
vbar Dependant_V / response=N_Concentration group=Experiment_Group groupdisplay=cluster
stat=mean limitstat=clm alpha=.05 ;
xaxis /*display=(nolabel noticks)*/ label="Package"
values=('X_A' 'X_C' 'X_D' 'X_E' 'X_B' 'X_F');
yaxis grid label="Concentration (pines/apples)";
run; I meant for the second part where I can control the order of Q W E R T U Experimental_Group Variable order manually. This is without using the Categoryorder= option since that option orders the groups by itslef. the part circled in red
... View more
09-12-2021
03:41 PM
Sweet thank you Koen👍 I tried the Categoryorder= option and its pretty cool I may use that as well, but is there a way to specify the order of the categories manually?
... View more
09-12-2021
10:15 AM
I'm trying to make a bar chart where I can specify the order of X_A X_B and so on. It looks like the default is alphabetical order. I would also like to reorder the bars as well; such as the order of E, Q, R, T, U, W. ods graphics / width=10in height=5in;
title '[P]in X';
proc sgplot data=Narwhal.Narwhal_Data (where=(Dependant_V Contains 'X'));
vbar Dependant_V / response=N_Concentration group=Experiment_Group groupdisplay=cluster
stat=mean limitstat=clm;
xaxis /*display=(nolabel noticks)*/ label="Package";
yaxis grid label="Concentration (pines/apples)";
run;
... View more
09-12-2021
09:33 AM
1 Like
I had trouble with this as well; here's a screenshot. you can use the arrows next to the trash can to download or upload files to/from your local machine.
... View more
12-30-2020
06:41 AM
You could try embedding a Google forms page on your website. When the customers fill out the Google Form, the data can be converted from google sheets to an excel document, and then you can import the excel document to SAS. Most of the process should be automatic. The only manual thing I can think of is converting the google sheets to an excel file, but you could probably make some sort of workflow for that. Cynthia's method seems a lot better, this one's a bit crude 🤷♂️.
... View more
12-26-2020
10:31 AM
Sweet, I downloaded the file and opened it with TextEdit, but this more convenient.
... View more
12-26-2020
08:28 AM
1 Like
Proc Import datafile="/folders/myfolders/EPG1V2/data/np_traffic.dat" dbms=dlm out=work.traffic2 replace; guessingrows=max; delimiter="|"; run; There you go I actually managed to do it myself without looking at the solution 😁 (for the base SAS training). Yeah as one other person said, you would have to open the file to find out what the delimiter is. For a CSV it would be a comma, but for a data file, you wouldn't know so you would have to check. In my example, the delimiter was a | so I used the delimiter= option to tell that to SAS. I guess in your case you could try a guess and check method to see what the delimiter is until you get it right.
... View more